Message10691

Author zyasoft
Recipients darjus, zyasoft
Date 2016-02-02.14:57:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454425074.39.0.163204578947.issue2458@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-02-02 14:57:54zyasoftsetrecipients: + zyasoft, darjus
2016-02-02 14:57:54zyasoftsetmessageid: <1454425074.39.0.163204578947.issue2458@psf.upfronthosting.co.za>
2016-02-02 14:57:54zyasoftlinkissue2458 messages
2016-02-02 14:57:53zyasoftcreate