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 2023-07-06 18:27:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-future (Old)
 and      /work/SRC/openSUSE:Factory/.python-future.new.23466 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-future"

Thu Jul  6 18:27:47 2023 rev:18 rq:1096863 version:0.18.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-future/python-future.changes      
2023-04-22 22:01:41.661659080 +0200
+++ /work/SRC/openSUSE:Factory/.python-future.new.23466/python-future.changes   
2023-07-06 18:27:48.770828948 +0200
@@ -1,0 +2,6 @@
+Tue Jul  4 22:14:59 UTC 2023 - Matej Cepl <mc...@suse.com>
+
+- Add 619-test-zero-byte.patch to fix
+  gh#PythonCharmers/python-future#618.
+
+-------------------------------------------------------------------

New:
----
  619-test-zero-byte.patch

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

Other differences:
------------------
++++++ python-future.spec ++++++
--- /var/tmp/diff_new_pack.698njn/_old  2023-07-06 18:27:49.538833662 +0200
+++ /var/tmp/diff_new_pack.698njn/_new  2023-07-06 18:27:49.546833711 +0200
@@ -33,8 +33,12 @@
 # PATCH-FIX-UPSTREAM python39-build.patch gh#PythonCharmers/python-future#578 
mc...@suse.com
 # Overcome incompatibilites with python 3.9
 Patch2:         python39-build.patch
+# PATCH-FIX-UPSTREAM 619-test-zero-byte.patch 
gh#PythonCharmers/python-future#618 mc...@suse.com
+# incompatibilities with 3.11.4
+Patch3:         619-test-zero-byte.patch
+BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
-BuildRequires:  %{python_module setuptools}
+BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 %if 0%{suse_version} >= 1550 || (0%{suse_version} == 1500 && 0%{?sle_version} 
>= 150400)
@@ -53,15 +57,14 @@
 support both Python 2 and Python 3.
 
 %prep
-%setup -q -n future-%{version}
-%autopatch -p1
+%autosetup -p1 -n future-%{version}
 sed -i -e '/^#!\//, 1d' src/future/backports/test/pystone.py
 
 %build
-%python_build
+%pyproject_wheel
 
 %install
-%python_install
+%pyproject_install
 
 %python_clone -a %{buildroot}%{_bindir}/futurize
 %python_clone -a %{buildroot}%{_bindir}/pasteurize

++++++ 619-test-zero-byte.patch ++++++
>From a6135542dffb6b1b8254d6daac779d119d4fc08c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnc...@redhat.com>
Date: Wed, 17 May 2023 14:03:26 +0200
Subject: [PATCH 1/2] Adjust tests to the repr changes in CPython

---
 tests/test_future/test_backports.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/test_future/test_backports.py 
b/tests/test_future/test_backports.py
index 63b1afea..5d46b115 100644
--- a/tests/test_future/test_backports.py
+++ b/tests/test_future/test_backports.py
@@ -599,8 +599,12 @@ def test_yaml_linkage(self):
 
     def test_repr(self):
         od = OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), 
('f', 6)])
-        self.assertEqual(repr(od),
-            "OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), 
('f', 6)])")
+        if sys.version_info[0] == 3 and sys.version_info[1] >= 12:
+            self.assertEqual(repr(od),
+                "OrderedDict({'c': 1, 'b': 2, 'a': 3, 'd': 4, 'e': 5, 'f': 
6})")
+        else:
+            self.assertEqual(repr(od),
+                "OrderedDict([('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 
5), ('f', 6)])")
         self.assertEqual(eval(repr(od)), od)
         self.assertEqual(repr(OrderedDict()), "OrderedDict()")
 
@@ -608,8 +612,12 @@ def test_repr_recursive(self):
         # See issue #9826
         od = OrderedDict.fromkeys('abc')
         od['x'] = od
-        self.assertEqual(repr(od),
-            "OrderedDict([('a', None), ('b', None), ('c', None), ('x', ...)])")
+        if sys.version_info[0] == 3 and sys.version_info[1] >= 12:
+            self.assertEqual(repr(od),
+                "OrderedDict({'a': None, 'b': None, 'c': None, 'x': ...})")
+        else:
+            self.assertEqual(repr(od),
+                "OrderedDict([('a', None), ('b', None), ('c', None), ('x', 
...)])")
 
     def test_setdefault(self):
         pairs = [('c', 1), ('b', 2), ('a', 3), ('d', 4), ('e', 5), ('f', 6)]

>From d7dc44e88b77fea57b9001421428cd7d95abb3bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnc...@redhat.com>
Date: Wed, 17 May 2023 14:42:09 +0200
Subject: [PATCH 2/2] Adjust test to the change in CPython, parser now raises
 SyntaxError instead of ValueError when source code contains null bytes

---
 tests/test_future/test_builtins.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_future/test_builtins.py 
b/tests/test_future/test_builtins.py
index 3921a608..d41d1254 100644
--- a/tests/test_future/test_builtins.py
+++ b/tests/test_future/test_builtins.py
@@ -523,8 +523,8 @@ def test_compile(self):
         self.assertRaises(TypeError, compile)
         self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 
'badmode')
         self.assertRaises(ValueError, compile, 'print(42)\n', '<string>', 
'single', 0xff)
-        # Raises TypeError in Python < v3.5, ValueError in v3.5:
-        self.assertRaises((TypeError, ValueError), compile, chr(0), 'f', 
'exec')
+        # Raises TypeError in Python < v3.5, ValueError in v3.5, SyntaxError 
in >= 3.12:
+        self.assertRaises((TypeError, ValueError, SyntaxError), compile, 
chr(0), 'f', 'exec')
         self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
                           mode='eval', source='0', filename='tmp')
         compile('print("\xe5")\n', '', 'exec')

Reply via email to