smira / txZMQ

ZeroMQ bindings for Twisted
http://pypi.python.org/pypi/txZMQ/
Mozilla Public License 2.0
148 stars 55 forks source link

Py3k #63

Closed tisdall closed 9 years ago

tisdall commented 9 years ago

Most of the code required no changes and most of the issues where simply with the tests. The only exception was the test used to determine if a message was an iterable or a string in ZmqConnection.send() (in py3k it saw the bytes as an iterable and ran the wrong thing).

I looked over some of the tests that are skipped in my environment and I think I fixed those too (but am not able to run them to be absolutely sure).

tisdall commented 9 years ago

hmm.. seems the only issue is related to calling trial which I think is a twisted thing that hasn't been ported to py3k or pypy.

tisdall commented 9 years ago

ugh... I'm unfamiliar with 'trial', but it seems I overlooked the fact that it's used to run the unittests. I also have no idea how twisted.trial.unittest differs from the regular flavour. However, I ran all the tests in py3k with nosetests (which is available by default in travis), so is it sufficient to use that instead of 'trial` for py3k so we can say txZMQ supports py3k?

tisdall commented 9 years ago

okay... I've tried running both nosetests along side trial (if it exists) to try to cover everything. However py2.6 seems to dislike some aspect of running nosetests.

...FFFFFFFF...............
======================================================================
FAIL: test_reactor_and_factory_shutdown
----------------------------------------------------------------------
UnsupportedTrialFeature: ('skip', 'No module named gi.repository')

So, I changed it to run 'trial' if available and nosetests otherwise. That seems to have made everything happy and will support using 'trial' in py3k whenever twisted produces support for that.

smira commented 9 years ago

@tisdall this all looks really solid, thank you! We can live without trial for Py3k, it is better than having no Py3k support.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 88.889% when pulling a984b6f4587f19effc7f330556963e6a931d6f86 on tisdall:py3k into 7ab7f3fcdd8ed9c955b8a9bb7637044923aafb58 on smira:master.