Blame SOURCES/future-python39.patch

6d5dc0
From edda349a2d4fffa6c7f277483ccb40a66c0795b9 Mon Sep 17 00:00:00 2001
6d5dc0
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
6d5dc0
Date: Mon, 10 Feb 2020 23:17:28 +0100
6d5dc0
Subject: [PATCH] Test fixes for Python 3.9
6d5dc0
6d5dc0
Fixes https://github.com/PythonCharmers/python-future/issues/540
6d5dc0
Fixes https://github.com/PythonCharmers/python-future/issues/541
6d5dc0
---
6d5dc0
 src/future/moves/_dummy_thread.py          | 2 +-
6d5dc0
 src/future/standard_library/__init__.py    | 2 +-
6d5dc0
 tests/test_future/test_standard_library.py | 1 -
6d5dc0
 tests/test_future/test_urllib_toplevel.py  | 2 --
6d5dc0
 4 files changed, 2 insertions(+), 5 deletions(-)
6d5dc0
6d5dc0
diff --git a/src/future/moves/_dummy_thread.py b/src/future/moves/_dummy_thread.py
6d5dc0
index 688d249b..cc2fc891 100644
6d5dc0
--- a/src/future/moves/_dummy_thread.py
6d5dc0
+++ b/src/future/moves/_dummy_thread.py
6d5dc0
@@ -2,7 +2,7 @@
6d5dc0
 from future.utils import PY3
6d5dc0
 
6d5dc0
 if PY3:
6d5dc0
-    from _dummy_thread import *
6d5dc0
+    from _thread import *
6d5dc0
 else:
6d5dc0
     __future_module__ = True
6d5dc0
     from dummy_thread import *
6d5dc0
diff --git a/src/future/standard_library/__init__.py b/src/future/standard_library/__init__.py
6d5dc0
index cff02f95..3e8da8a6 100644
6d5dc0
--- a/src/future/standard_library/__init__.py
6d5dc0
+++ b/src/future/standard_library/__init__.py
6d5dc0
@@ -125,7 +125,7 @@
6d5dc0
            # 'Tkinter': 'tkinter',
6d5dc0
            '_winreg': 'winreg',
6d5dc0
            'thread': '_thread',
6d5dc0
-           'dummy_thread': '_dummy_thread',
6d5dc0
+           'dummy_thread': '_thread',
6d5dc0
            # 'anydbm': 'dbm',   # causes infinite import loop
6d5dc0
            # 'whichdb': 'dbm',  # causes infinite import loop
6d5dc0
            # anydbm and whichdb are handled by fix_imports2
6d5dc0
diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py
6d5dc0
index 3ac5d2d7..8ab27a27 100644
6d5dc0
--- a/tests/test_future/test_standard_library.py
6d5dc0
+++ b/tests/test_future/test_standard_library.py
6d5dc0
@@ -422,7 +422,6 @@ def test_urllib_imports_install_hooks(self):
6d5dc0
 
6d5dc0
     def test_underscore_prefixed_modules(self):
6d5dc0
         import _thread
6d5dc0
-        import _dummy_thread
6d5dc0
         import _markupbase
6d5dc0
         self.assertTrue(True)
6d5dc0
 
6d5dc0
diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py
6d5dc0
index 11e77201..25f4ca82 100644
6d5dc0
--- a/tests/test_future/test_urllib_toplevel.py
6d5dc0
+++ b/tests/test_future/test_urllib_toplevel.py
6d5dc0
@@ -781,8 +781,6 @@ def test_unquoting(self):
6d5dc0
                          "%s" % result)
6d5dc0
         self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, None)
6d5dc0
         self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, ())
6d5dc0
-        with support.check_warnings(('', BytesWarning), quiet=True):
6d5dc0
-            self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, bytes(b''))
6d5dc0
 
6d5dc0
     def test_unquoting_badpercent(self):
6d5dc0
         # Test unquoting on bad percent-escapes