-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for small problems on Win64 #46
Comments
Thanks for the heads up. First, the exc_info bug should go to exc_info()[1], not remove the index. sys.exc_info is a function that returns exception info, and I had one type where I tried to index on the function itself, rather that the result. It's behavior is not platform dependent, I just forgot some parentheses. Yes, Cython does have size_t, but I'm not certain that's what we want here. The traditional way to check against two types is: I had to do something slightly more tricky than that in order to preserve Python 3 compatibility, since all ints are longs there, so the long name doesn't exist anymore. I just pushed these two fixes to a branch Can you get that version and let me know if it fixes your problems? |
Fix sys.exc_info typo in ioloop, and typecheck for int/long in poll. Closed by 359c6e9 |
Sorry for the delay. I'm still fighting with git. Thanks! |
I build pyzmq on Windows7 64bit with VC9.
I tried some examples. Examples using eventloop did not work.
Luckily I was able to fix the errors:
Problem 1:
The following error occured:
Traceback (most recent call last):
File "echo.py", line 27, in
loop.start()
File "c:\Python27\lib\site-packages\zmq\eventloop\ioloop.py", line 255, in start
e = sys.exc_info[1]
TypeError: 'builtin_function_or_method' object is not subscriptable
=> Removing [1] from e = sys.exc_info[1] fixed this problem.
After this fix I got the following error:
Traceback (most recent call last):
File "echo.py", line 27, in
loop.start()
File "c:\Python27\lib\site-packages\zmq\eventloop\ioloop.py", line 244, in start
event_pairs = self._impl.poll(poll_timeout)
File "poll.pyx", line 169, in zmq.core.poll.Poller.poll (zmq\core\poll.c:1980)
File "poll.pyx", line 83, in zmq.core.poll._poll (zmq\core\poll.c:1250)
TypeError: Socket must be a 0MQ socket, an integer fd or have a fileno() method: 140L
In file: poll.pyx I changed line 67 from:
elif isinstance(s, int):
to:
elif isinstance(s, int) or isinstance(s, long):
After this, the examples are Working on windows 64bit.
I'm no expert with git, so I have no branch where you can pull from.
Furthermore I came in touch with Cython the first time and I just "guesed" to make it work. So the bug fixes are probably not optimal. The first fix may break the linux/unix version(?!). The second fix can probably be better implemented. Is there a "size_t" in Cython?
Regards, Ralf
The text was updated successfully, but these errors were encountered: