Sync from SUSE:ALP:Source:Standard:1.0 python-future revision 76d8bef3162f14871974316f98dd7183
This commit is contained in:
commit
a49414f0d3
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
69
619-test-zero-byte.patch
Normal file
69
619-test-zero-byte.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From a6135542dffb6b1b8254d6daac779d119d4fc08c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@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?= <thrnciar@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')
|
BIN
future-0.18.3.tar.gz
(Stored with Git LFS)
Normal file
BIN
future-0.18.3.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
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
|
||||
+++ 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"
|
||||
for url, host, port, user, passwd, type_, dirs, filename, mimetype in [
|
||||
("ftp://localhost/foo/bar/baz.html",
|
||||
"localhost", ftplib.FTP_PORT, "", "", "I",
|
||||
@@ -713,7 +709,7 @@ class HandlerTests(unittest.TestCase):
|
||||
["foo", "bar"], "", None),
|
||||
("ftp://localhost/baz.gif;type=a",
|
||||
"localhost", ftplib.FTP_PORT, "", "", "A",
|
||||
- [], "baz.gif", guessed_mime),
|
||||
+ [], "baz.gif", None),
|
||||
]:
|
||||
req = Request(url)
|
||||
req.timeout = None
|
2
python-future-rpmlintrc
Normal file
2
python-future-rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
||||
addFilter("pem-certificate .*/site-packages/future/backports/test/.*\.pem")
|
||||
addFilter("zero-length .*/site-packages/future/backports/test/nullcert.pem")
|
213
python-future.changes
Normal file
213
python-future.changes
Normal file
@ -0,0 +1,213 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 4 22:14:59 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add 619-test-zero-byte.patch to fix
|
||||
gh#PythonCharmers/python-future#618.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:25:35 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 22:41:31 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Make calling of %{sle15modernpython} optional.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 09:52:15 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- pull in dbm for all flavors on SLE15 SP4+ as well
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 21 09:53:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.18.3:
|
||||
* Backport fix for bpo-38804 (c91d70b)
|
||||
* Fix bug in fix_print.py fixer (dffc579)
|
||||
* Fix bug in fix_raise.py fixer (3401099)
|
||||
* Fix newint bool in py3 (fe645ba)
|
||||
* Fix bug in super() with metaclasses (6e27aac)
|
||||
* docs: fix simple typo, reqest -> request (974eb1f)
|
||||
* Correct eq (c780bf5)
|
||||
* Pass if lint fails (2abe00d)
|
||||
* fix order (f96a219)
|
||||
* Add flake8 to image (046ff18)
|
||||
* Make lint.sh executable (58cc984)
|
||||
* Add docker push to optimize CI (01e8440)
|
||||
* Build System (42b3025)
|
||||
* Add docs build status badge to README.md (3f40bd7)
|
||||
* Use same docs requirements in tox (18ecc5a)
|
||||
* Add docs/requirements.txt (5f9893f)
|
||||
* Add PY37_PLUS, PY38_PLUS, and PY39_PLUS (bee0247)
|
||||
* fix 2.6 test, better comment (ddedcb9)
|
||||
* fix 2.6 test (3f1ff7e)
|
||||
* remove nan test (4dbded1)
|
||||
* include list test values (e3f1a12)
|
||||
* fix other python2 test issues (c051026)
|
||||
* fix missing subTest (f006cad)
|
||||
* import from old imp library on older python versions (fc84fa8)
|
||||
* replace fstrings with format for python 3.4,3.5 (4a687ea)
|
||||
* minor style/spelling fixes (8302d8c)
|
||||
* improve cmp function, add unittest (0d95a40)
|
||||
* Pin typing==3.7.4.1 for Python 3.3 compatiblity (1a48f1b)
|
||||
* Fix various py26 unit test failures (9ca5a14)
|
||||
* Add initial contributing guide with docs build instruction (e55f915)
|
||||
* Add docs building to tox.ini (3ee9e7f)
|
||||
* Support NumPy's specialized int types in builtins.round (b4b54f0)
|
||||
* Added r""" to the docstring to avoid warnings in python3 (5f94572)
|
||||
* Add subclasscheck for past.types.basestring (c9bc0ff)
|
||||
* Correct example in README (681e78c)
|
||||
* Add simple documentation (6c6e3ae)
|
||||
* Add pre-commit hooks (a9c6a37)
|
||||
* Handling of next and next by future.utils.get_next was reversed (52b0ff9)
|
||||
* Add a test for our fix (461d77e)
|
||||
* Compare headers to correct definition of str (3eaa8fd)
|
||||
* Add support for negative ndigits in round; additionally, fixing a bug so
|
||||
that it handles passing in Decimal properly (a4911b9)
|
||||
* Add tkFileDialog to future.movers.tkinter (f6a6549)
|
||||
* Sort before comparing dicts in TestChainMap (6126997)
|
||||
* Fix typo (4dfa099)
|
||||
* Fix formatting in "What's new" (1663dfa)
|
||||
* Fix typo (4236061)
|
||||
* Avoid DeprecationWarning caused by invalid escape (e4b7fa1)
|
||||
* Fixup broken link to external django documentation re: porting to Python 3
|
||||
and unicode_literals (d87713e)
|
||||
* Fixed newdict checking version every time (99030ec)
|
||||
* Add count from 2.7 to 2.6 (1b8ef51)
|
||||
- drop CVE-2022-40899.patch (upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 12:03:41 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add CVE-2022-40899.patch to fix REDoS in http.cookiejar
|
||||
gh#PythonCharmers/python-future#610
|
||||
bsc#1206673
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 12 13:35:13 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add python39-build.patch to avoid test failures
|
||||
(gh#PythonCharmers/python-future#578).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 3 22:24:41 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- Need dbm for more than one python3 flavor
|
||||
gh#openSUSE/python-rpm-macros#66
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- Update to 0.18.0.
|
||||
- Remove python38-compat.patch, already included.
|
||||
- Add future-correct-mimetype.patch, since Python 3.8 is able to detect
|
||||
the MIME type now.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 2 14:56:02 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 7 01:41:21 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Change License from MIT to MIT and Python-2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 11 11:15:09 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Activate test suite
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:48:20 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove superfluous devel dependency for noarch package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 16 19:11:06 UTC 2018 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Update to version 0.17.1
|
||||
* This release address a packaging error because of an erroneous declaration that
|
||||
any built wheels are universal.
|
||||
- Update to version 0.17.0
|
||||
* Fix ``from collections import ChainMap`` after install_aliases() (issue #226)
|
||||
* Fix multiple import from ``__future__`` bug in futurize (issue #113)
|
||||
* Add support for proper %s formatting of newbytes
|
||||
* Properly implement iterator protocol for newrange object
|
||||
* Fix ``past.translation`` on read-only file systems
|
||||
* Fix Tkinter import bug introduced in Python 2.7.4 (issue #262)
|
||||
* Correct TypeError to ValueError in a specific edge case for newrange
|
||||
* Support inequality tests betwen newstrs and newbytes
|
||||
* Add type check to __get__ in newsuper
|
||||
* Fix fix_divsion_safe to support better conversion of complex expressions, and
|
||||
skip obvious float division.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 6 16:24:20 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- Implement single-spec version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 25 08:26:47 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.16.0
|
||||
* Fix newbytes constructor bug.
|
||||
* Fix semantics of bool() with newobject.
|
||||
* Fix standard_library.install_aliases() on PyPy
|
||||
* Fix assertRaises for pow and compile` on Python 3.5.
|
||||
* Fix return argument of future.utils.ensure_new_type
|
||||
if conversion to new type does not exist.
|
||||
* Add missing cmp_to_key for Py2.6.
|
||||
* Allow the old_div fixer to be disabled.
|
||||
* Improve compatibility with Google App Engine.
|
||||
* Add some missing imports to the tkinter and tkinter.filedialog
|
||||
package namespaces
|
||||
* Fix raise_from on PY3 when the exception cannot be recreated from its repr.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 11 13:27:45 UTC 2016 - ms@suse.com
|
||||
|
||||
- Tracker changelog entry to add python-future to SLE12 (bnc#999200)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 21 15:56:12 UTC 2016 - okurz@suse.com
|
||||
|
||||
- Fix rpm uninstall warnings by removing alternatives in postun as
|
||||
discussed in https://build.opensuse.org/request/show/427095
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 15 15:18:21 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Fix update-alternatives usage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 9 03:28:19 UTC 2016 - glin@suse.com
|
||||
|
||||
- Remove %ghost from %{_bindir}/futurize and %{_bindir}/pasteurize
|
||||
(fate#320644)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 14 08:19:07 UTC 2015 - glin@suse.com
|
||||
|
||||
- initial import: 0.15.2 (fate#320644)
|
||||
|
98
python-future.spec
Normal file
98
python-future.spec
Normal file
@ -0,0 +1,98 @@
|
||||
#
|
||||
# spec file for package python-future
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-future
|
||||
Version: 0.18.3
|
||||
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
|
||||
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 gh#PythonCharmers/python-future#508
|
||||
Patch1: future-correct-mimetype.patch
|
||||
# PATCH-FIX-UPSTREAM python39-build.patch gh#PythonCharmers/python-future#578 mcepl@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 mcepl@suse.com
|
||||
# incompatibilities with 3.11.4
|
||||
Patch3: 619-test-zero-byte.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if 0%{suse_version} >= 1550 || (0%{suse_version} == 1500 && 0%{?sle_version} >= 150400)
|
||||
BuildRequires: %{python_module dbm}
|
||||
%else
|
||||
BuildRequires: python3-dbm
|
||||
%endif
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Future is a compatibility layer between Python 2 and Python 3.
|
||||
It allows you to use a single Python 3.x-compatible codebase to
|
||||
support both Python 2 and Python 3.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n future-%{version}
|
||||
sed -i -e '/^#!\//, 1d' src/future/backports/test/pystone.py
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/futurize
|
||||
%python_clone -a %{buildroot}%{_bindir}/pasteurize
|
||||
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%post
|
||||
%{python_install_alternative futurize pasteurize}
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative futurize
|
||||
|
||||
%check
|
||||
# test_moves_urllib_request_http or test_urllib_request_http require internet
|
||||
# test_geturl or test_main fail only on Leap 42.3 and SLE 12 SP4
|
||||
%{python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m pytest \
|
||||
-k 'not (test_moves_urllib_request_http or test_urllib_request_http or test_geturl or test_main)'
|
||||
}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.txt
|
||||
%python_alternative %{_bindir}/futurize
|
||||
%python_alternative %{_bindir}/pasteurize
|
||||
%{python_sitelib}/future-%{version}*-info
|
||||
%{python_sitelib}/future
|
||||
%{python_sitelib}/libfuturize
|
||||
%{python_sitelib}/libpasteurize
|
||||
%{python_sitelib}/past
|
||||
|
||||
%changelog
|
26
python38-pow.patch
Normal file
26
python38-pow.patch
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
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
|
||||
@@ -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:
|
||||
- self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
|
||||
self.assertRaises(ValueError, pow, 1, 2, 0)
|
||||
|
||||
self.assertRaises(TypeError, pow)
|
88
python39-build.patch
Normal file
88
python39-build.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From c341d5497788923cc6ea0bd1358279f2147aa167 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Shadchin <shadchin@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
|
Loading…
Reference in New Issue
Block a user