tornadio2
tornadio2 copied to clipboard
Python 3 compatibility
This fixes issue #48. It was surprisingly straightforward.
A few things of note: 0. The aim was to have a single codebase that's compatible with both major versions.
- It takes advantage of the py3 syntax backports into 2.6 and 2.7 as well as the reintroduced
u'string'
literals in 3.3. As such, the code is not compatible with 2.5, 3.1 and 3.2. If that's alright with the community, I'd like to keep it that way because it makes it much easier to maintain. If it is a problem, we should come up with a consensus on the supported versions and I shall attempt to update this. - I didn't get to port the tests yet. That's to come next week if there's an interest the port. I have updated and tested the examples, though, and they work.
- Related to that, the "gen" and "ssl_transports" examples didn't work for me out of the box on
master
so I don't test them on thepython3
branch either. I'll look into it next week to see if there are genuine bugs or it's just an issue with my setup.
I tried to follow Armin Ronacher's suggestions: http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/
Please do try it out and let me know if you have any issues or concerns over the code.