public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/future/, dev-python/future/files/
@ 2019-05-01  9:11 David Seifert
  0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2019-05-01  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     d3e1798c98b73a6df4aa3abefda30fce1f266fb6
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed May  1 09:11:23 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed May  1 09:11:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3e1798c

dev-python/future: Remove old

Package-Manager: Portage-2.3.65, Repoman-2.3.12
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 dev-python/future/Manifest                         |  2 -
 .../future-0.15.2-fix-py35-test-failures.patch     | 57 ----------------------
 ....0-disable-tests-with-internet-connection.patch | 50 -------------------
 .../files/future-0.16.0-fix-tests-py37.patch       | 43 ----------------
 dev-python/future/future-0.15.2.ebuild             | 23 ---------
 dev-python/future/future-0.16.0-r1.ebuild          | 52 --------------------
 dev-python/future/future-0.16.0.ebuild             | 27 ----------
 7 files changed, 254 deletions(-)

diff --git a/dev-python/future/Manifest b/dev-python/future/Manifest
index 0bcf5ff7b5a..48c79e5ce1a 100644
--- a/dev-python/future/Manifest
+++ b/dev-python/future/Manifest
@@ -1,3 +1 @@
-DIST future-0.15.2.tar.gz 1583441 BLAKE2B 9c552a5f3598922f8910480d054015020112aae4f7e14d2c139dda13a0b26e878b75eaf5068d66f20823ac4659d85edd4087a95d9474dc27bf15767cf6e9d921 SHA512 24a0eaf70795efe1644b098c5abbcb0103d9172a5243721f0d26b1cbd108872b6c0616180da8f5507855ddfc7b26bb10a606a64e59d307d39042b346700f77ee
-DIST future-0.16.0.tar.gz 824484 BLAKE2B b098366cc7a7866c4aa4a35f1a6a5cf113698307de8f4cce6c77e4ce72a8433dd102111f991e35ffa920c09a0d31cc048b9502dacd0aba1b701c11eaaeab8392 SHA512 41c795cd1746a76df84de2da9fbc611fc6164322c1c712ec9e8a8626c21c2717cb4899ec150d95c5e0c037270e6bb71e099edd169609369aae619daea9df2e5f
 DIST future-0.17.0.tar.gz 827812 BLAKE2B 14bfce4927386b157da91e6bbad547e21bb622f7e81997bc4ac400842cec5f7a50d7a0f5a743c4c76a7b80be0dcb6f54c06901311fd27781d89a8d2df1cce7e9 SHA512 f2396379e8e36753aeafdf27225c2551a31b10036f21201f1c24d63c1bb318dbd491ec977af514a19a4d477b397df9eed9711be797a64e86fc00c4692729d876

diff --git a/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch b/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch
deleted file mode 100644
index 8d8e5daccf1..00000000000
--- a/dev-python/future/files/future-0.15.2-fix-py35-test-failures.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-* Fix test failures on py3.5, backported from git, see also
-  https://github.com/PythonCharmers/python-future/issues/183
-* Fix unexpected test successes on py3.5, which are now correct
-
---- a/tests/test_future/test_bytes.py
-+++ b/tests/test_future/test_bytes.py
-@@ -10,6 +10,8 @@
- from numbers import Integral
- from future.tests.base import unittest, expectedFailurePY2
- 
-+import sys
-+
- 
- TEST_UNICODE_STR = u'ℝεα∂@ßʟ℮ ☂ℯṧт υηḯ¢☺ḓ℮'
- # Tk icon as a .gif:
-@@ -534,6 +536,8 @@
-         self.assertRaises(ValueError, bytes.maketrans, b'abc', b'xyzq')
-         self.assertRaises(TypeError, bytes.maketrans, 'abc', 'def')
- 
-+    @unittest.skipIf(sys.version_info[:2] == (3, 5),
-+             'Only works in Py3.5+')
-     @unittest.expectedFailure
-     def test_mod(self):
-         """
-@@ -551,6 +555,8 @@
-         a = b % (b'seventy-nine', 79)
-         self.assertEqual(a, b'seventy-nine / 100 = 79%')
- 
-+    @unittest.skipIf(sys.version_info[:2] == (3, 5),
-+             'Only works in Py3.5+')
-     @unittest.expectedFailure
-     def test_imod(self):
-         """
---- a/tests/test_future/test_builtins.py
-+++ b/tests/test_future/test_builtins.py
-@@ -525,11 +525,10 @@
-         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, compile, chr(0), 'f', 'exec')
-+        self.assertRaises((TypeError, ValueError), compile, chr(0), 'f', 'exec')
-         self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
-                           mode='eval', source='0', filename='tmp')
-         compile('print("\xe5")\n', '', 'exec')
--        self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
-         self.assertRaises(ValueError, compile, str('a = 1'), 'f', 'bad')
- 
-         # test the optimize argument
-@@ -1287,7 +1286,7 @@
-         self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
- 
-         # Raises TypeError in Python < v3.5, ValueError in v3.5:
--        # self.assertRaises(TypeError, pow, -1, -2, 3)
-+        self.assertRaises((TypeError, ValueError), pow, -1, -2, 3)
-         self.assertRaises(ValueError, pow, 1, 2, 0)
- 
-         self.assertRaises(TypeError, pow)

