]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Singledispatch and twisted don't work well together on py26.
authorBen Darnell <ben@bendarnell.com>
Mon, 19 Jan 2015 18:50:12 +0000 (13:50 -0500)
committerBen Darnell <ben@bendarnell.com>
Mon, 19 Jan 2015 18:50:12 +0000 (13:50 -0500)
Only install singledispatch on py27.

.travis.yml
tornado/test/twisted_test.py
tox.ini

index e94f5cd326c79a338a181823b0a2b6fc8489b9f8..1252caca264932c0d0767509c9881c380b403df8 100644 (file)
@@ -16,7 +16,8 @@ env:
 install:
     # always install unittest2 on py26 even if $DEPS is unset
     - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then travis_retry pip install unittest2; fi
-    - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then travis_retry pip install futures mock Monotime==1.0 singledispatch; fi
+    - if [[ $TRAVIS_PYTHON_VERSION == 2* && $DEPS == true ]]; then travis_retry pip install futures mock Monotime==1.0; fi
+    - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then travis_retry pip install singledispatch; fi
     - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' && $DEPS == true ]]; then travis_retry pip install futures mock singledispatch; fi
     # TODO(bdarnell): pycares tests are currently disabled on travis due to ipv6 issues.
     #- if [[ $TRAVIS_PYTHON_VERSION != 'pypy'* && $DEPS == true ]]; then travis_retry pip install pycares; fi
index 3ceffa77c7f9aa7d2bebf9cb748de6abef192169..a1a2e24c41320037e670d9bf778dcdd2270d8940 100644 (file)
@@ -482,6 +482,7 @@ class CompatibilityTests(unittest.TestCase):
         self.assertEqual(response, 'Hello from tornado!')
 
 
+@skipIfNoTwisted
 @skipIfNoSingleDispatch
 class ConvertDeferredTest(unittest.TestCase):
     def test_success(self):
diff --git a/tox.ini b/tox.ini
index 7aec7fafc7ff9f5dedea858c080768206ea78081..65bf59ac6c0c78601c50baae337968ec7fbd96ac 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -81,8 +81,9 @@ deps =
      {py2,py26,py27,pypy}-full: futures
      # mock became standard in py33
      {py2,py26,py27,pypy,py3,py32,pypy3}-full: mock
-     # singledispatch became standard in py34
-     {py2,py26,py27,pypy,py3,py32,py33}-full: singledispatch
+     # singledispatch became standard in py34. It mostly works on py26
+     # but has problems with old-style classes as used in that version.
+     {py2,py27,pypy,py3,py32,py33}-full: singledispatch
      py33-asyncio: asyncio
      trollius: trollius
      py2-monotonic: Monotime