Hello community, here is the log from the commit of package python-future for openSUSE:Factory checked in at 2019-10-05 16:20:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-future (Old) and /work/SRC/openSUSE:Factory/.python-future.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-future" Sat Oct 5 16:20:27 2019 rev:9 rq:734651 version:0.17.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-future/python-future.changes 2019-05-08 15:15:20.568838439 +0200 +++ /work/SRC/openSUSE:Factory/.python-future.new.2352/python-future.changes 2019-10-05 16:20:29.089409162 +0200 @@ -1,0 +2,8 @@ +Wed Oct 2 14:56:02 CEST 2019 - Matej Cepl <[email protected]> + +- Add python38-compat.patch to fix compatibility with Python 3.8 + gh#PythonCharmers/python-future#447 +- Add python38-pow.patch not to expect exception on new available + parameters for Python 3.8. gh#PythonCharmers/python-future#474 + +------------------------------------------------------------------- New: ---- python38-compat.patch python38-pow.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-future.spec ++++++ --- /var/tmp/diff_new_pack.GKRrH7/_old 2019-10-05 16:20:29.593407850 +0200 +++ /var/tmp/diff_new_pack.GKRrH7/_new 2019-10-05 16:20:29.593407850 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-future # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,20 +22,23 @@ Release: 0 Summary: Single-source support for Python 3 and 2 # See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing -License: MIT and Python-2.0 -Group: Development/Languages/Python -Url: https://python-future.org +License: MIT AND Python-2.0 +URL: https://python-future.org Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz Source100: python-future-rpmlintrc -BuildRequires: %{python_module setuptools} +# PATCH-FIX-UPSTREAM python38-compat.patch gh#PythonCharmers/python-future#447 [email protected] +# Python 3.8 removed urllib.request.splitattr +Patch0: python38-compat.patch +# PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 [email protected] +Patch1: python38-pow.patch BuildRequires: %{python_module pytest} -BuildRequires: python3-dbm +BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: python3-dbm Requires(post): update-alternatives Requires(preun): update-alternatives BuildArch: noarch - %python_subpackages %description @@ -45,6 +48,7 @@ %prep %setup -q -n future-%{version} +%autopatch -p1 sed -i -e '/^#!\//, 1d' src/future/backports/test/pystone.py %build ++++++ python38-compat.patch ++++++ >From 4b1ddb49e8e7d4c812c50ac38d2c11db64ac9c1e Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <[email protected]> Date: Fri, 28 Sep 2018 14:39:32 +0800 Subject: [PATCH] Fix urllib.request imports for Python 3.8 compatibility Fixes https://github.com/PythonCharmers/python-future/issues/447 --- src/future/moves/urllib/request.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/future/moves/urllib/request.py b/src/future/moves/urllib/request.py index 60e440a..972aa4a 100644 --- a/src/future/moves/urllib/request.py +++ b/src/future/moves/urllib/request.py @@ -11,19 +11,8 @@ proxy_bypass, quote, request_host, - splitattr, - splithost, - splitpasswd, - splitport, - splitquery, - splittag, - splittype, - splituser, - splitvalue, thishost, - to_bytes, unquote, - unwrap, url2pathname, urlcleanup, urljoin, @@ -32,6 +21,18 @@ urlretrieve, urlsplit, urlunparse) + + from urllib.parse import (splitattr, + splithost, + splitpasswd, + splitport, + splitquery, + splittag, + splittype, + splituser, + splitvalue, + to_bytes, + unwrap) else: __future_module__ = True with suspend_hooks(): ++++++ python38-pow.patch ++++++ --- tests/test_past/test_builtins.py | 2 -- 1 file changed, 2 deletions(-) --- a/tests/test_past/test_builtins.py +++ b/tests/test_past/test_builtins.py @@ -1117,9 +1117,7 @@ class BuiltinTest(unittest.TestCase): else: self.assertAlmostEqual(pow(x, y, z), 24.0) - self.assertRaises(TypeError, pow, -1, -2, 3) self.assertRaises(ValueError, pow, 1, 2, 0) - self.assertRaises(TypeError, pow, -1, -2, 3) self.assertRaises(ValueError, pow, 1, 2, 0) # Will return complex in 3.0: self.assertRaises(ValueError, pow, -342.43, 0.234) --- a/tests/test_future/test_builtins.py +++ b/tests/test_future/test_builtins.py @@ -1286,7 +1286,6 @@ class BuiltinTest(unittest.TestCase): self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j) # Raises TypeError in Python < v3.5, ValueError in v3.5: - self.assertRaises((TypeError, ValueError), pow, -1, -2, 3) self.assertRaises(ValueError, pow, 1, 2, 0) self.assertRaises(TypeError, pow)