diff --git a/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch b/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch
deleted file mode 100644
index b4ba01ed796..00000000000
--- a/dev-python/future/files/future-0.16.0-disable-tests-with-internet-connection.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-##Skipping tests due to connection failures on Fedora build-system
-##See https://github.com/PythonCharmers/python-future/issues/165 
-
---- a/tests/test_future/test_standard_library.orig.py	2014-11-21 12:52:03.000000000 +0100
-+++ b/tests/test_future/test_standard_library.py	2015-09-02 11:37:36.808826777 +0200
-@@ -318,7 +318,7 @@
-         import builtins
-         self.assertTrue(hasattr(builtins, 'tuple'))
- 
--    # @unittest.skip("ssl support has been stripped out for now ...")
-+    @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
-     def test_urllib_request_ssl_redirect(self):
-         """
-         This site redirects to https://...
-@@ -332,6 +332,7 @@
-         # pprint(r.read().decode('utf-8'))
-         self.assertTrue(True)
- 
-+    @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
-     def test_moves_urllib_request_http(self):
-         """
-         This site (python-future.org) uses plain http (as of 2014-09-23).
-@@ -343,6 +343,7 @@
-         data = r.read()
-         self.assertTrue(b'</html>' in data)
- 
-+    @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
-     def test_urllib_request_http(self):
-         """
-         This site (python-future.org) uses plain http (as of 2014-09-23).
-
---- a/tests/test_future/test_requests.orig.py	2014-11-21 12:52:03.000000000 +0100
-+++ b/tests/test_future/test_requests.py	2015-09-02 11:39:01.509378296 +0200
-@@ -57,6 +57,7 @@
-     This class tests whether the requests module conflicts with the
-     standard library import hooks, as in issue #19.
-     """
-+    @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
-     def test_remove_hooks_then_requests(self):
-         code = """
-             from future import standard_library
-@@ -79,6 +80,7 @@
-             self.assertTrue(True)
- 
- 
-+    @unittest.skip("ConnectionError: ('Connection aborted.', gaierror(-3, 'Temporary failure in name resolution'))...")
-     def test_requests_cm(self):
-         """
-         Tests whether requests can be used importing standard_library modules
-

