gmr / rabbitpy

A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library
http://rabbitpy.readthedocs.org
BSD 3-Clause "New" or "Revised" License
243 stars 58 forks source link

socket.socketpair doesn't exist in Windows #17

Closed brimcfadden closed 10 years ago

brimcfadden commented 10 years ago

Sorry to be the guy who brings up Windows, but I have been experimenting replacing some Pika code on a client's Windows server with Rabbitpy code.

Lines 179-180 of io.py raise the following exception:

AttributeError: 'module' object has no attribute 'socketpair'

Sure enough, socket.socketpair really doesn't exist in Windows; from what I understand of the small paragraph in the Python docs, it's somewhat UNIX-specific.

Is there a way to implement this idiom of creating two connected sockets with more-compatible code?


Also, I want to mention that I can't find any place that specifically mentions compatibility for Rabbitpy. I'm not sure if you plan on supporting Windows or not.

gmr commented 10 years ago

I think I have a work around for Windows support which I'll add tomorrow. Will update the ticket when it's committed into master for testing.

gmr commented 10 years ago

If you could give this a test and let me know how it works for you, I'd be grateful. I've tested in a Windows 8 VM, but that's about the extent of my Windows environment and I'm not sure of how it will behave elsewhere.

brimcfadden commented 10 years ago

I will look into it. Thanks!

brimcfadden commented 10 years ago

I'm happy to report that there have been no connection issues since we started testing on Friday. Rabbitpy is running fine on Windows Server 2008; a Windows service that uses it ran test cases through the weekend with no issues. I would say that you can close this issue.

gmr commented 10 years ago

Awesome! Thanks for the report and follow-up!