]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove some vestigial workarounds for py26
authorBen Darnell <ben@bendarnell.com>
Sun, 22 Oct 2017 16:31:54 +0000 (12:31 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 22 Oct 2017 16:37:19 +0000 (12:37 -0400)
setup.py
tornado/test/runtests.py
tornado/test/twisted_test.py
tornado/test/util.py

index 987c0cf487217d8124659f038cf81b786f2a6641..26bb716d52a490533091056a1d72486390f1c543 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -127,9 +127,6 @@ if (platform.python_implementation() == 'CPython' and
 if setuptools is not None:
     # If setuptools is not available, you're on your own for dependencies.
     install_requires = []
-    if sys.version_info < (2, 7):
-        # Only needed indirectly, for singledispatch.
-        install_requires.append('ordereddict')
     if sys.version_info < (3, 4):
         install_requires.append('singledispatch')
     if sys.version_info < (3, 5):
index 7cabbaf133f7c9f887dcee3573edf23de661e76c..2548058da2f53753cd5da7351ae53d9d4c1b3bcf 100644 (file)
@@ -118,10 +118,6 @@ def main():
     # 2.7 and 3.2
     warnings.filterwarnings("ignore", category=DeprecationWarning,
                             message="Please use assert.* instead")
-    # unittest2 0.6 on py26 reports these as PendingDeprecationWarnings
-    # instead of DeprecationWarnings.
-    warnings.filterwarnings("ignore", category=PendingDeprecationWarning,
-                            message="Please use assert.* instead")
     # Twisted 15.0.0 triggers some warnings on py3 with -bb.
     warnings.filterwarnings("ignore", category=BytesWarning,
                             module=r"twisted\..*")
index 4b88eca862df0f18afbedf74c6b495b98196fb48..c0a243a9bbe6852900a24e640e097f252e2eed8b 100644 (file)
@@ -72,9 +72,6 @@ else:
 skipIfNoTwisted = unittest.skipUnless(have_twisted,
                                       "twisted module not present")
 
-skipIfPy26 = unittest.skipIf(sys.version_info < (2, 7),
-                             "twisted incompatible with singledispatch in py26")
-
 
 def save_signal_handlers():
     saved = {}
@@ -494,7 +491,6 @@ class CompatibilityTests(unittest.TestCase):
             'http://127.0.0.1:%d' % self.tornado_port, self.run_reactor)
         self.assertEqual(response, 'Hello from tornado!')
 
-    @skipIfPy26
     def testTornadoServerTwistedCoroutineClientIOLoop(self):
         self.start_tornado_server()
         response = self.twisted_coroutine_fetch(
@@ -503,7 +499,6 @@ class CompatibilityTests(unittest.TestCase):
 
 
 @skipIfNoTwisted
-@skipIfPy26
 class ConvertDeferredTest(unittest.TestCase):
     def test_success(self):
         @inlineCallbacks
index 19887c109b8dd22b4ccb6ca121c6cb066d74ad1a..0a9438babe01bfebe2987847e3e226286c4c444f 100644 (file)
@@ -9,15 +9,8 @@ import textwrap
 
 from tornado.testing import bind_unused_port
 
-# Encapsulate the choice of unittest or unittest2 here.
-# To be used as 'from tornado.test.util import unittest'.
-if sys.version_info < (2, 7):
-    # In py26, we must always use unittest2.
-    import unittest2 as unittest  # type: ignore
-else:
-    # Otherwise, use whichever version of unittest was imported in
-    # tornado.testing.
-    from tornado.testing import unittest
+# Delegate the choice of unittest or unittest2 to tornado.testing.
+from tornado.testing import unittest
 
 skipIfNonUnix = unittest.skipIf(os.name != 'posix' or sys.platform == 'cygwin',
                                 "non-unix platform")