Tornado should run on Jython, and it does not appear to really rely on fcntl (#1943). Instead, Tornado mainly seems to be missing some functionality in our ssl implementation, likely minor.
Apply the following diff to a clone of https://github.com/tornadoweb/tornado:
$ git diff
diff --git a/tornado/platform/auto.py b/tornado/platform/auto.py
index 449b634..6d0f435 100644
--- a/tornado/platform/auto.py
+++ b/tornado/platform/auto.py
@@ -35,6 +35,10 @@ if 'APPENGINE_RUNTIME' in os.environ:
elif os.name == 'nt':
from tornado.platform.common import Waker
from tornado.platform.windows import set_close_exec
+elif os.name == 'java':
+ from tornado.platform.common import Waker
+ def set_close_exec(fd):
+ pass
else:
from tornado.platform.posix import set_close_exec, Waker
set_close_exec can be a no-op on Jython because Java opens files such that the file descriptors are closed on exec; see http://stackoverflow.com/a/9224348/423006
After installing dependencies (backports-abc, singledispatch), $ jython -m tornado.test.runtests. But see its tox.ini for more options. Many tests curerently pass, but Tornado is failing in some aspects of using SSL, such as missing attributes on SSL sockets and possibly exception handling.

Is this in the trunk or just a private experiment? That is, should it be closed? Is #2604 formally a dependency?
If we have a bunch of SSL and IPv6 things to deal with, then is suggest it is for beyond 2.7.2.