diff --git a/dev-python/future/files/future-0.16.0-fix-tests-py37.patch b/dev-python/future/files/future-0.16.0-fix-tests-py37.patch
deleted file mode 100644
index d925d49f983..00000000000
--- a/dev-python/future/files/future-0.16.0-fix-tests-py37.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-commit ce4f015978d250718ec8dd9f50721da90a9bd18b
-Author: Louis Sautier <sautier.louis@gmail.com>
-Date:   Mon Aug 20 12:42:29 2018 +0200
-
-    Skip int() keyword tests with Python 3.7
-    
-    The first argument must be positional since
-    https://github.com/python/cpython/commit/2e5642422f6234fd8d0c082142b27340e588f96e
-
-diff --git a/tests/test_future/test_int.py b/tests/test_future/test_int.py
-index f1d9c5d..e306550 100644
---- a/tests/test_future/test_int.py
-+++ b/tests/test_future/test_int.py
-@@ -265,6 +265,9 @@ class IntTestCases(unittest.TestCase):
-     def test_no_args(self):
-         self.assertEqual(int(), 0)
- 
-+    @unittest.skipIf(sys.version_info >= (3, 7),
-+            "The first parameter must be positional with Python >= 3.7"
-+    )
-     def test_keyword_args(self):
-         # Test invoking int() using keyword arguments.
-         self.assertEqual(int(x=1.2), 1)
-
-commit d7a3451753982d944ae0894c9e9f01d0460d03d5
-Author: Louis Sautier <sautier.louis@gmail.com>
-Date:   Mon Aug 20 11:17:59 2018 +0200
-
-    Make test_bad_status_repr work for Python 3.7
-
-diff --git a/tests/test_future/test_httplib.py b/tests/test_future/test_httplib.py
-index 968e933..a1e2b19 100644
---- a/tests/test_future/test_httplib.py
-+++ b/tests/test_future/test_httplib.py
-@@ -197,7 +197,7 @@ class BasicTest(TestCase):
-         if not utils.PY3:
-             self.assertEqual(repr(exc), '''BadStatusLine("u\'\'",)''')
-         else:
--            self.assertEqual(repr(exc), '''BadStatusLine("\'\'",)''')
-+            self.assertIn(repr(exc), ('''BadStatusLine("''",)''', '''BadStatusLine("''")'''))
- 
-     def test_partial_reads(self):
-         # if we have a length, the system knows when to close itself

diff --git a/dev-python/future/future-0.15.2.ebuild b/dev-python/future/future-0.15.2.ebuild
deleted file mode 100644
index 7cc10e8da84..00000000000
--- a/dev-python/future/future-0.15.2.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python{2_7,3_5} )
-
-inherit distutils-r1
-
-DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
-HOMEPAGE="http://python-future.org/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 hppa x86"
-IUSE=""
-
-PATCHES=( "${FILESDIR}/${P}-fix-py35-test-failures.patch" )
-
-python_test() {
-	esetup.py test || die
-}

