forked from pool/python-future
* Update to 0.18.0
* Add a patch to correct MIME type detection for Python 3.8 * Drop python38-compat.patch, included in the new release OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-future?expand=0&rev=24
This commit is contained in:
parent
7fa3795973
commit
2e38555ae5
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:67045236dcfd6816dc439556d009594abf643e5eb48992e36beac09c2ca659b8
|
|
||||||
size 829119
|
|
3
future-0.18.0.tar.gz
Normal file
3
future-0.18.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6142ef79e2416e432931d527452a1cab3aa4a754a0a53d25b2589f79e1106f34
|
||||||
|
size 830016
|
22
future-correct-mimetype.patch
Normal file
22
future-correct-mimetype.patch
Normal file
@ -0,0 +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 @@
|
||||||
|
h = NullFTPHandler(data)
|
||||||
|
h.parent = MockOpener()
|
||||||
|
|
||||||
|
+ # 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 @@
|
||||||
|
["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),
|
||||||
|
]:
|
||||||
|
req = Request(url)
|
||||||
|
req.timeout = None
|
@ -12,25 +12,24 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-future
|
Name: python-future
|
||||||
Version: 0.17.1
|
Version: 0.18.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Single-source support for Python 3 and 2
|
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
|
License: MIT AND Python-2.0
|
||||||
URL: https://python-future.org
|
# See https://github.com/PythonCharmers/python-future/issues/242 for PSF licensing
|
||||||
|
Url: https://python-future.org
|
||||||
Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
|
||||||
Source100: python-future-rpmlintrc
|
Source100: python-future-rpmlintrc
|
||||||
# PATCH-FIX-UPSTREAM python38-compat.patch gh#PythonCharmers/python-future#447 mcepl@suse.com
|
|
||||||
# Python 3.8 removed urllib.request.splitattr
|
|
||||||
Patch0: python38-compat.patch
|
|
||||||
# PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM python38-pow.patch gh#PythonCharmers/python-future#474 mcepl@suse.com
|
||||||
Patch1: python38-pow.patch
|
Patch0: python38-pow.patch
|
||||||
|
# UPSTREAM ISSUE https://github.com/PythonCharmers/python-future/issues/508
|
||||||
|
Patch1: future-correct-mimetype.patch
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 4b1ddb49e8e7d4c812c50ac38d2c11db64ac9c1e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Chih-Hsuan Yen <yan12125@gmail.com>
|
|
||||||
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():
|
|
Loading…
x
Reference in New Issue
Block a user