Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-future for openSUSE:Factory 
checked in at 2021-03-17 20:13:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-future (Old)
 and      /work/SRC/openSUSE:Factory/.python-future.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-future"

Wed Mar 17 20:13:21 2021 rev:13 rq:878588 version:0.18.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-future/python-future.changes      
2020-12-05 20:35:37.466613898 +0100
+++ /work/SRC/openSUSE:Factory/.python-future.new.2401/python-future.changes    
2021-03-17 20:13:33.118792401 +0100
@@ -1,0 +2,6 @@
+Fri Mar 12 13:35:13 UTC 2021 - Matej Cepl <mc...@suse.com>
+
+- Add python39-build.patch to avoid test failures
+  (gh#PythonCharmers/python-future#578).
+
+-------------------------------------------------------------------

New:
----
  python39-build.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-future.spec ++++++
--- /var/tmp/diff_new_pack.HV8SjY/_old  2021-03-17 20:13:33.794793325 +0100
+++ /var/tmp/diff_new_pack.HV8SjY/_new  2021-03-17 20:13:33.798793330 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-future
 #
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,9 @@
 Patch0:         python38-pow.patch
 # UPSTREAM ISSUE gh#PythonCharmers/python-future#508
 Patch1:         future-correct-mimetype.patch
+# PATCH-FIX-UPSTREAM python39-build.patch gh#PythonCharmers/python-future#578 
mc...@suse.com
+# Overcome incompatibilites with python 3.9
+Patch2:         python39-build.patch
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -40,7 +43,7 @@
 BuildRequires:  python3-dbm
 %endif
 Requires(post): update-alternatives
-Requires(preun): update-alternatives
+Requires(preun):update-alternatives
 BuildArch:      noarch
 %python_subpackages
 

++++++ python39-build.patch ++++++
>From c341d5497788923cc6ea0bd1358279f2147aa167 Mon Sep 17 00:00:00 2001
From: Alexander Shadchin <shadc...@yandex-team.ru>
Date: Sun, 15 Nov 2020 13:01:39 +0300
Subject: [PATCH 1/6] Add support Python 3.9

---
 src/future/moves/_dummy_thread.py          |    5 ++++-
 src/future/standard_library/__init__.py    |    2 +-
 tests/test_future/test_builtins.py         |    2 ++
 tests/test_future/test_standard_library.py |    3 ++-
 tests/test_future/test_urllib2.py          |    3 +++
 tests/test_future/test_urllib_toplevel.py  |    5 +++--
 6 files changed, 15 insertions(+), 5 deletions(-)

--- a/src/future/moves/_dummy_thread.py
+++ b/src/future/moves/_dummy_thread.py
@@ -2,7 +2,10 @@ from __future__ import absolute_import
 from future.utils import PY3
 
 if PY3:
-    from _dummy_thread import *
+    try:
+        from _dummy_thread import *
+    except ImportError:
+        from _thread import *
 else:
     __future_module__ = True
     from dummy_thread import *
--- a/src/future/standard_library/__init__.py
+++ b/src/future/standard_library/__init__.py
@@ -125,7 +125,7 @@ RENAMES = {
            # 'Tkinter': 'tkinter',
            '_winreg': 'winreg',
            'thread': '_thread',
-           'dummy_thread': '_dummy_thread',
+           'dummy_thread': '_dummy_thread' if sys.version_info < (3, 9) else 
'_thread',
            # 'anydbm': 'dbm',   # causes infinite import loop
            # 'whichdb': 'dbm',  # causes infinite import loop
            # anydbm and whichdb are handled by fix_imports2
--- a/tests/test_future/test_standard_library.py
+++ b/tests/test_future/test_standard_library.py
@@ -422,7 +422,8 @@ class TestStandardLibraryReorganization(
 
     def test_underscore_prefixed_modules(self):
         import _thread
-        import _dummy_thread
+        if sys.version_info < (3, 9):
+            import _dummy_thread
         import _markupbase
         self.assertTrue(True)
 
--- a/tests/test_future/test_urllib_toplevel.py
+++ b/tests/test_future/test_urllib_toplevel.py
@@ -781,8 +781,9 @@ class UnquotingTests(unittest.TestCase):
                          "%s" % result)
         self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, 
None)
         self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, 
())
-        with support.check_warnings(('', BytesWarning), quiet=True):
-            self.assertRaises((TypeError, AttributeError), 
urllib_parse.unquote, bytes(b''))
+        if sys.version_info < (3, 9):
+            with support.check_warnings(('', BytesWarning), quiet=True):
+                self.assertRaises((TypeError, AttributeError), 
urllib_parse.unquote, bytes(b''))
 
     def test_unquoting_badpercent(self):
         # Test unquoting on bad percent-escapes
--- a/tests/test_future/test_builtins.py
+++ b/tests/test_future/test_builtins.py
@@ -1305,6 +1305,8 @@ class BuiltinTest(unittest.TestCase):
         self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
 
         # Raises TypeError in Python < v3.5, ValueError in v3.5:
+        if sys.version_info < (3, 8):
+            self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
         self.assertRaises(ValueError, pow, 1, 2, 0)
 
         self.assertRaises(TypeError, pow)
--- a/tests/test_future/test_urllib2.py
+++ b/tests/test_future/test_urllib2.py
@@ -710,6 +710,9 @@ class HandlerTests(unittest.TestCase):
             ("ftp://localhost/baz.gif;type=a";,
              "localhost", ftplib.FTP_PORT, "", "", "A",
              [], "baz.gif", None),
+            ("ftp://localhost/baz.gif";,
+             "localhost", ftplib.FTP_PORT, "", "", "I",
+             [], "baz.gif", "image/gif"),
             ]:
             req = Request(url)
             req.timeout = None

Reply via email to