facebook/tornado — pull request #541 by alekstorm (2012-06-18 09:31:43+00:00)
Title: Finish Jython compatibility

I cherry-picked Ben's excellent start on Jython support from his personal fork and finished up the rest.

Notes that aren't covered in commit messages:
* Jython 2.5.2's `socket.inet_pton()` incorrectly reports domain names like 'www.google.com' as valid IP addresses. There isn't really a way around this short of parsing IP addresses ourselves, and it's fixed in 2.5.3b1 anyway.
* The IP address returned from `socket.accept()` is `unicode`, not `str`. I have no idea why, and I've filed a report [here](http://bugs.jython.org/issue1928). The pull request includes a workaround.
* The Jython 2.7 alphas would probably be working, if not for a glaring bug that I've filed [here](http://bugs.jython.org/issue1927).
* Since all the tests pass except the (minor) one mentioned above, I took the liberty of explicitly listing support for CPython, PyPy, and Jython in the README. If anyone objects, this can easily be reverted.