From: Ben Darnell Date: Sun, 22 Oct 2017 16:31:54 +0000 (-0400) Subject: Remove some vestigial workarounds for py26 X-Git-Tag: v5.0.0~51^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6b26e3deea1a17a187fd80e57efcfe79d2aa9bd;p=thirdparty%2Ftornado.git Remove some vestigial workarounds for py26 --- diff --git a/setup.py b/setup.py index 987c0cf48..26bb716d5 100644 --- 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): diff --git a/tornado/test/runtests.py b/tornado/test/runtests.py index 7cabbaf13..2548058da 100644 --- a/tornado/test/runtests.py +++ b/tornado/test/runtests.py @@ -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\..*") diff --git a/tornado/test/twisted_test.py b/tornado/test/twisted_test.py index 4b88eca86..c0a243a9b 100644 --- a/tornado/test/twisted_test.py +++ b/tornado/test/twisted_test.py @@ -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 diff --git a/tornado/test/util.py b/tornado/test/util.py index 19887c109..0a9438bab 100644 --- a/tornado/test/util.py +++ b/tornado/test/util.py @@ -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")