Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fight bitrot in tornado.platform.twisted.

A new release of zope.interface breaks things on python 2.5, and
sets off our (overly-sensitive?) deprecation checking.
  • Loading branch information...
commit 53452e8d5a40c9befdd6f4aeb8d6b881fa7c9897 1 parent f618c2f
@bdarnell bdarnell authored
View
7 tornado/platform/twisted.py
@@ -41,7 +41,7 @@
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 @@
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):
View
11 tornado/test/runtests.py
@@ -42,11 +42,18 @@ def all():
# 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()
View
2  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.
Please sign in to comment.
Something went wrong with that request. Please try again.