diff --git a/dev-python/future/future-0.16.0-r1.ebuild b/dev-python/future/future-0.16.0-r1.ebuild
deleted file mode 100644
index e65bb99c9ec..00000000000
--- a/dev-python/future/future-0.16.0-r1.ebuild
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python{2_7,3_{5,6,7}} )
-
-inherit distutils-r1
-
-DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
-HOMEPAGE="http://python-future.org/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc test"
-
-BDEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	doc? (
-		dev-python/sphinx[${PYTHON_USEDEP}]
-		dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]
-	)
-	test? (
-		dev-python/numpy[${PYTHON_USEDEP}]
-		dev-python/pytest[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	# https://github.com/PythonCharmers/python-future/issues/165
-	"${FILESDIR}/${P}-disable-tests-with-internet-connection.patch"
-	# https://github.com/PythonCharmers/python-future/pull/355
-	"${FILESDIR}/${P}-fix-tests-py37.patch"
-)
-
-python_prepare_all() {
-	sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	if use doc; then
-		sphinx-build docs/ docs/_build/html || die
-		HTML_DOCS=( docs/_build/html/. )
-	fi
-}
-
-python_test() {
-	pytest -vv || die "Tests failed under ${EPYTHON}"
-}

diff --git a/dev-python/future/future-0.16.0.ebuild b/dev-python/future/future-0.16.0.ebuild
deleted file mode 100644
index aa4638b61ae..00000000000
--- a/dev-python/future/future-0.16.0.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{5,6} )
-
-inherit distutils-r1
-
-DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
-HOMEPAGE="http://python-future.org/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
-IUSE="test"
-
-DEPEND="
-	test? (
-		dev-python/pytest[${PYTHON_USEDEP}]
-	)
-"
-
-python_test() {
-	py.test -v || die "Tests failed under ${EPYTHON}"
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/future/, dev-python/future/files/
@ 2021-06-10  7:25 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-06-10  7:25 UTC (permalink / raw
  To: gentoo-commits

commit:     c3374256e98b5bd0faf34c7657415de6ceaae805
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 10 07:24:55 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 07:25:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3374256

dev-python/future: Fix tests

Closes: https://bugs.gentoo.org/795102
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../future/files/future-0.18.2-py39-fileurl.patch  | 22 ++++++++++++++++++++++
 dev-python/future/future-0.18.2-r1.ebuild          | 11 ++++++++---
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/dev-python/future/files/future-0.18.2-py39-fileurl.patch b/dev-python/future/files/future-0.18.2-py39-fileurl.patch
new file mode 100644
index 00000000000..71ed088edcb
--- /dev/null
+++ b/dev-python/future/files/future-0.18.2-py39-fileurl.patch
@@ -0,0 +1,22 @@
+diff --git a/tests/test_future/test_urllib_toplevel.py b/tests/test_future/test_urllib_toplevel.py
+index 68bc4c9..923b2e8 100644
+--- a/tests/test_future/test_urllib_toplevel.py
++++ b/tests/test_future/test_urllib_toplevel.py
+@@ -120,7 +120,7 @@ class urlopen_FileTests(unittest.TestCase):
+         finally:
+             f.close()
+         self.pathname = support.TESTFN
+-        self.returned_obj = urlopen("file:%s" % self.pathname)
++        self.returned_obj = urlopen("file:%s" % urllib_parse.quote(self.pathname))
+ 
+     def tearDown(self):
+         """Shut down the open object"""
+@@ -167,7 +167,7 @@ class urlopen_FileTests(unittest.TestCase):
+         self.assertIsInstance(self.returned_obj.info(), email_message.Message)
+ 
+     def test_geturl(self):
+-        self.assertEqual(self.returned_obj.geturl(), self.pathname)
++        self.assertEqual(self.returned_obj.geturl(), urllib_parse.quote(self.pathname))
+ 
+     def test_getcode(self):
+         self.assertIsNone(self.returned_obj.getcode())

diff --git a/dev-python/future/future-0.18.2-r1.ebuild b/dev-python/future/future-0.18.2-r1.ebuild
index a959673b21e..309c4a93ff2 100644
--- a/dev-python/future/future-0.18.2-r1.ebuild
+++ b/dev-python/future/future-0.18.2-r1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
+PYTHON_COMPAT=( python3_{8..9} pypy3 )
 DISTUTILS_USE_SETUPTOOLS=rdepend
 
 inherit distutils-r1
@@ -16,8 +16,12 @@ SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
 IUSE="doc"
 
-# TODO: restore numpy when python2.7 is gone
-#BDEPEND="test? ( dev-python/numpy[${PYTHON_USEDEP}] )"
+BDEPEND="
+	test? (
+		$(python_gen_cond_dep '
+			dev-python/numpy[${PYTHON_USEDEP}]
+		' 'python*')
+	)"
 
 distutils_enable_tests pytest
 distutils_enable_sphinx docs dev-python/sphinx-bootstrap-theme
@@ -25,6 +29,7 @@ distutils_enable_sphinx docs dev-python/sphinx-bootstrap-theme
 PATCHES=(
 	"${FILESDIR}"/${P}-tests.patch
 	"${FILESDIR}"/${P}-py39.patch
+	"${FILESDIR}"/${P}-py39-fileurl.patch
 )
 
 python_prepare_all() {


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/future/, dev-python/future/files/
@ 2021-08-20  7:44 Arthur Zamarin
  0 siblings, 0 replies; 4+ messages in thread
From: Arthur Zamarin @ 2021-08-20  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     11efb934eb4327332e39514e76f89334ee9f8718
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 20 07:22:36 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 20 07:43:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11efb934

dev-python/future: enable py3.10

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 dev-python/future/files/future-0.18.2-py3.10.patch | 29 ++++++++++++++++++++++
 dev-python/future/future-0.18.2-r1.ebuild          | 16 ++++++------
 2 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/dev-python/future/files/future-0.18.2-py3.10.patch b/dev-python/future/files/future-0.18.2-py3.10.patch
new file mode 100644
index 00000000000..65cbc8e7a40
--- /dev/null
+++ b/dev-python/future/files/future-0.18.2-py3.10.patch
@@ -0,0 +1,29 @@
+From ca1362a4250b7124d9ae03506eb80a767f06e282 Mon Sep 17 00:00:00 2001
+From: Arthur Zamarin <arthurzam@gentoo.org>
+Date: Fri, 20 Aug 2021 10:15:59 +0300
+Subject: [PATCH] Fix for Python3.10
+
+Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
+---
+ src/future/moves/test/support.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/future/moves/test/support.py b/src/future/moves/test/support.py
+index e9aa0f4..4ae2ffd 100644
+--- a/src/future/moves/test/support.py
++++ b/src/future/moves/test/support.py
+@@ -3,6 +3,11 @@ from future.standard_library import suspend_hooks
+ from future.utils import PY3
+ 
+ if PY3:
++    try:
++        from test.support.os_helper import *
++        from test.support.warnings_helper import *
++    except ImportError:
++        pass
+     from test.support import *
+ else:
+     __future_module__ = True
+-- 
+2.33.0
+

diff --git a/dev-python/future/future-0.18.2-r1.ebuild b/dev-python/future/future-0.18.2-r1.ebuild
index 653a507983c..ab4b1b6f3c4 100644
--- a/dev-python/future/future-0.18.2-r1.ebuild
+++ b/dev-python/future/future-0.18.2-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..9} pypy3 )
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
 inherit distutils-r1
 
 DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
@@ -13,7 +13,6 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 LICENSE="MIT"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="doc"
 
 BDEPEND="
 	test? (
@@ -29,13 +28,12 @@ PATCHES=(
 	"${FILESDIR}"/${P}-tests.patch
 	"${FILESDIR}"/${P}-py39.patch
 	"${FILESDIR}"/${P}-py39-fileurl.patch
+	"${FILESDIR}"/${P}-py3.10.patch
 )
 
-python_prepare_all() {
+EPYTEST_DESELECT=(
 	# tests requiring network access
-	rm tests/test_future/test_requests.py || die
-	sed -i -e 's:test.*request_http:_&:' \
-		tests/test_future/test_standard_library.py || die
-
-	distutils-r1_python_prepare_all
-}
+	tests/test_future/test_requests.py
+	tests/test_future/test_standard_library.py::TestStandardLibraryReorganization::test_moves_urllib_request_http
+	tests/test_future/test_standard_library.py::TestStandardLibraryReorganization::test_urllib_request_http
+)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/future/, dev-python/future/files/
@ 2022-12-24  6:40 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-12-24  6:40 UTC (permalink / raw
  To: gentoo-commits

commit:     34253f1de1ae27affcf1f7fc05440506638b9650
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 06:33:55 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 06:40:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34253f1d

dev-python/future: Patch ReDoS copied from stdlib

Bug: https://bugs.gentoo.org/888109
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/future-0.18.2-cve-2022-40899.patch       | 52 ++++++++++++++++++++++
 ...re-0.18.2-r2.ebuild => future-0.18.2-r3.ebuild} | 11 ++++-
 2 files changed, 61 insertions(+), 2 deletions(-)

diff --git a/dev-python/future/files/future-0.18.2-cve-2022-40899.patch b/dev-python/future/files/future-0.18.2-cve-2022-40899.patch
new file mode 100644
index 000000000000..c7341e0d6fdb
--- /dev/null
+++ b/dev-python/future/files/future-0.18.2-cve-2022-40899.patch
@@ -0,0 +1,52 @@
+From c91d70b34ef0402aef3e9d04364ba98509dca76f Mon Sep 17 00:00:00 2001
+From: Will Shanks <wshaos@posteo.net>
+Date: Fri, 23 Dec 2022 13:38:26 -0500
+Subject: [PATCH] Backport fix for bpo-38804
+
+The regex http.cookiejar.LOOSE_HTTP_DATE_RE was vulnerable to regular
+expression denial of service (REDoS). The regex contained multiple
+overlapping \s* capture groups. A long sequence of spaces can trigger
+bad performance.
+
+See https://github.com/python/cpython/pull/17157 and https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
+---
+ src/future/backports/http/cookiejar.py | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/src/future/backports/http/cookiejar.py b/src/future/backports/http/cookiejar.py
+index af3ef415..0ad80a02 100644
+--- a/src/future/backports/http/cookiejar.py
++++ b/src/future/backports/http/cookiejar.py
+@@ -225,10 +225,14 @@ def _str2time(day, mon, yr, hr, min, sec, tz):
+        (?::(\d\d))?    # optional seconds
+     )?                 # optional clock
+        \s*
+-    ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone
++    (?:
++       ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+) # timezone
++       \s*
++    )?
++    (?:
++       \(\w+\)         # ASCII representation of timezone in parens.
+        \s*
+-    (?:\(\w+\))?       # ASCII representation of timezone in parens.
+-       \s*$""", re.X | re.ASCII)
++    )?$""", re.X | re.ASCII)
+ def http2time(text):
+     """Returns time in seconds since epoch of time represented by a string.
+ 
+@@ -298,9 +302,11 @@ def http2time(text):
+       (?::?(\d\d(?:\.\d*)?))?  # optional seconds (and fractional)
+    )?                    # optional clock
+       \s*
+-   ([-+]?\d\d?:?(:?\d\d)?
+-    |Z|z)?               # timezone  (Z is "zero meridian", i.e. GMT)
+-      \s*$""", re.X | re. ASCII)
++   (?:
++      ([-+]?\d\d?:?(:?\d\d)?
++       |Z|z)             # timezone  (Z is "zero meridian", i.e. GMT)
++      \s*
++   )?$""", re.X | re. ASCII)
+ def iso2time(text):
+     """
+     As for http2time, but parses the ISO 8601 formats:

