Coder Social home page Coder Social logo

Comments (11)

minrk avatar minrk commented on May 22, 2024

This error does not happen with my system Python 2.5 on OSX 10.6. Can you give more system details? Cython version if you have it, etc.

from pyzmq.

robinp avatar robinp commented on May 22, 2024

Versions: Debian Lenny, Python 2.5.2 (from package), ZeroMQ 2.0.9 from tarball, pyzmq head.

I attached a process to reproduce the thing (assuming Cython is not installed, thus the inserted raise). http://gist.github.com/604388

Also when using the easy_installed Cython-0.13, the unneeded symbols still get generated. The zmq/_zmq.c generated is identical to the bundled one, except the comments about directory location. See: http://gist.github.com/604394

from pyzmq.

minrk avatar minrk commented on May 22, 2024

Thanks, I'll look into this.

Writing buffer-protocol code that runs on everything from 2.5-3.x is difficult :)

from pyzmq.

ellisonbg avatar ellisonbg commented on May 22, 2024

Yes, looking at mpi4py might help. I think mpi4py runs on everything from 2.3 to 3.x (quite impressive).

from pyzmq.

minrk avatar minrk commented on May 22, 2024

I have been looking at mpi4py, but so far I can't find any difference. Those symbols are definitely there in MPI.c in exactly the same contexts, and so far I can't figure out why that wouldn't cause a problem in their code, but does in ours. I'll keep digging.

from pyzmq.

minrk avatar minrk commented on May 22, 2024

Well, I still don't know why it works for mpi4py and not us, but I changed buffers (and some multiprocessing imports) which fixes the bug on my py-2.5, and hopefully on yours as well.

Updated code is here:
http://github.com/minrk/pyzmq/tree/py25

Can you test that?

We are about to merge a refactor of the code; as soon as that's done, I will put these fixes in master.

from pyzmq.

robinp avatar robinp commented on May 22, 2024

Checked mpi4py and found the solution, see the added file atimport.h and the modified buffers.pxd at the head of git://github.com/robinp/pyzmq.git

With that addition the build zmq imports fine on my Python2.5.

from pyzmq.

minrk avatar minrk commented on May 22, 2024

ahhh, thanks for tracking this down - I should have spent some more time ack-ing mpi4py. We'll definitely use one of the two fixes in master after the refactor, probably today.

Can you check that my py25 branch works for you as well?

from pyzmq.

robinp avatar robinp commented on May 22, 2024

I checked the py25 branch now, it imports fine and the tests ran :)

What was the method of fix there?

from pyzmq.

minrk avatar minrk commented on May 22, 2024

There are actually several symbols that are not in Python < 2.6 in there; the only ones they handle in that header are ones that you can encounter at the top level, everything else is inside an if-statement. I just added a version test, so that the symbols can never be requested on versions < 2.6. See here:
http://github.com/minrk/pyzmq/commit/2f0999c3d5d9803b9f275085937dbf1ddb89683f

I also added some checks around some imports so that the devices submodule works under 2.5.

from pyzmq.

minrk avatar minrk commented on May 22, 2024

A variation on these fixes has been merged into trunk, and the code works fine on 2.5

from pyzmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.