]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fight bitrot in tornado.platform.twisted.
authorBen Darnell <ben@bendarnell.com>
Sat, 19 May 2012 21:22:03 +0000 (14:22 -0700)
committerBen Darnell <ben@bendarnell.com>
Sat, 19 May 2012 21:22:03 +0000 (14:22 -0700)
A new release of zope.interface breaks things on python 2.5, and
sets off our (overly-sensitive?) deprecation checking.

tornado/platform/twisted.py
tornado/test/runtests.py
tox.ini

index 564c5f8f9742a7ab1a605b5b01dda3ee47850f55..044c3334173a841fa0fc3cc757f3cedcb1fc926e 100644 (file)
@@ -41,7 +41,7 @@ recommended to call::
 
 before closing the `IOLoop`.
 
-This module has been tested with Twisted versions 11.0.0 and 11.1.0.
+This module has been tested with Twisted versions 11.0.0, 11.1.0, and 12.0.0
 """
 
 from __future__ import absolute_import, division, with_statement
@@ -66,6 +66,11 @@ from tornado.ioloop import IOLoop
 
 class TornadoDelayedCall(object):
     """DelayedCall object for Tornado."""
+    # Note that zope.interface.implements is deprecated in
+    # zope.interface 4.0, because it cannot work in python 3.  The
+    # replacement is a class decorator, which cannot work on python
+    # 2.5.  So when twisted supports python 3, we'll need to drop 2.5
+    # support on this module to make it work.
     implements(IDelayedCall)
 
     def __init__(self, reactor, seconds, f, *args, **kw):
index 8bf8eef9b509d4b30fa646ff0a017ec75f1b301b..4235aba18a6ffb64df7ea4262dbe1ed4bb6ffb7e 100755 (executable)
@@ -42,11 +42,18 @@ if __name__ == '__main__':
     # ignored by default, including DeprecationWarnings and
     # python 3.2's ResourceWarnings.
     warnings.filterwarnings("error")
-    # Tornado shouldn't use anything deprecated, but some of our
-    # dependencies do (last match wins).
+    # Tornado generally shouldn't use anything deprecated, but some of
+    # our dependencies do (last match wins).
     warnings.filterwarnings("ignore", category=DeprecationWarning)
     warnings.filterwarnings("error", category=DeprecationWarning,
                             module=r"tornado\..*")
+    # tornado.platform.twisted uses a deprecated function from
+    # zope.interface in order to maintain compatibility with
+    # python 2.5
+    warnings.filterwarnings("ignore", category=DeprecationWarning,
+                            module=r"tornado\.platform\.twisted")
+    warnings.filterwarnings("ignore", category=DeprecationWarning,
+                            module=r"tornado\.test\.twisted_test")
 
     import tornado.testing
     tornado.testing.main()
diff --git a/tox.ini b/tox.ini
index 5468c89038f80d4dc4e4822dc94b77e6d09bfc7f..40909881cdffa2ccb4cd1070832f634218916884 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -37,6 +37,8 @@ deps =
      pycurl
      simplejson
      twisted>=12.0.0
+     # zope.interface (used by twisted) dropped python 2.5 support in 4.0
+     zope.interface<4.0
 
 # py26-full deliberately runs an older version of twisted to ensure
 # we're still compatible with the oldest version we support.