diff --git a/dev-python/future/future-0.18.2-r2.ebuild b/dev-python/future/future-0.18.2-r3.ebuild
similarity index 86%
rename from dev-python/future/future-0.18.2-r2.ebuild
rename to dev-python/future/future-0.18.2-r3.ebuild
index 1558c0ea92ce..a05bf7f207d5 100644
--- a/dev-python/future/future-0.18.2-r2.ebuild
+++ b/dev-python/future/future-0.18.2-r3.ebuild
@@ -5,10 +5,15 @@ EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
 inherit distutils-r1
 
 DESCRIPTION="Easy, clean, reliable Python 2/3 compatibility"
-HOMEPAGE="https://python-future.org/"
+HOMEPAGE="
+	https://python-future.org/
+	https://github.com/PythonCharmers/python-future/
+	https://pypi.org/project/future/
+"
 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
 
 LICENSE="MIT"
@@ -20,7 +25,8 @@ BDEPEND="
 		$(python_gen_cond_dep '
 			dev-python/numpy[${PYTHON_USEDEP}]
 		' 'python*')
-	)"
+	)
+"
 
 distutils_enable_tests pytest
 distutils_enable_sphinx docs dev-python/sphinx-bootstrap-theme
@@ -30,6 +36,7 @@ PATCHES=(
 	"${FILESDIR}"/${P}-py39.patch
 	"${FILESDIR}"/${P}-py39-fileurl.patch
 	"${FILESDIR}"/${P}-py3.10.patch
+	"${FILESDIR}"/${P}-cve-2022-40899.patch
 )
 
 EPYTEST_DESELECT=(


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-24  6:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-20  7:44 [gentoo-commits] repo/gentoo:master commit in: dev-python/future/, dev-python/future/files/ Arthur Zamarin
  -- strict thread matches above, loose matches on Subject: below --
2022-12-24  6:40 Michał Górny
2021-06-10  7:25 Michał Górny
2019-05-01  9:11 David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox