Blame SOURCES/testtools-2.4.0-remove_backports.patch

rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/requirements.txt testtools-2.4.0/requirements.txt
rdobuilder 097ba3
--- testtools-2.4.0-orig/requirements.txt	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/requirements.txt	2020-04-03 17:03:31.776205598 -0700
rdobuilder 097ba3
@@ -4,6 +4,4 @@
rdobuilder 097ba3
 # 'mimeparse' has not been uploaded by the maintainer with Python3 compat
rdobuilder 097ba3
 # but someone kindly uploaded a fixed version as 'python-mimeparse'.
rdobuilder 097ba3
 python-mimeparse
rdobuilder 097ba3
-unittest2>=1.0.0
rdobuilder 097ba3
-traceback2
rdobuilder 097ba3
 six>=1.4.0
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/setup.cfg testtools-2.4.0/setup.cfg
rdobuilder 097ba3
--- testtools-2.4.0-orig/setup.cfg	2020-03-14 07:30:56.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/setup.cfg	2020-04-03 17:04:37.605592118 -0700
rdobuilder 097ba3
@@ -28,7 +28,6 @@
rdobuilder 097ba3
 test = 
rdobuilder 097ba3
 	testscenarios
rdobuilder 097ba3
 	testresources
rdobuilder 097ba3
-	unittest2>=1.1.0
rdobuilder 097ba3
 
rdobuilder 097ba3
 [files]
rdobuilder 097ba3
 packages = testtools
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/compat.py testtools-2.4.0/testtools/compat.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/compat.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/compat.py	2020-04-03 17:02:34.047743583 -0700
rdobuilder 097ba3
@@ -33,10 +33,7 @@
rdobuilder 097ba3
 # To let setup.py work, make this a conditional import.
rdobuilder 097ba3
 linecache = try_import('linecache2')
rdobuilder 097ba3
 
rdobuilder 097ba3
-try:
rdobuilder 097ba3
-    from testtools import _compat2x as _compat
rdobuilder 097ba3
-except SyntaxError:
rdobuilder 097ba3
-    from testtools import _compat3x as _compat
rdobuilder 097ba3
+from testtools import _compat3x as _compat
rdobuilder 097ba3
 
rdobuilder 097ba3
 reraise = _compat.reraise
rdobuilder 097ba3
 
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/content.py testtools-2.4.0/testtools/content.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/content.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/content.py	2020-04-03 17:05:23.037168731 -0700
rdobuilder 097ba3
@@ -17,10 +17,9 @@
rdobuilder 097ba3
 import json
rdobuilder 097ba3
 import os
rdobuilder 097ba3
 import sys
rdobuilder 097ba3
+import traceback
rdobuilder 097ba3
 
rdobuilder 097ba3
 from extras import try_import
rdobuilder 097ba3
-# To let setup.py work, make this a conditional import.
rdobuilder 097ba3
-traceback = try_import('traceback2')
rdobuilder 097ba3
 
rdobuilder 097ba3
 from testtools.compat import (
rdobuilder 097ba3
     _b,
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/run.py testtools-2.4.0/testtools/run.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/run.py	2015-11-07 09:27:33.000000000 -0800
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/run.py	2020-04-03 17:07:07.353196586 -0700
rdobuilder 097ba3
@@ -12,11 +12,9 @@
rdobuilder 097ba3
 from functools import partial
rdobuilder 097ba3
 import os.path
rdobuilder 097ba3
 import sys
rdobuilder 097ba3
+import unittest
rdobuilder 097ba3
 
rdobuilder 097ba3
 from extras import safe_hasattr, try_imports
rdobuilder 097ba3
-# To let setup.py work, make this a conditional import.
rdobuilder 097ba3
-unittest = try_imports(['unittest2', 'unittest'])
rdobuilder 097ba3
-
rdobuilder 097ba3
 from testtools import TextTestResult, testcase
rdobuilder 097ba3
 from testtools.compat import classtypes, istext, unicode_output_stream
rdobuilder 097ba3
 from testtools.testsuite import filter_by_ids, iterate_tests, sorted_tests
rdobuilder 097ba3
@@ -50,7 +48,6 @@
rdobuilder 097ba3
         describing things that failed to import.
rdobuilder 097ba3
     """
rdobuilder 097ba3
     unittest_import_strs = set([
rdobuilder 097ba3
-        'unittest2.loader.ModuleImportFailure.',
rdobuilder 097ba3
         'unittest.loader.ModuleImportFailure.',
rdobuilder 097ba3
         'discover.ModuleImportFailure.'
rdobuilder 097ba3
         ])
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/testcase.py testtools-2.4.0/testtools/testcase.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/testcase.py	2019-11-28 00:58:29.000000000 -0800
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/testcase.py	2020-04-03 17:27:49.122395535 -0700
rdobuilder 097ba3
@@ -19,22 +19,15 @@
rdobuilder 097ba3
 import copy
rdobuilder 097ba3
 import functools
rdobuilder 097ba3
 import itertools
rdobuilder 097ba3
+import six
rdobuilder 097ba3
 import sys
rdobuilder 097ba3
+import unittest
rdobuilder 097ba3
 import warnings
rdobuilder 097ba3
 
rdobuilder 097ba3
 from extras import (
rdobuilder 097ba3
     safe_hasattr,
rdobuilder 097ba3
     try_import,
rdobuilder 097ba3
     )
rdobuilder 097ba3
-# To let setup.py work, make this a conditional import.
rdobuilder 097ba3
-# Don't use extras.try_imports, as it interferes with PyCharm's unittest
rdobuilder 097ba3
-# detection algorithm. See: https://youtrack.jetbrains.com/issue/PY-26630
rdobuilder 097ba3
-try:
rdobuilder 097ba3
-    import unittest2 as unittest
rdobuilder 097ba3
-except ImportError:
rdobuilder 097ba3
-    import unittest
rdobuilder 097ba3
-import six
rdobuilder 097ba3
-
rdobuilder 097ba3
 from testtools import (
rdobuilder 097ba3
     content,
rdobuilder 097ba3
     )
rdobuilder 097ba3
@@ -66,23 +59,8 @@
rdobuilder 097ba3
 
rdobuilder 097ba3
 wraps = try_import('functools.wraps')
rdobuilder 097ba3
 
rdobuilder 097ba3
-
rdobuilder 097ba3
-class TestSkipped(Exception):
rdobuilder 097ba3
-    """Raised within TestCase.run() when a test is skipped."""
rdobuilder 097ba3
-TestSkipped = try_import('unittest.case.SkipTest', TestSkipped)
rdobuilder 097ba3
-TestSkipped = try_import('unittest2.case.SkipTest', TestSkipped)
rdobuilder 097ba3
-
rdobuilder 097ba3
-
rdobuilder 097ba3
-class _UnexpectedSuccess(Exception):
rdobuilder 097ba3
-    """An unexpected success was raised.
rdobuilder 097ba3
-
rdobuilder 097ba3
-    Note that this exception is private plumbing in testtools' testcase
rdobuilder 097ba3
-    module.
rdobuilder 097ba3
-    """
rdobuilder 097ba3
-_UnexpectedSuccess = try_import(
rdobuilder 097ba3
-    'unittest.case._UnexpectedSuccess', _UnexpectedSuccess)
rdobuilder 097ba3
-_UnexpectedSuccess = try_import(
rdobuilder 097ba3
-    'unittest2.case._UnexpectedSuccess', _UnexpectedSuccess)
rdobuilder 097ba3
+from unittest.case import SkipTest as TestSkipped
rdobuilder 097ba3
+from unittest.case import _UnexpectedSuccess
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
 class _ExpectedFailure(Exception):
rdobuilder 097ba3
@@ -93,8 +71,6 @@
rdobuilder 097ba3
     """
rdobuilder 097ba3
 _ExpectedFailure = try_import(
rdobuilder 097ba3
     'unittest.case._ExpectedFailure', _ExpectedFailure)
rdobuilder 097ba3
-_ExpectedFailure = try_import(
rdobuilder 097ba3
-    'unittest2.case._ExpectedFailure', _ExpectedFailure)
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
 # Copied from unittest before python 3.4 release. Used to maintain
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/test_compat.py testtools-2.4.0/testtools/tests/test_compat.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/test_compat.py	2019-11-28 00:58:29.000000000 -0800
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/test_compat.py	2020-04-03 17:11:59.211436348 -0700
rdobuilder 097ba3
@@ -4,7 +4,7 @@
rdobuilder 097ba3
 
rdobuilder 097ba3
 import ast
rdobuilder 097ba3
 import io
rdobuilder 097ba3
-import linecache2 as linecache
rdobuilder 097ba3
+import linecache
rdobuilder 097ba3
 import os
rdobuilder 097ba3
 import sys
rdobuilder 097ba3
 import tempfile
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/test_run.py testtools-2.4.0/testtools/tests/test_run.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/test_run.py	2015-11-07 09:27:33.000000000 -0800
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/test_run.py	2020-04-03 17:30:21.725938899 -0700
rdobuilder 097ba3
@@ -10,7 +10,7 @@
rdobuilder 097ba3
 from extras import try_import
rdobuilder 097ba3
 fixtures = try_import('fixtures')
rdobuilder 097ba3
 testresources = try_import('testresources')
rdobuilder 097ba3
-import unittest2
rdobuilder 097ba3
+import unittest
rdobuilder 097ba3
 
rdobuilder 097ba3
 import testtools
rdobuilder 097ba3
 from testtools import TestCase, run, skipUnless
rdobuilder 097ba3
@@ -195,13 +195,13 @@
rdobuilder 097ba3
         broken = self.useFixture(SampleTestFixture(broken=True))
rdobuilder 097ba3
         out = StringIO()
rdobuilder 097ba3
         # XXX: http://bugs.python.org/issue22811
rdobuilder 097ba3
-        unittest2.defaultTestLoader._top_level_dir = None
rdobuilder 097ba3
+        unittest.defaultTestLoader._top_level_dir = None
rdobuilder 097ba3
         exc = self.assertRaises(
rdobuilder 097ba3
             SystemExit,
rdobuilder 097ba3
             run.main, ['prog', 'discover', '-l', broken.package.base, '*.py'], out)
rdobuilder 097ba3
         self.assertEqual(2, exc.args[0])
rdobuilder 097ba3
         self.assertThat(out.getvalue(), DocTestMatches("""\
rdobuilder 097ba3
-unittest2.loader._FailedTest.runexample
rdobuilder 097ba3
+unittest.loader._FailedTest.runexample
rdobuilder 097ba3
 Failed to import test module: runexample
rdobuilder 097ba3
 Traceback (most recent call last):
rdobuilder 097ba3
   File ".../loader.py", line ..., in _find_test_path
rdobuilder 097ba3
@@ -345,7 +345,7 @@
rdobuilder 097ba3
         pkg = self.useFixture(SampleLoadTestsPackage())
rdobuilder 097ba3
         out = StringIO()
rdobuilder 097ba3
         # XXX: http://bugs.python.org/issue22811
rdobuilder 097ba3
-        unittest2.defaultTestLoader._top_level_dir = None
rdobuilder 097ba3
+        unittest.defaultTestLoader._top_level_dir = None
rdobuilder 097ba3
         self.assertEqual(None, run.main(
rdobuilder 097ba3
             ['prog', 'discover', '-l', pkg.package.base], out))
rdobuilder 097ba3
         self.assertEqual(dedent("""\
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/test_testsuite.py testtools-2.4.0/testtools/tests/test_testsuite.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/test_testsuite.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/test_testsuite.py	2020-04-03 17:13:27.006601122 -0700
rdobuilder 097ba3
@@ -5,7 +5,6 @@
rdobuilder 097ba3
 import doctest
rdobuilder 097ba3
 from pprint import pformat
rdobuilder 097ba3
 import unittest
rdobuilder 097ba3
-import unittest2
rdobuilder 097ba3
 
rdobuilder 097ba3
 from extras import try_import
rdobuilder 097ba3
 
rdobuilder 097ba3
@@ -223,9 +222,9 @@
rdobuilder 097ba3
                 raise cls.skipException('foo')
rdobuilder 097ba3
             def test_notrun(self):
rdobuilder 097ba3
                 pass
rdobuilder 097ba3
-        # Test discovery uses the default suite from unittest2 (unless users
rdobuilder 097ba3
+        # Test discovery uses the default suite from unittest (unless users
rdobuilder 097ba3
         # deliberately change things, in which case they keep both pieces).
rdobuilder 097ba3
-        suite = unittest2.TestSuite([Skips("test_notrun")])
rdobuilder 097ba3
+        suite = unittest.TestSuite([Skips("test_notrun")])
rdobuilder 097ba3
         log = []
rdobuilder 097ba3
         result = LoggingResult(log)
rdobuilder 097ba3
         suite.run(result)
rdobuilder 097ba3
@@ -240,9 +239,9 @@
rdobuilder 097ba3
                 super(Simples, cls).setUpClass()
rdobuilder 097ba3
             def test_simple(self):
rdobuilder 097ba3
                 pass
rdobuilder 097ba3
-        # Test discovery uses the default suite from unittest2 (unless users
rdobuilder 097ba3
+        # Test discovery uses the default suite from unittest (unless users
rdobuilder 097ba3
         # deliberately change things, in which case they keep both pieces).
rdobuilder 097ba3
-        suite = unittest2.TestSuite([Simples("test_simple")])
rdobuilder 097ba3
+        suite = unittest.TestSuite([Simples("test_simple")])
rdobuilder 097ba3
         log = []
rdobuilder 097ba3
         result = LoggingResult(log)
rdobuilder 097ba3
         suite.run(result)
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_deferred.py testtools-2.4.0/testtools/tests/twistedsupport/test_deferred.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_deferred.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_deferred.py	2020-04-03 17:13:45.124428761 -0700
rdobuilder 097ba3
@@ -52,5 +52,5 @@
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
 def test_suite():
rdobuilder 097ba3
-    from unittest2 import TestLoader, TestSuite
rdobuilder 097ba3
+    from unittest import TestLoader, TestSuite
rdobuilder 097ba3
     return TestLoader().loadTestsFromName(__name__)
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_matchers.py testtools-2.4.0/testtools/tests/twistedsupport/test_matchers.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_matchers.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_matchers.py	2020-04-03 17:13:58.452301968 -0700
rdobuilder 097ba3
@@ -205,5 +205,5 @@
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
 def test_suite():
rdobuilder 097ba3
-    from unittest2 import TestLoader, TestSuite
rdobuilder 097ba3
+    from unittest import TestLoader, TestSuite
rdobuilder 097ba3
     return TestLoader().loadTestsFromName(__name__)
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/tests/twistedsupport/test_runtest.py testtools-2.4.0/testtools/tests/twistedsupport/test_runtest.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/tests/twistedsupport/test_runtest.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/tests/twistedsupport/test_runtest.py	2020-04-03 17:14:09.153200167 -0700
rdobuilder 097ba3
@@ -1016,7 +1016,7 @@
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
 def test_suite():
rdobuilder 097ba3
-    from unittest2 import TestLoader, TestSuite
rdobuilder 097ba3
+    from unittest import TestLoader, TestSuite
rdobuilder 097ba3
     return TestLoader().loadTestsFromName(__name__)
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools/testsuite.py testtools-2.4.0/testtools/testsuite.py
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools/testsuite.py	2018-04-04 16:27:14.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools/testsuite.py	2020-04-03 17:02:34.047743583 -0700
rdobuilder 097ba3
@@ -17,8 +17,6 @@
rdobuilder 097ba3
 import unittest
rdobuilder 097ba3
 
rdobuilder 097ba3
 from extras import safe_hasattr, try_imports
rdobuilder 097ba3
-# This is just to let setup.py work, as testtools is imported in setup.py.
rdobuilder 097ba3
-unittest2 = try_imports(['unittest2', 'unittest'])
rdobuilder 097ba3
 Queue = try_imports(['Queue.Queue', 'queue.Queue'])
rdobuilder 097ba3
 
rdobuilder 097ba3
 import testtools
rdobuilder 097ba3
@@ -36,7 +34,7 @@
rdobuilder 097ba3
                 yield subtest
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
-class ConcurrentTestSuite(unittest2.TestSuite):
rdobuilder 097ba3
+class ConcurrentTestSuite(unittest.TestSuite):
rdobuilder 097ba3
     """A TestSuite whose run() calls out to a concurrency strategy."""
rdobuilder 097ba3
 
rdobuilder 097ba3
     def __init__(self, suite, make_tests, wrap_result=None):
rdobuilder 097ba3
@@ -199,7 +197,7 @@
rdobuilder 097ba3
             process_result.stopTestRun()
rdobuilder 097ba3
 
rdobuilder 097ba3
 
rdobuilder 097ba3
-class FixtureSuite(unittest2.TestSuite):
rdobuilder 097ba3
+class FixtureSuite(unittest.TestSuite):
rdobuilder 097ba3
 
rdobuilder 097ba3
     def __init__(self, fixture, tests):
rdobuilder 097ba3
         super(FixtureSuite, self).__init__(tests)
rdobuilder 097ba3
diff -ru testtools-2.4.0-orig/testtools.egg-info/requires.txt testtools-2.4.0/testtools.egg-info/requires.txt
rdobuilder 097ba3
--- testtools-2.4.0-orig/testtools.egg-info/requires.txt	2020-03-14 07:30:56.000000000 -0700
rdobuilder 097ba3
+++ testtools-2.4.0/testtools.egg-info/requires.txt	2020-04-03 17:31:06.316513271 -0700
rdobuilder 097ba3
@@ -3,10 +3,7 @@
rdobuilder 097ba3
 pbr>=0.11
rdobuilder 097ba3
 python-mimeparse
rdobuilder 097ba3
 six>=1.4.0
rdobuilder 097ba3
-traceback2
rdobuilder 097ba3
-unittest2>=1.0.0
rdobuilder 097ba3
 
rdobuilder 097ba3
 [test]
rdobuilder 097ba3
 testresources
rdobuilder 097ba3
 testscenarios
rdobuilder 097ba3
-unittest2>=1.1.0