- Update to 0.18.2:

- Fix min/max functions with generators, and 'None' default (PR #514)
  - Use BaseException in raise_() (PR #515)
  - Fix builtins.round() for Decimals (Issue #501)
  - Fix raise_from() to prevent failures with immutable classes (PR #518)
  - Make FixInput idempotent (Issue #427)
  - Fix type in newround (PR #521)
  - Support mimetype guessing in urllib2 for Py3.8+ (Issue #508)
  - fix for raise_() when passed an exception that's not an
    Exception (e.g. BaseException subclasses)
- Rebase future-correct-mimetype.patch to revert incorrect fix in
  gh#PythonCharmers/python-future#508

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-future?expand=0&rev=27
This commit is contained in:
Matej Cepl 2019-12-05 14:38:26 +00:00 committed by Git OBS Bridge
parent 003c1600db
commit c1b5a1b0c1
6 changed files with 36 additions and 20 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6142ef79e2416e432931d527452a1cab3aa4a754a0a53d25b2589f79e1106f34
size 830016

3
future-0.18.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d
size 829220

View File

@ -1,22 +1,22 @@
--- a/tests/test_future/test_urllib2.py 2019-10-14 12:22:14.230684473 +1100
+++ b/tests/test_future/test_urllib2.py 2019-10-14 12:35:31.722438625 +1100
@@ -691,6 +691,10 @@
--- a/tests/test_future/test_urllib2.py
+++ b/tests/test_future/test_urllib2.py
@@ -691,10 +691,6 @@ class HandlerTests(unittest.TestCase):
h = NullFTPHandler(data)
h.parent = MockOpener()
+ # MIME guessing works in Python 3.8!
+ guessed_mime = None
+ if sys.hexversion >= 0x03080000:
+ guessed_mime = "image/gif"
- # MIME guessing works in Python 3.8!
- guessed_mime = None
- if sys.hexversion >= 0x03080000:
- guessed_mime = "image/gif"
for url, host, port, user, passwd, type_, dirs, filename, mimetype in [
("ftp://localhost/foo/bar/baz.html",
"localhost", ftplib.FTP_PORT, "", "", "I",
@@ -709,7 +714,7 @@
@@ -713,7 +709,7 @@ class HandlerTests(unittest.TestCase):
["foo", "bar"], "", None),
("ftp://localhost/baz.gif;type=a",
"localhost", ftplib.FTP_PORT, "", "", "A",
- [], "baz.gif", None), # XXX really this should guess image/gif
+ [], "baz.gif", guessed_mime),
- [], "baz.gif", guessed_mime),
+ [], "baz.gif", None),
]:
req = Request(url)
req.timeout = None

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Thu Dec 5 15:02:01 CET 2019 - Matej Cepl <mcepl@suse.com>
- Update to 0.18.2:
- Fix min/max functions with generators, and 'None' default (PR #514)
- Use BaseException in raise_() (PR #515)
- Fix builtins.round() for Decimals (Issue #501)
- Fix raise_from() to prevent failures with immutable classes (PR #518)
- Make FixInput idempotent (Issue #427)
- Fix type in newround (PR #521)
- Support mimetype guessing in urllib2 for Py3.8+ (Issue #508)
- fix for raise_() when passed an exception that's not an
Exception (e.g. BaseException subclasses)
- Rebase future-correct-mimetype.patch to revert incorrect fix in
gh#PythonCharmers/python-future#508
-------------------------------------------------------------------
Mon Oct 14 07:17:21 UTC 2019 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-future
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,23 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-future
Version: 0.18.0
Version: 0.18.2
Release: 0
Summary: Single-source support for Python 3 and 2
License: MIT AND Python-2.0
# See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing
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
# PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 mcepl@suse.com
Patch0: python38-pow.patch
# UPSTREAM ISSUE https://github.com/PythonCharmers/python-future/issues/508
# UPSTREAM ISSUE gh#PythonCharmers/python-future#508
Patch1: future-correct-mimetype.patch
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}

View File

@ -16,7 +16,7 @@
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):
@@ -1305,7 +1305,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: