Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/future/files/, dev-python/future/
Date: Tue, 26 May 2020 12:58:47
Message-Id: 1590497911.68bbadc9dccc320c5de6bf1dd346809bc1e81a36.mgorny@gentoo
1 commit: 68bbadc9dccc320c5de6bf1dd346809bc1e81a36
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 26 12:50:07 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 26 12:58:31 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68bbadc9
7
8 dev-python/future: Port to py39
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/future/files/future-0.18.2-py39.patch | 65 ++++++++++++++++++++++++
13 dev-python/future/future-0.18.2.ebuild | 4 +-
14 2 files changed, 67 insertions(+), 2 deletions(-)
15
16 diff --git a/dev-python/future/files/future-0.18.2-py39.patch b/dev-python/future/files/future-0.18.2-py39.patch
17 new file mode 100644
18 index 00000000000..4524cb0c093
19 --- /dev/null
20 +++ b/dev-python/future/files/future-0.18.2-py39.patch
21 @@ -0,0 +1,65 @@
22 +From edda349a2d4fffa6c7f277483ccb40a66c0795b9 Mon Sep 17 00:00:00 2001
23 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@×××××××.cz>
24 +Date: Mon, 10 Feb 2020 23:17:28 +0100
25 +Subject: [PATCH] Test fixes for Python 3.9
26 +
27 +Fixes https://github.com/PythonCharmers/python-future/issues/540
28 +Fixes https://github.com/PythonCharmers/python-future/issues/541
29 +---
30 + src/future/moves/_dummy_thread.py | 2 +-
31 + src/future/standard_library/__init__.py | 2 +-
32 + tests/test_future/test_standard_library.py | 1 -
33 + tests/test_future/test_urllib_toplevel.py | 2 --
34 + 4 files changed, 2 insertions(+), 5 deletions(-)
35 +
36 +diff --git a/src/future/moves/_dummy_thread.py b/src/future/moves/_dummy_thread.py
37 +index 688d249b..cc2fc891 100644
38 +--- a/src/future/moves/_dummy_thread.py
39 ++++ b/src/future/moves/_dummy_thread.py
40 +@@ -2,7 +2,7 @@
41 + from future.utils import PY3
42 +
43 + if PY3:
44 +- from _dummy_thread import *
45 ++ from _thread import *
46 + else:
47 + __future_module__ = True
48 + from dummy_thread import *
49 +diff --git a/src/future/standard_library/__init__.py b/src/future/standard_library/__init__.py
50 +index cff02f95..3e8da8a6 100644
51 +--- a/src/future/standard_library/__init__.py
52 ++++ b/src/future/standard_library/__init__.py
53 +@@ -125,7 +125,7 @@
54 + # 'Tkinter': 'tkinter',
55 + '_winreg': 'winreg',
56 + 'thread': '_thread',
57 +- 'dummy_thread': '_dummy_thread',
58 ++ 'dummy_thread': '_thread',
59 + # 'anydbm': 'dbm', # causes infinite import loop
60 + # 'whichdb': 'dbm', # causes infinite import loop
61 + # anydbm and whichdb are handled by fix_imports2
62 +diff --git a/tests/test_future/test_standard_library.py b/tests/test_future/test_standard_library.py
63 +index 3ac5d2d7..8ab27a27 100644
64 +--- a/tests/test_future/test_standard_library.py
65 ++++ b/tests/test_future/test_standard_library.py
66 +@@ -422,7 +422,6 @@ def test_urllib_imports_install_hooks(self):
67 +
68 + def test_underscore_prefixed_modules(self):
69 + import _thread
70 +- import _dummy_thread
71 + import _markupbase
72 + self.assertTrue(True)
73 +
74 +diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py
75 +index 11e77201..25f4ca82 100644
76 +--- a/tests/test_future/test_urllib_toplevel.py
77 ++++ b/tests/test_future/test_urllib_toplevel.py
78 +@@ -781,8 +781,6 @@ def test_unquoting(self):
79 + "%s" % result)
80 + self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, None)
81 + self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, ())
82 +- with support.check_warnings(('', BytesWarning), quiet=True):
83 +- self.assertRaises((TypeError, AttributeError), urllib_parse.unquote, bytes(b''))
84 +
85 + def test_unquoting_badpercent(self):
86 + # Test unquoting on bad percent-escapes
87
88 diff --git a/dev-python/future/future-0.18.2.ebuild b/dev-python/future/future-0.18.2.ebuild
89 index 1107c385f9c..d30157b8e13 100644
90 --- a/dev-python/future/future-0.18.2.ebuild
91 +++ b/dev-python/future/future-0.18.2.ebuild
92 @@ -2,7 +2,7 @@
93 # Distributed under the terms of the GNU General Public License v2
94
95 EAPI=7
96 -PYTHON_COMPAT=( python{2_7,3_{6,7,8}} pypy3 )
97 +PYTHON_COMPAT=( python{2_7,3_{6,7,8,9}} pypy3 )
98 DISTUTILS_USE_SETUPTOOLS=rdepend
99
100 inherit distutils-r1
101 @@ -24,10 +24,10 @@ distutils_enable_sphinx docs dev-python/sphinx-bootstrap-theme
102
103 PATCHES=(
104 "${FILESDIR}"/${P}-tests.patch
105 + "${FILESDIR}"/${P}-py39.patch
106 )
107
108 python_prepare_all() {
109 - sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die
110 # tests requiring network access
111 rm tests/test_future/test_requests.py || die
112 sed -i -e 's:test.*request_http:_&:' \