public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2016-01-21 11:43 Justin Lecher
  0 siblings, 0 replies; 10+ messages in thread
From: Justin Lecher @ 2016-01-21 11:43 UTC (permalink / raw
  To: gentoo-commits

commit:     9845166beac8a03a2ad89cd22ed3c5356cba3f49
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 10:22:40 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 11:43:47 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9845166b

dev-python/urllib3: Unbundle system libs

Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 .../urllib3/files/urllib3-1.13.1-unbundle.patch    | 16 +++++++++++
 ...lib3-1.13.1.ebuild => urllib3-1.13.1-r1.ebuild} | 33 ++++++++++++++++++++--
 2 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch b/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
new file mode 100644
index 0000000..76ea5b7
--- /dev/null
+++ b/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
@@ -0,0 +1,16 @@
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 0a2dac3..b7ad412 100644
+--- a/setup.py
++++ b/setup.py
+@@ -42,7 +42,7 @@ setup(name='urllib3',
+       url='http://urllib3.readthedocs.org/',
+       license='MIT',
+       packages=['urllib3',
+-                'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
++                'urllib3.packages',
+                 'urllib3.contrib', 'urllib3.util',
+                 ],
+       requires=[],

diff --git a/dev-python/urllib3/urllib3-1.13.1.ebuild b/dev-python/urllib3/urllib3-1.13.1-r1.ebuild
similarity index 74%
rename from dev-python/urllib3/urllib3-1.13.1.ebuild
rename to dev-python/urllib3/urllib3-1.13.1-r1.ebuild
index ba3e423..bc38d98 100644
--- a/dev-python/urllib3/urllib3-1.13.1.ebuild
+++ b/dev-python/urllib3/urllib3-1.13.1-r1.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
 PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
+PYTHON_REQ_USE="ssl(+)"
 
 inherit distutils-r1
 
@@ -39,6 +40,8 @@ DEPEND="
 
 # Testsuite written requiring mock to be installed under all Cpythons
 
+PATCHES=( "${FILESDIR}"/${P}-unbundle.patch )
+
 python_prepare_all() {
 	# Replace bundled copy of dev-python/six
 	cat > urllib3/packages/six.py <<-EOF
@@ -46,6 +49,25 @@ python_prepare_all() {
 		from six import *
 	EOF
 
+	cat > urllib3/contrib/pyopenssl.py <<- EOF
+		from __future__ import absolute_import
+		from pyopenssl import *
+	EOF
+
+	rm -r urllib3/packages/ssl_match_hostname || die
+	cat > urllib3/packages/ssl_match_hostname.py <<- EOF
+		from __future__ import absolute_import
+		try:
+		    from backports.ssl_match_hostname import CertificateError, match_hostname
+		except ImportError:
+		    from ssl import CertificateError, match_hostname
+	EOF
+
+	cat > urllib3/packages/ordered_dict.py <<- EOF
+		from __future__ import absolute_import
+		from collections import OrderedDict
+	EOF
+
 	sed \
 		-e 's:\.packages\.six:six:g' \
 		-e 's:\.six:six:g' \
@@ -79,7 +101,12 @@ python_test() {
 
 	[[ "${EPYTHON}" == pypy ]] && return
 
-	nosetests -v test || die "Tests fail with ${EPYTHON}"
+	nosetests -v \
+		--exclude test_headerdict \
+		--exclude test_headers \
+		--exclude test_source_address_error \
+		--exclude test_no_ssl \
+		test || die "Tests fail with ${EPYTHON}"
 }
 
 python_install_all() {


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2017-05-03 11:02 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2017-05-03 11:02 UTC (permalink / raw
  To: gentoo-commits

commit:     f120dc48b20a67bda8466aaf41e3880851c81854
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed May  3 10:34:33 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May  3 11:02:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f120dc48

dev-python/urllib3: Clean old versions up

 dev-python/urllib3/Manifest                        |  1 -
 .../urllib3/files/urllib3-1.13.1-unbundle.patch    | 16 ------
 dev-python/urllib3/urllib3-1.19.1.ebuild           | 61 ----------------------
 3 files changed, 78 deletions(-)

diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index 02a35a1ee52..c18a3d27003 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,4 +1,3 @@
 DIST urllib3-1.12.tar.gz 151072 SHA256 0ea512776971fe4e76192600fe41e4e7ee96b4b9a5b15aefc1ac31d2a63872c6 SHA512 44f1cf9c5d5538e35d026551a2d1dc7119786c1148b9a769fa9f652f0368e996512962c6245c92d1f4bb1d8e816e2fb0ffebeb0060b01f92b2a5d6e01d15426f WHIRLPOOL d386e4fb47b2ea4d78d2ad690c9252d6be1b3f5a624e20670e22c9b3a28dc910e3d5ecd24ca54d8f8337f8e9a9875208efce06952cd392d9c8254257eadeee70
 DIST urllib3-1.16.tar.gz 179763 SHA256 63d479478ddfc83bbc11577dc16d47835c5179ac13e550118ca143b62c4bf9ab SHA512 646b35a9a4490b2d1f068883a29cbb5be5050a6eea7bb7842f77cd666b7f88101a7612e8eb45ae0eb900d914518db5202f548ab688b8db1c20ed248ba2edac66 WHIRLPOOL a4a813a5fc560a1487a87e492185122ffe8a41ba263e3c5e5962a48b9f4577a6360fa5d47d474f3c97a56e7ef99b2854c0f742075c05b88461f41d69e10c7a04
-DIST urllib3-1.19.1.tar.gz 187416 SHA256 53bc34c8ee268c3bd83ecf5e9c80fa783f3148484579bd4e20f4a7c1bb2dd6a0 SHA512 a23ce0dec72dd080a355a5dfde1886b7e831314785302d2dbb67db645e25d8a175169a2ed80534657ce0376bd6d38294d4cd479c9142324b179c7607cfe5d13b WHIRLPOOL 2e1b3c71476404a39750c19efd91678398ff3f3bc9f499be3b7af5ba095dac4a2158edaa5b9f4a0906c79cb83d55d77c414715df1beff85a038b148ee7c59674
 DIST urllib3-1.20.tar.gz 201873 SHA256 97ef2b6e2878d84c0126b9f4e608e37a951ca7848e4855a7f7f4437d5c34a72f SHA512 5e2c960ad8641b7e7faf3df966ceb5a2fbb898d9fb4d4459ba607448bab096e3d5df6bc42fdf5fbc2ea58fb6199ba3eb16613b63fd109401d6a2b6e46aade6c3 WHIRLPOOL 30938f71f77e300c9ccc050b6b1f071941db644b5c34ceba262fa839659a7d9655fe22bc867e63edde5dbae790a4505cbea370962cc495700d6b1c6b40c2b98a

diff --git a/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch b/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
deleted file mode 100644
index 76ea5b7b69d..00000000000
--- a/dev-python/urllib3/files/urllib3-1.13.1-unbundle.patch
+++ /dev/null
@@ -1,16 +0,0 @@
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 0a2dac3..b7ad412 100644
---- a/setup.py
-+++ b/setup.py
-@@ -42,7 +42,7 @@ setup(name='urllib3',
-       url='http://urllib3.readthedocs.org/',
-       license='MIT',
-       packages=['urllib3',
--                'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
-+                'urllib3.packages',
-                 'urllib3.contrib', 'urllib3.util',
-                 ],
-       requires=[],

diff --git a/dev-python/urllib3/urllib3-1.19.1.ebuild b/dev-python/urllib3/urllib3-1.19.1.ebuild
deleted file mode 100644
index 760d25a6597..00000000000
--- a/dev-python/urllib3/urllib3-1.19.1.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-fbsd ~x86-linux"
-IUSE="doc test"
-RESTRICT="test"
-
-RDEPEND="
-	>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
-	virtual/python-ipaddress[${PYTHON_USEDEP}]
-"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
-		>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
-		>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
-	)
-	doc? (
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_compile_all() {
-	use doc && emake -C docs SPHINXOPTS= html
-}
-
-python_test() {
-	# FIXME: get tornado ported
-	if [[ ${EPYTHON} == python* ]]; then
-		nosetests -v test || die "Testing failed with ${EPYTHON}"
-	fi
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-
-	distutils-r1_python_install_all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2018-01-06 14:13 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2018-01-06 14:13 UTC (permalink / raw
  To: gentoo-commits

commit:     5e7f79ca19a545aa0489e2b6c1df63008a772719
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  6 13:49:45 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan  6 14:13:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e7f79ca

dev-python/urllib3: Clean old up

 dev-python/urllib3/Manifest                        |   3 -
 .../urllib3/files/urllib3-1.16.0-unbundle.patch    |  17 ----
 dev-python/urllib3/urllib3-1.12.ebuild             |  88 ----------------
 dev-python/urllib3/urllib3-1.16.ebuild             | 113 ---------------------
 dev-python/urllib3/urllib3-1.20.ebuild             |  61 -----------
 5 files changed, 282 deletions(-)

diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index 6c53f5a0983..dda22c47eda 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,5 +1,2 @@
-DIST urllib3-1.12.tar.gz 151072 BLAKE2B 28ea69d758103d82498f85dbc3ade097503445215c4be48d33ef5fcc3c432f25fc33b2aa6fe44ad052722be163a883253fc8585ed8f06e5bcec3b50ce9066f6e SHA512 44f1cf9c5d5538e35d026551a2d1dc7119786c1148b9a769fa9f652f0368e996512962c6245c92d1f4bb1d8e816e2fb0ffebeb0060b01f92b2a5d6e01d15426f
-DIST urllib3-1.16.tar.gz 179763 BLAKE2B 5dd8d988671c2d0ad64351da7f6824e2c87134694f973b8d970f09d18f7688150d1e29c61f679c1fa9cffb90f564a355bc0b4333f00b0e08866f4daa157a7c7f SHA512 646b35a9a4490b2d1f068883a29cbb5be5050a6eea7bb7842f77cd666b7f88101a7612e8eb45ae0eb900d914518db5202f548ab688b8db1c20ed248ba2edac66
-DIST urllib3-1.20.tar.gz 201873 BLAKE2B 5c08abee5353ad17efc3396418f2322d0841c972d7e0d749057dee9f7b3ec6c414692f892cac026edc98ffd5ded430bbdfbdeecbfa8cac413dc147a984f4aadb SHA512 5e2c960ad8641b7e7faf3df966ceb5a2fbb898d9fb4d4459ba607448bab096e3d5df6bc42fdf5fbc2ea58fb6199ba3eb16613b63fd109401d6a2b6e46aade6c3
 DIST urllib3-1.21.1.tar.gz 224266 BLAKE2B 35f521698c0b05fc9122650dde5ac00954eb2ad99ea3771d2a9e4fcb210b404a8173ee369f46b5e61ef7104621571386ad114c833522748b96294a87d0afa601 SHA512 0d2e9c2a0b895e4e232cad5ecc645ea9fd9b70191df045a220ee1f32e284c613c6790bcdfd9e40a22ea9d25ec397278fa700a3c3747e7b04222719d50df07859
 DIST urllib3-1.22.tar.gz 226083 BLAKE2B 6d3067ea1c9c90e2e759e6319115ed3d29ca1e31c4d1721d7e7aeed432ea4df22635d92fdb9ea91a411bbe67c72160abaa19e0d42870be0b0a866c003db6ec62 SHA512 132b69d7f390916bdcde66d46fbf0189d0c1f976f91778dcb0a9ef8174487b7bb4b37b9139e84f7c70234803be95284448aba0b820f3b54530c0c497ca7a1dc9

diff --git a/dev-python/urllib3/files/urllib3-1.16.0-unbundle.patch b/dev-python/urllib3/files/urllib3-1.16.0-unbundle.patch
deleted file mode 100644
index 9a8a11e4a77..00000000000
--- a/dev-python/urllib3/files/urllib3-1.16.0-unbundle.patch
+++ /dev/null
@@ -1,17 +0,0 @@
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 0a2dac3..b7ad412 100644
---- a/setup.py
-+++ b/setup.py
-@@ -42,7 +42,7 @@ setup(name='urllib3',
-       url='http://urllib3.readthedocs.org/',
-       license='MIT',
-       packages=['urllib3',
--                'urllib3.packages', 'urllib3.packages.ssl_match_hostname',
-+                'urllib3.packages',
-                 'urllib3.packages.backports', 'urllib3.contrib',
-                 'urllib3.util',
-                 ],
-       requires=[],

diff --git a/dev-python/urllib3/urllib3-1.12.ebuild b/dev-python/urllib3/urllib3-1.12.ebuild
deleted file mode 100644
index be217fa8403..00000000000
--- a/dev-python/urllib3/urllib3-1.12.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh ~sparc x86"
-IUSE="doc test"
-
-RDEPEND="
-	dev-python/certifi[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep 'dev-python/backports-ssl-match-hostname[${PYTHON_USEDEP}]' python2_7 pypy)
-	$(python_gen_cond_dep 'dev-python/pyopenssl[${PYTHON_USEDEP}]' python2_7 pypy)
-	$(python_gen_cond_dep 'dev-python/ndg-httpsclient[${PYTHON_USEDEP}]' python2_7 pypy)
-	$(python_gen_cond_dep 'dev-python/pyasn1[${PYTHON_USEDEP}]' python2_7 pypy)
-	"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
-		>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
-		>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
-	)
-	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
-	"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_prepare_all() {
-	# Replace bundled copy of dev-python/six
-	cat > urllib3/packages/six.py <<-EOF
-		from __future__ import absolute_import
-		from six import *
-	EOF
-
-	sed \
-		-e 's:\.packages\.six:six:g' \
-		-e 's:\.six:six:g' \
-		-i urllib3/util/response.py urllib3/response.py || die
-
-	sed -i '/cover-min-percentage/d' setup.cfg || die
-	# Fix tests
-	sed -i 's/urllib3.packages.six/six/' test/test_retry.py || die
-
-	# Reset source of objects.inv
-	if use doc; then
-		local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
-		local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
-		local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
-		local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
-		sed \
-			-e "s|'python': ('http://docs.python.org/2.7', None|'${PYTHON_DOC}': ('${PYTHON_DOC_INVENTORY}'|" \
-			-i docs/conf.py || die
-	fi
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && emake -C docs html
-}
-
-python_test() {
-	# Failures still occur under py2.7.
-	# https://github.com/shazow/urllib3/issues/621
-
-	[[ "${EPYTHON}" == pypy ]] && return
-
-	nosetests -v test || die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/urllib3/urllib3-1.16.ebuild b/dev-python/urllib3/urllib3-1.16.ebuild
deleted file mode 100644
index cc6e64ff750..00000000000
--- a/dev-python/urllib3/urllib3-1.16.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc test"
-
-RDEPEND="
-	dev-python/PySocks[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	dev-python/six[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	$(python_gen_cond_dep 'dev-python/backports-ssl-match-hostname[${PYTHON_USEDEP}]' python2_7 pypy)
-	$(python_gen_cond_dep 'dev-python/ndg-httpsclient[${PYTHON_USEDEP}]' python2_7 pypy)
-	$(python_gen_cond_dep 'dev-python/pyasn1[${PYTHON_USEDEP}]' python2_7 pypy)
-	"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
-		>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
-		>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
-	)
-	doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
-	"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-PATCHES=( "${FILESDIR}"/${PN}-1.16.0-unbundle.patch )
-
-python_prepare_all() {
-	# Replace bundled copy of dev-python/six
-	cat > urllib3/packages/six.py <<-EOF
-		from __future__ import absolute_import
-		from six import *
-	EOF
-
-	rm -r urllib3/packages/ssl_match_hostname || die
-	cat > urllib3/packages/ssl_match_hostname.py <<- EOF
-		from __future__ import absolute_import
-		try:
-		    from backports.ssl_match_hostname import CertificateError, match_hostname
-		except ImportError:
-		    from ssl import CertificateError, match_hostname
-	EOF
-
-	cat > urllib3/packages/ordered_dict.py <<- EOF
-		from __future__ import absolute_import
-		from collections import OrderedDict
-	EOF
-
-	sed \
-		-e 's:\.packages\.six:six:g' \
-		-e 's:\.six:six:g' \
-		-i urllib3/util/response.py urllib3/response.py || die
-
-	sed -i '/cover-min-percentage/d' setup.cfg || die
-	# Fix tests
-	sed -i 's/urllib3.packages.six/six/' test/test_retry.py || die
-
-	# Reset source of objects.inv
-	if use doc; then
-		local PYTHON_DOC_ATOM=$(best_version --host-root dev-python/python-docs:2.7)
-		local PYTHON_DOC_VERSION="${PYTHON_DOC_ATOM#dev-python/python-docs-}"
-		local PYTHON_DOC="/usr/share/doc/python-docs-${PYTHON_DOC_VERSION}/html"
-		local PYTHON_DOC_INVENTORY="${PYTHON_DOC}/objects.inv"
-		sed \
-			-e "s|'python': ('http://docs.python.org/2.7', None|'${PYTHON_DOC}': ('${PYTHON_DOC_INVENTORY}'|" \
-			-i docs/conf.py || die
-	fi
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && emake -C docs html
-}
-
-python_test() {
-	# Failures still occur under py2.7.
-	# https://github.com/shazow/urllib3/issues/621
-
-	[[ "${EPYTHON}" == pypy ]] && return
-
-	nosetests -v \
-		--exclude test_headerdict \
-		--exclude test_headers \
-		--exclude test_source_address_error \
-		--exclude test_no_ssl \
-		--exclude test_ca_dir_verified \
-		--exclude test_verified \
-		test || die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/urllib3/urllib3-1.20.ebuild b/dev-python/urllib3/urllib3-1.20.ebuild
deleted file mode 100644
index 7ccaed36684..00000000000
--- a/dev-python/urllib3/urllib3-1.20.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="doc test"
-RESTRICT="test"
-
-RDEPEND="
-	>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	>=dev-python/idna-2.0[${PYTHON_USEDEP}]
-	virtual/python-ipaddress[${PYTHON_USEDEP}]
-"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
-		>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
-		>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
-	)
-	doc? (
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_compile_all() {
-	use doc && emake -C docs SPHINXOPTS= html
-}
-
-python_test() {
-	# FIXME: get tornado ported
-	if [[ ${EPYTHON} == python* ]]; then
-		nosetests -v test || die "Testing failed with ${EPYTHON}"
-	fi
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-
-	distutils-r1_python_install_all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2019-08-16 13:50 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2019-08-16 13:50 UTC (permalink / raw
  To: gentoo-commits

commit:     dfd9b99758aa243e6d0f3e950f6ee8cf6fb1f76e
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 15 19:50:29 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug 16 13:40:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfd9b997

dev-python/urllib3: Clean old up

Bug: https://bugs.gentoo.org/683890
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/12719
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/urllib3/Manifest                        |  3 -
 .../urllib3/files/urllib3-1.23-tornado5.patch      | 72 ----------------------
 dev-python/urllib3/urllib3-1.22.ebuild             | 63 -------------------
 dev-python/urllib3/urllib3-1.23.ebuild             | 72 ----------------------
 dev-python/urllib3/urllib3-1.24.1.ebuild           | 67 --------------------
 5 files changed, 277 deletions(-)

diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index 3013380bd0a..233ac6c6a3e 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,4 +1 @@
-DIST urllib3-1.22.tar.gz 226083 BLAKE2B 6d3067ea1c9c90e2e759e6319115ed3d29ca1e31c4d1721d7e7aeed432ea4df22635d92fdb9ea91a411bbe67c72160abaa19e0d42870be0b0a866c003db6ec62 SHA512 132b69d7f390916bdcde66d46fbf0189d0c1f976f91778dcb0a9ef8174487b7bb4b37b9139e84f7c70234803be95284448aba0b820f3b54530c0c497ca7a1dc9
-DIST urllib3-1.23.tar.gz 228314 BLAKE2B 63cd0ed046ade8b775067df92f3589bdfa21788481292724ec6af85b5789cc990cd267e1a0dfd925529d147441232a89b4f1b23a1276fc7a68a7047cbf2ae8a4 SHA512 6baa76ad3bebc639d7ec0a042d809fba7ef3110de6164a321756389c250e218728d178708611049d91f39d17f24b8b08585edb2f2c260c987bd4c7204e0c0b5f
-DIST urllib3-1.24.1.tar.gz 229688 BLAKE2B ee72e61d417ef266af43b5c4d3eb0b154eac41a392b0a7e9d19523fdb00786b60f8067a8e876c1b7813b127431b1625b1480d9812d623a6d3c540a8ecf646242 SHA512 4c12d08076b0f260727d5aac780f5e9a24e0164755ff05b02a1f5a697876741ff13ba278fdd6e46ef678e8e1146bc39de1fc49ee10ee839229a70540a9424a99
 DIST urllib3-1.24.2.tar.gz 230699 BLAKE2B 9c2f2be8fa743f542493d75072c02423d1bd40189561fa0ea393a8a2515b24da9a2a383aeec35b55bdd2a9954d3d585450d759548358ed91ecfdb9ec03d391b6 SHA512 9939e9e7c4da30b5effb334969cd835c9d0404a136761098203c699570aab02e63fb3f1b4ab680def0bc0906fabe5f0782ab94cf3095ff10ccf9b3c371653cf2

diff --git a/dev-python/urllib3/files/urllib3-1.23-tornado5.patch b/dev-python/urllib3/files/urllib3-1.23-tornado5.patch
deleted file mode 100644
index b5224564c56..00000000000
--- a/dev-python/urllib3/files/urllib3-1.23-tornado5.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From f8c3e96df731eccda202e0dc909f0a51cdc41267 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 14 Jul 2018 12:21:50 +0200
-Subject: [PATCH] dummyserver: Update for tornado-5 API changes
-
-Tornado 5 has apparently removed support for multiple IOLoops,
-and appropriately removed the io_loop parameter to the server class
-in favor of using IOLoop.current().  Update the tests to use the latter.
-The code remains compatible with tornado-4.
----
- dummyserver/server.py   | 9 +++++----
- dummyserver/testcase.py | 4 ++--
- 2 files changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/dummyserver/server.py b/dummyserver/server.py
-index e1745b7..3ba5124 100755
---- a/dummyserver/server.py
-+++ b/dummyserver/server.py
-@@ -226,15 +226,16 @@ def bind_sockets(port, address=None, family=socket.AF_UNSPEC, backlog=128,
- 
- 
- def run_tornado_app(app, io_loop, certs, scheme, host):
-+    assert io_loop == tornado.ioloop.IOLoop.current()
-+
-     # We can't use fromtimestamp(0) because of CPython issue 29097, so we'll
-     # just construct the datetime object directly.
-     app.last_req = datetime(1970, 1, 1)
- 
-     if scheme == 'https':
--        http_server = tornado.httpserver.HTTPServer(app, ssl_options=certs,
--                                                    io_loop=io_loop)
-+        http_server = tornado.httpserver.HTTPServer(app, ssl_options=certs)
-     else:
--        http_server = tornado.httpserver.HTTPServer(app, io_loop=io_loop)
-+        http_server = tornado.httpserver.HTTPServer(app)
- 
-     sockets = bind_sockets(None, address=host)
-     port = sockets[0].getsockname()[1]
-@@ -268,7 +269,7 @@ if __name__ == '__main__':
-     from .testcase import TestingApp
-     host = '127.0.0.1'
- 
--    io_loop = tornado.ioloop.IOLoop()
-+    io_loop = tornado.ioloop.IOLoop.current()
-     app = tornado.web.Application([(r".*", TestingApp)])
-     server, port = run_tornado_app(app, io_loop, None,
-                                    'http', host)
-diff --git a/dummyserver/testcase.py b/dummyserver/testcase.py
-index f73f028..d9ff8cf 100644
---- a/dummyserver/testcase.py
-+++ b/dummyserver/testcase.py
-@@ -124,7 +124,7 @@ class HTTPDummyServerTestCase(unittest.TestCase):
- 
-     @classmethod
-     def _start_server(cls):
--        cls.io_loop = ioloop.IOLoop()
-+        cls.io_loop = ioloop.IOLoop.current()
-         app = web.Application([(r".*", TestingApp)])
-         cls.server, cls.port = run_tornado_app(app, cls.io_loop, cls.certs,
-                                                cls.scheme, cls.host)
-@@ -170,7 +170,7 @@ class HTTPDummyProxyTestCase(unittest.TestCase):
- 
-     @classmethod
-     def setUpClass(cls):
--        cls.io_loop = ioloop.IOLoop()
-+        cls.io_loop = ioloop.IOLoop.current()
- 
-         app = web.Application([(r'.*', TestingApp)])
-         cls.http_server, cls.http_port = run_tornado_app(
--- 
-2.18.0
-

diff --git a/dev-python/urllib3/urllib3-1.22.ebuild b/dev-python/urllib3/urllib3-1.22.ebuild
deleted file mode 100644
index 3536bcedb1e..00000000000
--- a/dev-python/urllib3/urllib3-1.22.ebuild
+++ /dev/null
@@ -1,63 +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} pypy{,3} )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris"
-IUSE="doc test"
-RESTRICT="test"
-
-RDEPEND="
-	>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
-	!~dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
-	virtual/python-ipaddress[${PYTHON_USEDEP}]
-"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		>=dev-python/mock-1.3.0[${PYTHON_USEDEP}]
-		>=dev-python/nose-1.3.7[${PYTHON_USEDEP}]
-		>=dev-python/nose-exclude-0.4.1[${PYTHON_USEDEP}]
-	)
-	doc? (
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_compile_all() {
-	use doc && emake -C docs SPHINXOPTS= html
-}
-
-python_test() {
-	# FIXME: get tornado ported
-	if [[ ${EPYTHON} == python* ]]; then
-		nosetests -v test || die "Testing failed with ${EPYTHON}"
-	fi
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/urllib3/urllib3-1.23.ebuild b/dev-python/urllib3/urllib3-1.23.ebuild
deleted file mode 100644
index 2d6c9670697..00000000000
--- a/dev-python/urllib3/urllib3-1.23.ebuild
+++ /dev/null
@@ -1,72 +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,7} pypy{,3} )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc test"
-#RESTRICT="test"
-
-RDEPEND="
-	>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
-	!~dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
-	virtual/python-ipaddress[${PYTHON_USEDEP}]
-"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		dev-python/pytest[${PYTHON_USEDEP}]
-	)
-	doc? (
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_prepare_all() {
-	local PATCHES=(
-		# support tornado-5
-		"${FILESDIR}"/urllib3-1.23-tornado5.patch
-	)
-
-	# skip appengine tests
-	rm -r test/appengine || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && emake -C docs SPHINXOPTS= html
-}
-
-python_test() {
-	# FIXME: get tornado ported
-	if [[ ${EPYTHON} == python* ]]; then
-		py.test -v || die "Tests fail with ${EPYTHON}"
-	fi
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/urllib3/urllib3-1.24.1.ebuild b/dev-python/urllib3/urllib3-1.24.1.ebuild
deleted file mode 100644
index 08d3d35b05c..00000000000
--- a/dev-python/urllib3/urllib3-1.24.1.ebuild
+++ /dev/null
@@ -1,67 +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,7} pypy{,3} )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/shazow/urllib3"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc test"
-#RESTRICT="test"
-
-RDEPEND="
-	>=dev-python/PySocks-1.5.6[${PYTHON_USEDEP}]
-	!~dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	dev-python/certifi[${PYTHON_USEDEP}]
-	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
-	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
-	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
-	virtual/python-ipaddress[${PYTHON_USEDEP}]
-"
-DEPEND="
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	test? (
-		${RDEPEND}
-		>=www-servers/tornado-4.2.1[$(python_gen_usedep 'python*')]
-		dev-python/pytest[${PYTHON_USEDEP}]
-	)
-	doc? (
-		dev-python/mock[${PYTHON_USEDEP}]
-		dev-python/sphinx[${PYTHON_USEDEP}]
-	)
-"
-
-# Testsuite written requiring mock to be installed under all Cpythons
-
-python_prepare_all() {
-	# skip appengine tests
-	rm -r test/appengine || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
-	use doc && emake -C docs SPHINXOPTS= html
-}
-
-python_test() {
-	# FIXME: get tornado ported
-	if [[ ${EPYTHON} == python* ]]; then
-		py.test -v || die "Tests fail with ${EPYTHON}"
-	fi
-}
-
-python_install_all() {
-	use doc && local HTML_DOCS=( docs/_build/html/. )
-	distutils-r1_python_install_all
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2020-12-02 10:51 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2020-12-02 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     7f754153e019367b53e721d9d9430435124ea90d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  2 10:10:40 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec  2 10:50:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f754153

dev-python/urllib3: Support dev-python/brotlicffi

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../urllib3/files/urllib3-1.26.2-brotlicffi.patch  | 65 ++++++++++++++++++++++
 dev-python/urllib3/urllib3-1.26.2-r1.ebuild        | 65 ++++++++++++++++++++++
 2 files changed, 130 insertions(+)

diff --git a/dev-python/urllib3/files/urllib3-1.26.2-brotlicffi.patch b/dev-python/urllib3/files/urllib3-1.26.2-brotlicffi.patch
new file mode 100644
index 00000000000..b7cbf9bb7e9
--- /dev/null
+++ b/dev-python/urllib3/files/urllib3-1.26.2-brotlicffi.patch
@@ -0,0 +1,65 @@
+From 14bcf7004a143f7a6fb2df9a48196a113d531f50 Mon Sep 17 00:00:00 2001
+From: Seth Michael Larson <sethmichaellarson@gmail.com>
+Date: Tue, 1 Dec 2020 20:09:32 -0600
+Subject: [PATCH] Switch to Brotli C bindings for CPython, brotlicffi for
+ non-CPython
+
+---
+ setup.cfg                   | 3 ++-
+ setup.py                    | 5 ++++-
+ src/urllib3/response.py     | 5 ++++-
+ src/urllib3/util/request.py | 5 ++++-
+ 7 files changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/setup.cfg b/setup.cfg
+index 90b79d8c5..31a465b58 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -15,7 +15,7 @@ requires-dist =
+     idna>=2.0.0; extra == 'secure'
+     certifi; extra == 'secure'
+     PySocks>=1.5.6,<2.0,!=1.5.7; extra == 'socks'
+-    brotlipy>=0.6.0; extra == 'brotli'
++    brotlicffi>=0.8.0; extra == 'brotli'
+ 
+ [tool:pytest]
+ xfail_strict = true
+diff --git a/setup.py b/setup.py
+index 2d449b095..02071aa58 100755
+--- a/setup.py
++++ b/setup.py
+@@ -109,7 +109,7 @@
+     requires=[],
+     python_requires=">=3.6, <4",
+     extras_require={
+-        "brotli": ["brotlipy>=0.6.0"],
++        "brotli": ["brotlicffi>=0.8.0"],
+         "secure": [
+             "pyOpenSSL>=0.14",
+             "cryptography>=1.3.4",
+diff --git a/src/urllib3/response.py b/src/urllib3/response.py
+index 77b6ffc16..d277120ee 100644
+--- a/src/urllib3/response.py
++++ b/src/urllib3/response.py
+@@ -7,7 +7,7 @@
+ from socket import timeout as SocketTimeout
+ 
+ try:
+-    import brotli
++    import brotlicffi as brotli
+ except ImportError:
+     brotli = None
+ 
+diff --git a/src/urllib3/util/request.py b/src/urllib3/util/request.py
+index 6cbdad9b4..64d40641d 100644
+--- a/src/urllib3/util/request.py
++++ b/src/urllib3/util/request.py
+@@ -11,7 +11,7 @@
+ 
+ ACCEPT_ENCODING = "gzip,deflate"
+ try:
+-    import brotli as _unused_module_brotli  # noqa: F401
++    import brotlicffi as _unused_module_brotli  # noqa: F401
+ except ImportError:
+     pass
+ else:

diff --git a/dev-python/urllib3/urllib3-1.26.2-r1.ebuild b/dev-python/urllib3/urllib3-1.26.2-r1.ebuild
new file mode 100644
index 00000000000..2345ae630e3
--- /dev/null
+++ b/dev-python/urllib3/urllib3-1.26.2-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="ssl(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
+HOMEPAGE="https://github.com/urllib3/urllib3"
+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 ~x64-macos"
+IUSE="brotli test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
+	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
+	dev-python/certifi[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
+	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
+	brotli? ( dev-python/brotlicffi[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+	test? (
+		$(python_gen_cond_dep "
+			${RDEPEND}
+			dev-python/brotlicffi[\${PYTHON_USEDEP}]
+			dev-python/mock[\${PYTHON_USEDEP}]
+			dev-python/pytest[\${PYTHON_USEDEP}]
+			dev-python/pytest-freezegun[\${PYTHON_USEDEP}]
+			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
+			>=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}]
+		" python3_{6,7,8,9})
+	)
+"
+
+python_prepare_all() {
+	# https://github.com/urllib3/urllib3/issues/1756
+	sed -e 's:10.255.255.1:240.0.0.0:' \
+		-i test/__init__.py || die
+	# tests failing if 'localhost.' cannot be resolved
+	sed -e 's:test_dotted_fqdn:_&:' \
+		-i test/with_dummyserver/test_https.py || die
+	sed -e 's:test_request_host_header_ignores_fqdn_dot:_&:' \
+		-i test/with_dummyserver/test_socketlevel.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_test() {
+	local -x CI=1
+	# FIXME: get tornado ported
+	case ${EPYTHON} in
+		python3*)
+			pytest -vv || die "Tests fail with ${EPYTHON}"
+			;;
+	esac
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2021-01-26 18:43 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2021-01-26 18:43 UTC (permalink / raw
  To: gentoo-commits

commit:     cef35aa3489a1db4ea56b44cad0beabb5b4c0051
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 26 16:23:24 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 18:43:08 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cef35aa3

dev-python/urllib3: Backport a fix for BytesWarning

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

 .../files/urllib3-1.26.2-byteswarning.patch        | 25 ++++++++
 dev-python/urllib3/urllib3-1.26.2-r2.ebuild        | 70 ++++++++++++++++++++++
 dev-python/urllib3/urllib3-1.26.2-r3.ebuild        | 70 ++++++++++++++++++++++
 3 files changed, 165 insertions(+)

diff --git a/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch b/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch
new file mode 100644
index 00000000000..dfa761c5631
--- /dev/null
+++ b/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch
@@ -0,0 +1,25 @@
+From bab9ca9f7148d6a7f15b83cfa1126bf1c8ceb17d Mon Sep 17 00:00:00 2001
+From: Quentin Pradet <quentin@pradet.me>
+Date: Tue, 26 Jan 2021 18:04:17 +0400
+Subject: [PATCH] Don't compare bytes and str in putheader()
+
+---
+ src/urllib3/connection.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py
+index 660d679c..387f3770 100644
+--- a/src/urllib3/connection.py
++++ b/src/urllib3/connection.py
+@@ -215,7 +215,7 @@ class HTTPConnection(_HTTPConnection, object):
+ 
+     def putheader(self, header, *values):
+         """"""
+-        if SKIP_HEADER not in values:
++        if not any(isinstance(v, str) and v == SKIP_HEADER for v in values):
+             _HTTPConnection.putheader(self, header, *values)
+         elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS:
+             raise ValueError(
+-- 
+2.30.0
+

diff --git a/dev-python/urllib3/urllib3-1.26.2-r2.ebuild b/dev-python/urllib3/urllib3-1.26.2-r2.ebuild
new file mode 100644
index 00000000000..d967a754ffa
--- /dev/null
+++ b/dev-python/urllib3/urllib3-1.26.2-r2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="ssl(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
+HOMEPAGE="https://github.com/urllib3/urllib3"
+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 ~riscv s390 sparc x86 ~x64-macos"
+IUSE="brotli test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
+	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
+	dev-python/certifi[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
+	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
+	brotli? ( dev-python/brotlipy[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+	test? (
+		$(python_gen_cond_dep "
+			${RDEPEND}
+			dev-python/brotlipy[\${PYTHON_USEDEP}]
+			dev-python/mock[\${PYTHON_USEDEP}]
+			dev-python/pytest[\${PYTHON_USEDEP}]
+			dev-python/pytest-freezegun[\${PYTHON_USEDEP}]
+			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
+			>=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}]
+		" python3_{6,7,8,9})
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-test_proxy_rejection-test-hang.patch"
+	"${FILESDIR}/${P}-byteswarning.patch"
+)
+
+python_prepare_all() {
+	# https://github.com/urllib3/urllib3/issues/1756
+	sed -e 's:10.255.255.1:240.0.0.0:' \
+		-i test/__init__.py || die
+	# tests failing if 'localhost.' cannot be resolved
+	sed -e 's:test_dotted_fqdn:_&:' \
+		-i test/with_dummyserver/test_https.py || die
+	sed -e 's:test_request_host_header_ignores_fqdn_dot:_&:' \
+		-i test/with_dummyserver/test_socketlevel.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_test() {
+	local -x CI=1
+	# FIXME: get tornado ported
+	case ${EPYTHON} in
+		python3*)
+			pytest -vv || die "Tests fail with ${EPYTHON}"
+			;;
+	esac
+}

diff --git a/dev-python/urllib3/urllib3-1.26.2-r3.ebuild b/dev-python/urllib3/urllib3-1.26.2-r3.ebuild
new file mode 100644
index 00000000000..28e11d23fe9
--- /dev/null
+++ b/dev-python/urllib3/urllib3-1.26.2-r3.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 )
+PYTHON_REQ_USE="ssl(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
+HOMEPAGE="https://github.com/urllib3/urllib3"
+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 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="brotli test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
+	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
+	dev-python/certifi[${PYTHON_USEDEP}]
+	>=dev-python/cryptography-1.3.4[${PYTHON_USEDEP}]
+	>=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
+	>=dev-python/idna-2.0.0[${PYTHON_USEDEP}]
+	brotli? ( dev-python/brotlicffi[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+	test? (
+		$(python_gen_cond_dep "
+			${RDEPEND}
+			dev-python/brotlicffi[\${PYTHON_USEDEP}]
+			dev-python/mock[\${PYTHON_USEDEP}]
+			dev-python/pytest[\${PYTHON_USEDEP}]
+			dev-python/pytest-freezegun[\${PYTHON_USEDEP}]
+			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
+			>=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}]
+		" python3_{6,7,8,9})
+	)
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-test_proxy_rejection-test-hang.patch"
+	"${FILESDIR}/${P}-byteswarning.patch"
+)
+
+python_prepare_all() {
+	# https://github.com/urllib3/urllib3/issues/1756
+	sed -e 's:10.255.255.1:240.0.0.0:' \
+		-i test/__init__.py || die
+	# tests failing if 'localhost.' cannot be resolved
+	sed -e 's:test_dotted_fqdn:_&:' \
+		-i test/with_dummyserver/test_https.py || die
+	sed -e 's:test_request_host_header_ignores_fqdn_dot:_&:' \
+		-i test/with_dummyserver/test_socketlevel.py || die
+
+	distutils-r1_python_prepare_all
+}
+
+python_test() {
+	local -x CI=1
+	# FIXME: get tornado ported
+	case ${EPYTHON} in
+		python3*)
+			pytest -vv || die "Tests fail with ${EPYTHON}"
+			;;
+	esac
+}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2021-05-19 18:21 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2021-05-19 18:21 UTC (permalink / raw
  To: gentoo-commits

commit:     7e47f4abab7f35dd056f9432e8a1eff2a7d08a5f
Author:     Ekaterina Vaartis <vaartis <AT> kotobank <DOT> ch>
AuthorDate: Sat May 15 22:37:32 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 19 18:21:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e47f4ab

dev-python/urllib3: bump to Python 3.10

Signed-off-by: Ekaterina Vaartis <vaartis <AT> kotobank.ch>
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/urllib3-1.26.4-test-ssltransport.patch   | 31 +++++++++++++++++++
 dev-python/urllib3/urllib3-1.26.4.ebuild           | 35 +++++++++++++++++++++-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch b/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch
new file mode 100644
index 00000000000..346574fec91
--- /dev/null
+++ b/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch
@@ -0,0 +1,31 @@
+diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py
+index 72b06b006..98682bd43 100644
+--- a/test/test_ssltransport.py
++++ b/test/test_ssltransport.py
+@@ -246,6 +246,7 @@ def proxy_handler(listener):
+                 )
+                 self._read_write_loop(client_sock, upstream_sock)
+                 upstream_sock.close()
++                client_sock.close()
+ 
+         self._start_server(proxy_handler)
+ 
+@@ -274,6 +275,10 @@ def _read_write_loop(self, client_sock, server_sock, chunks=65536):
+                 if write_socket in writable:
+                     try:
+                         b = read_socket.recv(chunks)
++                        if len(b) == 0:
++                            # One of the sockets has EOFed, we return to close
++                            # both.
++                            return
+                         write_socket.send(b)
+                     except ssl.SSLEOFError:
+                         # It's possible, depending on shutdown order, that we'll
+@@ -322,6 +327,7 @@ def socket_handler(listener):
+                 request = consume_socket(ssock)
+                 validate_request(request)
+                 ssock.send(sample_response())
++            sock.close()
+ 
+         cls._start_server(socket_handler)
+ 

diff --git a/dev-python/urllib3/urllib3-1.26.4.ebuild b/dev-python/urllib3/urllib3-1.26.4.ebuild
index c23d80a6ede..e0026885ab4 100644
--- a/dev-python/urllib3/urllib3-1.26.4.ebuild
+++ b/dev-python/urllib3/urllib3-1.26.4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7..9} pypy3 )
+PYTHON_COMPAT=( python3_{7..10} pypy3 )
 PYTHON_REQ_USE="ssl(+)"
 
 inherit distutils-r1
@@ -40,6 +40,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${P}-test-ssltransport.patch"
+)
+
 python_prepare_all() {
 	# tests failing if 'localhost.' cannot be resolved
 	sed -e 's:test_dotted_fqdn:_&:' \
@@ -54,11 +58,40 @@ python_test() {
 	local -x CI=1
 	# FIXME: get tornado ported
 	[[ ${EPYTHON} == python3* ]] || continue
+	# tests skipped for now
+	[[ ${EPYTHON} == python3.10 ]] && continue
 
 	local deselect=(
 		# TODO?
 		test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
 	)
+	[[ "${EPYTHON}" == python3.10 ]] && deselect+=(
+		# Fail because they rely on warnings and there are new deprecation warnings in 3.10
+		test/with_dummyserver/test_https.py::TestHTTPS::test_verified
+		test/with_dummyserver/test_https.py::TestHTTPS::test_verified_with_context
+		test/with_dummyserver/test_https.py::TestHTTPS::test_context_combines_with_ca_certs
+		test/with_dummyserver/test_https.py::TestHTTPS::test_ca_dir_verified
+		test/with_dummyserver/test_https.py::TestHTTPS::test_ssl_correct_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS::test_ssl_wrong_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_verified
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_verified_with_context
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_context_combines_with_ca_certs
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ca_dir_verified
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ssl_correct_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ssl_wrong_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_default_tls_version_deprecations
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_no_tls_version_deprecation_with_ssl_version
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_no_tls_version_deprecation_with_ssl_context
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_verified
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_verified_with_context
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_context_combines_with_ca_certs
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ca_dir_verified
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ssl_correct_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ssl_wrong_system_time
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_default_tls_version_deprecations
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_no_tls_version_deprecation_with_ssl_version
+		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_no_tls_version_deprecation_with_ssl_context
+	)
 
 	epytest ${deselect[@]/#/--deselect }
 }


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

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

commit:     f47a46e8ba0bc6982eab353a5e69e8e143e7e2d7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 15 17:04:21 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 15 17:04:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f47a46e8

dev-python/urllib3: Remove old

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

 dev-python/urllib3/Manifest                        |  1 -
 .../files/urllib3-1.26.4-test-ssltransport.patch   | 31 -------
 dev-python/urllib3/urllib3-1.26.4.ebuild           | 97 ----------------------
 3 files changed, 129 deletions(-)

diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index 5e3859c6a5d..db0a9144498 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,3 +1,2 @@
-DIST urllib3-1.26.4.tar.gz 293008 BLAKE2B 6ca88861baa87814d3856cd0f1fa0a6cb9e11ee745c782b598c4f5fe74b195ba47e8430b993ed8a5fb269153d700e4a803cd2ebc177e20e3186b3b26612262c7 SHA512 daf2ba432f2e4edaa6aa8c6bdaaea21fcb77cc5fdfd991f89b1f753b4f9901faab04120841e9fa8d93e2bd3d72cbdb647f1492d882266b4e0281c725e8d55a7a
 DIST urllib3-1.26.5.tar.gz 292865 BLAKE2B 0b22a485635f70f198c022c13d03af2b1a9b6907276e3bc3acaa2242e1c632447762f86e9588e735462e6479ff93a172f458691ea9bf28ceaebd5e1cfbc55501 SHA512 4a1899b223b00894d49f6dff5fc95d410e5b0ab28c11f7e3cd82d03e50438b0c5b0adf693a33fd80f1586312dc0012836713998674da15531bf82d52645881f6
 DIST urllib3-1.26.6.tar.gz 289927 BLAKE2B 197b0df759b27fc4906c565426e9c7b533fad56f10695ab5ae6c6c4d05d5c889dba906be526d8b8f41405f29696046b7db6e2cbb2fa16843af80e072138cc35f SHA512 19eb4b88b7a575db717db420ff79b304769d9a6d2b576a236d69719101c4d52d6b0079bd049c885e630f0dfd60471f8bb33836847e0569652cddece910ec2979

diff --git a/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch b/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch
deleted file mode 100644
index 346574fec91..00000000000
--- a/dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py
-index 72b06b006..98682bd43 100644
---- a/test/test_ssltransport.py
-+++ b/test/test_ssltransport.py
-@@ -246,6 +246,7 @@ def proxy_handler(listener):
-                 )
-                 self._read_write_loop(client_sock, upstream_sock)
-                 upstream_sock.close()
-+                client_sock.close()
- 
-         self._start_server(proxy_handler)
- 
-@@ -274,6 +275,10 @@ def _read_write_loop(self, client_sock, server_sock, chunks=65536):
-                 if write_socket in writable:
-                     try:
-                         b = read_socket.recv(chunks)
-+                        if len(b) == 0:
-+                            # One of the sockets has EOFed, we return to close
-+                            # both.
-+                            return
-                         write_socket.send(b)
-                     except ssl.SSLEOFError:
-                         # It's possible, depending on shutdown order, that we'll
-@@ -322,6 +327,7 @@ def socket_handler(listener):
-                 request = consume_socket(ssock)
-                 validate_request(request)
-                 ssock.send(sample_response())
-+            sock.close()
- 
-         cls._start_server(socket_handler)
- 

diff --git a/dev-python/urllib3/urllib3-1.26.4.ebuild b/dev-python/urllib3/urllib3-1.26.4.ebuild
deleted file mode 100644
index e0026885ab4..00000000000
--- a/dev-python/urllib3/urllib3-1.26.4.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="https://github.com/urllib3/urllib3"
-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 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="brotli test"
-RESTRICT="!test? ( test )"
-
-# dev-python/{pyopenssl,cryptography,idna,certifi} are optional runtime
-# dependencies. Do not add them to RDEPEND. They should be unnecessary with
-# modern versions of python (>= 3.2).
-RDEPEND="
-	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	brotli? ( dev-python/brotlicffi[${PYTHON_USEDEP}] )
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep "
-			${RDEPEND}
-			dev-python/brotlicffi[\${PYTHON_USEDEP}]
-			dev-python/mock[\${PYTHON_USEDEP}]
-			dev-python/pytest[\${PYTHON_USEDEP}]
-			dev-python/pytest-freezegun[\${PYTHON_USEDEP}]
-			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
-			>=www-servers/tornado-4.2.1[\${PYTHON_USEDEP}]
-		" python3_{6,7,8,9})
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}/${P}-test-ssltransport.patch"
-)
-
-python_prepare_all() {
-	# tests failing if 'localhost.' cannot be resolved
-	sed -e 's:test_dotted_fqdn:_&:' \
-		-i test/with_dummyserver/test_https.py || die
-	sed -e 's:test_request_host_header_ignores_fqdn_dot:_&:' \
-		-i test/with_dummyserver/test_socketlevel.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-python_test() {
-	local -x CI=1
-	# FIXME: get tornado ported
-	[[ ${EPYTHON} == python3* ]] || continue
-	# tests skipped for now
-	[[ ${EPYTHON} == python3.10 ]] && continue
-
-	local deselect=(
-		# TODO?
-		test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
-	)
-	[[ "${EPYTHON}" == python3.10 ]] && deselect+=(
-		# Fail because they rely on warnings and there are new deprecation warnings in 3.10
-		test/with_dummyserver/test_https.py::TestHTTPS::test_verified
-		test/with_dummyserver/test_https.py::TestHTTPS::test_verified_with_context
-		test/with_dummyserver/test_https.py::TestHTTPS::test_context_combines_with_ca_certs
-		test/with_dummyserver/test_https.py::TestHTTPS::test_ca_dir_verified
-		test/with_dummyserver/test_https.py::TestHTTPS::test_ssl_correct_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS::test_ssl_wrong_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_verified
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_verified_with_context
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_context_combines_with_ca_certs
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ca_dir_verified
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ssl_correct_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_ssl_wrong_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_default_tls_version_deprecations
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_no_tls_version_deprecation_with_ssl_version
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_no_tls_version_deprecation_with_ssl_context
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_verified
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_verified_with_context
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_context_combines_with_ca_certs
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ca_dir_verified
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ssl_correct_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_ssl_wrong_system_time
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_default_tls_version_deprecations
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_no_tls_version_deprecation_with_ssl_version
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_3::test_no_tls_version_deprecation_with_ssl_context
-	)
-
-	epytest ${deselect[@]/#/--deselect }
-}


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2024-02-16 17:16 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2024-02-16 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4bb99762cc087e8130f069e2e8e8e5c73281601a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 16 17:08:15 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Feb 16 17:15:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bb99762

dev-python/urllib3: Backport pytest-8 fix

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../urllib3/files/urllib3-2.2.0-pytest-8.patch     | 112 +++++++++++++++++++++
 dev-python/urllib3/urllib3-2.2.0-r1.ebuild         |   2 +
 2 files changed, 114 insertions(+)

diff --git a/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch b/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch
new file mode 100644
index 000000000000..9baa3379a7c9
--- /dev/null
+++ b/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch
@@ -0,0 +1,112 @@
+From aa8d3dd2535cc125e123e5c2bca38738d6864b2a Mon Sep 17 00:00:00 2001
+From: Ruben Laguna <ruben.laguna@gmail.com>
+Date: Mon, 5 Feb 2024 15:29:35 +0100
+Subject: [PATCH] Fix ssl_version tests for upcoming migration to pytest 8
+
+---
+ dev-requirements.txt                |  2 +-
+ test/contrib/test_pyopenssl.py      |  1 -
+ test/with_dummyserver/test_https.py | 35 ++++++++++++++++++++---------
+ 3 files changed, 26 insertions(+), 12 deletions(-)
+
+diff --git a/test/contrib/test_pyopenssl.py b/test/contrib/test_pyopenssl.py
+index b4799ce802..eaca77ba6f 100644
+--- a/test/contrib/test_pyopenssl.py
++++ b/test/contrib/test_pyopenssl.py
+@@ -38,7 +38,6 @@ def teardown_module() -> None:
+ from ..test_ssl import TestSSL  # noqa: E402, F401
+ from ..test_util import TestUtilSSL  # noqa: E402, F401
+ from ..with_dummyserver.test_https import (  # noqa: E402, F401
+-    TestHTTPS,
+     TestHTTPS_IPV4SAN,
+     TestHTTPS_IPV6SAN,
+     TestHTTPS_TLSv1,
+diff --git a/test/with_dummyserver/test_https.py b/test/with_dummyserver/test_https.py
+index aa22f11879..b8353d758b 100644
+--- a/test/with_dummyserver/test_https.py
++++ b/test/with_dummyserver/test_https.py
+@@ -65,7 +65,7 @@
+ CLIENT_CERT = CLIENT_INTERMEDIATE_PEM
+ 
+ 
+-class TestHTTPS(HTTPSHypercornDummyServerTestCase):
++class BaseTestHTTPS(HTTPSHypercornDummyServerTestCase):
+     tls_protocol_name: str | None = None
+ 
+     def tls_protocol_not_default(self) -> bool:
+@@ -83,11 +83,17 @@ def tls_version(self) -> ssl.TLSVersion:
+     def ssl_version(self) -> int:
+         if self.tls_protocol_name is None:
+             return pytest.skip("Skipping base test class")
+-        attribute = f"PROTOCOL_{self.tls_protocol_name.replace('.', '_')}"
+-        ssl_version = getattr(ssl, attribute, None)
+-        if ssl_version is None:
+-            return pytest.skip(f"ssl.{attribute} isn't available")
+-        return ssl_version  # type: ignore[no-any-return]
++
++        if self.tls_protocol_name == "TLSv1.3" and ssl.HAS_TLSv1_3:
++            return ssl.PROTOCOL_TLS_CLIENT
++        if self.tls_protocol_name == "TLSv1.2" and ssl.HAS_TLSv1_2:
++            return ssl.PROTOCOL_TLSv1_2
++        if self.tls_protocol_name == "TLSv1.1" and ssl.HAS_TLSv1_1:
++            return ssl.PROTOCOL_TLSv1_1
++        if self.tls_protocol_name == "TLSv1" and ssl.HAS_TLSv1:
++            return ssl.PROTOCOL_TLSv1
++        else:
++            return pytest.skip(f"{self.tls_protocol_name} isn't available")
+ 
+     @classmethod
+     def setup_class(cls) -> None:
+@@ -797,6 +803,10 @@ def test_tls_protocol_name_of_socket(self) -> None:
+     def test_ssl_version_is_deprecated(self) -> None:
+         if self.tls_protocol_name is None:
+             pytest.skip("Skipping base test class")
++        if self.ssl_version() == ssl.PROTOCOL_TLS_CLIENT:
++            pytest.skip(
++                "Skipping because ssl_version=ssl.PROTOCOL_TLS_CLIENT is not deprecated"
++            )
+ 
+         with HTTPSConnectionPool(
+             self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=self.ssl_version()
+@@ -964,6 +974,11 @@ def test_default_ssl_context_ssl_min_max_versions(self) -> None:
+         assert ctx.maximum_version == expected_maximum_version
+ 
+     def test_ssl_context_ssl_version_uses_ssl_min_max_versions(self) -> None:
++        if self.ssl_version() == ssl.PROTOCOL_TLS_CLIENT:
++            pytest.skip(
++                "Skipping because ssl_version=ssl.PROTOCOL_TLS_CLIENT is not deprecated"
++            )
++
+         with pytest.warns(
+             DeprecationWarning,
+             match=r"'ssl_version' option is deprecated and will be removed in "
+@@ -977,25 +992,25 @@ def test_ssl_context_ssl_version_uses_ssl_min_max_versions(self) -> None:
+ 
+ 
+ @pytest.mark.usefixtures("requires_tlsv1")
+-class TestHTTPS_TLSv1(TestHTTPS):
++class TestHTTPS_TLSv1(BaseTestHTTPS):
+     tls_protocol_name = "TLSv1"
+     certs = TLSv1_CERTS
+ 
+ 
+ @pytest.mark.usefixtures("requires_tlsv1_1")
+-class TestHTTPS_TLSv1_1(TestHTTPS):
++class TestHTTPS_TLSv1_1(BaseTestHTTPS):
+     tls_protocol_name = "TLSv1.1"
+     certs = TLSv1_1_CERTS
+ 
+ 
+ @pytest.mark.usefixtures("requires_tlsv1_2")
+-class TestHTTPS_TLSv1_2(TestHTTPS):
++class TestHTTPS_TLSv1_2(BaseTestHTTPS):
+     tls_protocol_name = "TLSv1.2"
+     certs = TLSv1_2_CERTS
+ 
+ 
+ @pytest.mark.usefixtures("requires_tlsv1_3")
+-class TestHTTPS_TLSv1_3(TestHTTPS):
++class TestHTTPS_TLSv1_3(BaseTestHTTPS):
+     tls_protocol_name = "TLSv1.3"
+     certs = TLSv1_3_CERTS
+ 

diff --git a/dev-python/urllib3/urllib3-2.2.0-r1.ebuild b/dev-python/urllib3/urllib3-2.2.0-r1.ebuild
index bdcc50c7b073..c8abe317fa22 100644
--- a/dev-python/urllib3/urllib3-2.2.0-r1.ebuild
+++ b/dev-python/urllib3/urllib3-2.2.0-r1.ebuild
@@ -69,6 +69,8 @@ src_prepare() {
 	local PATCHES=(
 		# https://github.com/urllib3/urllib3/commit/49b2ddaf07ec9ef65ef12d0218117f20e739ee6e
 		"${FILESDIR}/${P}-revert.patch"
+		# https://github.com/urllib3/urllib3/commit/aa8d3dd2535cc125e123e5c2bca38738d6864b2a
+		"${FILESDIR}/${P}-pytest-8.patch"
 	)
 
 	# upstream considers 0.5 s to be "long" for a timeout


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

* [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/
@ 2024-04-17 12:46 Michał Górny
  0 siblings, 0 replies; 10+ messages in thread
From: Michał Górny @ 2024-04-17 12:46 UTC (permalink / raw
  To: gentoo-commits

commit:     bc8e87e144351b14a7b82c38c4bbccb751e7b889
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 17 12:43:20 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Apr 17 12:43:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc8e87e1

dev-python/urllib3: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/urllib3/Manifest                        |   2 -
 .../urllib3/files/urllib3-2.2.0-pytest-8.patch     | 112 ---------------------
 .../urllib3/files/urllib3-2.2.0-revert.patch       |  42 --------
 dev-python/urllib3/urllib3-2.0.7.ebuild            |  87 ----------------
 dev-python/urllib3/urllib3-2.2.0-r1.ebuild         |  99 ------------------
 5 files changed, 342 deletions(-)

diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index a78b43d34152..9c5d5de51cb8 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,6 +1,4 @@
 DIST hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.gh.tar.gz 156216 BLAKE2B fcb5f49653401e6e4079e1c770d3cd407602d4d6764437b735bd4ec04191dec59cdc930822fa2aff726ee25cddd0f71fd457dedf31026bff1da121d93af8b768 SHA512 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b
 DIST urllib3-1.26.18.tar.gz 305687 BLAKE2B f2f673761a8d80eee715a8726ba36ab6b09800fd4a4f03f27438553c36072e2abb5ff26cff71dcf30fd114f4d28c4ad9907533965b83c8a0581d3d4661904b70 SHA512 c89e93a032bf6b11375c06ef7c5abc1868f93e7655cfdca09e9bd939ad415d206ea159fe151ecd2e5f725e0e18a831c7a5382ad01dbc32264154fc8af7aec156
-DIST urllib3-2.0.7.tar.gz 282546 BLAKE2B d4fbb9e1d0b6d1f3c3d71efc3fc479c7b1c49f87ca849c387701fb0c8b4124082de6d83d958c8b2afc225a84b80e7665df857e7b0918ba50e4ad1431f8facc4d SHA512 ca21dd330cfc7f53e6f00a92be1df1d24acbe61b6ca31c52a272dccd6f50d1bb797eece9132860adc84c21a9bebc3030a12816081451fcb8384c11a6cd2d1e8b
 DIST urllib3-2.1.0.tar.gz 263900 BLAKE2B 9e0438a11b7178c5004c1253179bb6bfcb1fa8711db47084377bb14c5834f7b88b04a5560b99bf6fff5f1f4622d4b1998d19dd517ab6b7453fd53c832ee7fefa SHA512 33d6eafd9b6ecd97ee2dca8a4f1612a6fcc584961bcfd3a0a188f557a73f4c1576f98dc525c3b2feecb2d676f4bf4364aafeef093d6686e4b3ef2043726561a8
-DIST urllib3-2.2.0.tar.gz 287152 BLAKE2B 126949265c6558e8743f8e2e05e80fd211845c67436db096796f453ed248d348dcc73d3822c77bb94b55b711eb4b10899b60808be1f4981159f772a2066d5e39 SHA512 8fa2735ff623ec549802290a2317d3d24cdd18e43b8b0702dcee03ecba31428bd0dd12e5b8e129135a3f254bcf5bcd6a8b608c3a43192b50e3a815c73906f6cd
 DIST urllib3-2.2.1.tar.gz 291020 BLAKE2B 4bd6e26e1adfba99856db082d0bd3ea136a2367fa53c2d0c7990f6325e8145b2d080a8d59705c43acd97b26be65a309f83d1906d85bd72bfb479b7404972b042 SHA512 dfadba099db678ee1567ee95aa11a72fcea0a76df094d04dd4bd7ed5df4ea2fda6917cc122a1e2bfa4f5303916f93a7e1c881fbbf3cbb9415a25bd7eca1b14b3

diff --git a/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch b/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch
deleted file mode 100644
index 9baa3379a7c9..000000000000
--- a/dev-python/urllib3/files/urllib3-2.2.0-pytest-8.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From aa8d3dd2535cc125e123e5c2bca38738d6864b2a Mon Sep 17 00:00:00 2001
-From: Ruben Laguna <ruben.laguna@gmail.com>
-Date: Mon, 5 Feb 2024 15:29:35 +0100
-Subject: [PATCH] Fix ssl_version tests for upcoming migration to pytest 8
-
----
- dev-requirements.txt                |  2 +-
- test/contrib/test_pyopenssl.py      |  1 -
- test/with_dummyserver/test_https.py | 35 ++++++++++++++++++++---------
- 3 files changed, 26 insertions(+), 12 deletions(-)
-
-diff --git a/test/contrib/test_pyopenssl.py b/test/contrib/test_pyopenssl.py
-index b4799ce802..eaca77ba6f 100644
---- a/test/contrib/test_pyopenssl.py
-+++ b/test/contrib/test_pyopenssl.py
-@@ -38,7 +38,6 @@ def teardown_module() -> None:
- from ..test_ssl import TestSSL  # noqa: E402, F401
- from ..test_util import TestUtilSSL  # noqa: E402, F401
- from ..with_dummyserver.test_https import (  # noqa: E402, F401
--    TestHTTPS,
-     TestHTTPS_IPV4SAN,
-     TestHTTPS_IPV6SAN,
-     TestHTTPS_TLSv1,
-diff --git a/test/with_dummyserver/test_https.py b/test/with_dummyserver/test_https.py
-index aa22f11879..b8353d758b 100644
---- a/test/with_dummyserver/test_https.py
-+++ b/test/with_dummyserver/test_https.py
-@@ -65,7 +65,7 @@
- CLIENT_CERT = CLIENT_INTERMEDIATE_PEM
- 
- 
--class TestHTTPS(HTTPSHypercornDummyServerTestCase):
-+class BaseTestHTTPS(HTTPSHypercornDummyServerTestCase):
-     tls_protocol_name: str | None = None
- 
-     def tls_protocol_not_default(self) -> bool:
-@@ -83,11 +83,17 @@ def tls_version(self) -> ssl.TLSVersion:
-     def ssl_version(self) -> int:
-         if self.tls_protocol_name is None:
-             return pytest.skip("Skipping base test class")
--        attribute = f"PROTOCOL_{self.tls_protocol_name.replace('.', '_')}"
--        ssl_version = getattr(ssl, attribute, None)
--        if ssl_version is None:
--            return pytest.skip(f"ssl.{attribute} isn't available")
--        return ssl_version  # type: ignore[no-any-return]
-+
-+        if self.tls_protocol_name == "TLSv1.3" and ssl.HAS_TLSv1_3:
-+            return ssl.PROTOCOL_TLS_CLIENT
-+        if self.tls_protocol_name == "TLSv1.2" and ssl.HAS_TLSv1_2:
-+            return ssl.PROTOCOL_TLSv1_2
-+        if self.tls_protocol_name == "TLSv1.1" and ssl.HAS_TLSv1_1:
-+            return ssl.PROTOCOL_TLSv1_1
-+        if self.tls_protocol_name == "TLSv1" and ssl.HAS_TLSv1:
-+            return ssl.PROTOCOL_TLSv1
-+        else:
-+            return pytest.skip(f"{self.tls_protocol_name} isn't available")
- 
-     @classmethod
-     def setup_class(cls) -> None:
-@@ -797,6 +803,10 @@ def test_tls_protocol_name_of_socket(self) -> None:
-     def test_ssl_version_is_deprecated(self) -> None:
-         if self.tls_protocol_name is None:
-             pytest.skip("Skipping base test class")
-+        if self.ssl_version() == ssl.PROTOCOL_TLS_CLIENT:
-+            pytest.skip(
-+                "Skipping because ssl_version=ssl.PROTOCOL_TLS_CLIENT is not deprecated"
-+            )
- 
-         with HTTPSConnectionPool(
-             self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=self.ssl_version()
-@@ -964,6 +974,11 @@ def test_default_ssl_context_ssl_min_max_versions(self) -> None:
-         assert ctx.maximum_version == expected_maximum_version
- 
-     def test_ssl_context_ssl_version_uses_ssl_min_max_versions(self) -> None:
-+        if self.ssl_version() == ssl.PROTOCOL_TLS_CLIENT:
-+            pytest.skip(
-+                "Skipping because ssl_version=ssl.PROTOCOL_TLS_CLIENT is not deprecated"
-+            )
-+
-         with pytest.warns(
-             DeprecationWarning,
-             match=r"'ssl_version' option is deprecated and will be removed in "
-@@ -977,25 +992,25 @@ def test_ssl_context_ssl_version_uses_ssl_min_max_versions(self) -> None:
- 
- 
- @pytest.mark.usefixtures("requires_tlsv1")
--class TestHTTPS_TLSv1(TestHTTPS):
-+class TestHTTPS_TLSv1(BaseTestHTTPS):
-     tls_protocol_name = "TLSv1"
-     certs = TLSv1_CERTS
- 
- 
- @pytest.mark.usefixtures("requires_tlsv1_1")
--class TestHTTPS_TLSv1_1(TestHTTPS):
-+class TestHTTPS_TLSv1_1(BaseTestHTTPS):
-     tls_protocol_name = "TLSv1.1"
-     certs = TLSv1_1_CERTS
- 
- 
- @pytest.mark.usefixtures("requires_tlsv1_2")
--class TestHTTPS_TLSv1_2(TestHTTPS):
-+class TestHTTPS_TLSv1_2(BaseTestHTTPS):
-     tls_protocol_name = "TLSv1.2"
-     certs = TLSv1_2_CERTS
- 
- 
- @pytest.mark.usefixtures("requires_tlsv1_3")
--class TestHTTPS_TLSv1_3(TestHTTPS):
-+class TestHTTPS_TLSv1_3(BaseTestHTTPS):
-     tls_protocol_name = "TLSv1.3"
-     certs = TLSv1_3_CERTS
- 

diff --git a/dev-python/urllib3/files/urllib3-2.2.0-revert.patch b/dev-python/urllib3/files/urllib3-2.2.0-revert.patch
deleted file mode 100644
index 14175ecec58b..000000000000
--- a/dev-python/urllib3/files/urllib3-2.2.0-revert.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 49b2ddaf07ec9ef65ef12d0218117f20e739ee6e Mon Sep 17 00:00:00 2001
-From: Quentin Pradet <quentin.pradet@gmail.com>
-Date: Fri, 16 Feb 2024 11:35:30 +0400
-Subject: [PATCH] Stop casting request headers to HTTPHeaderDict (#3344)
-
-While this was done to fix a mypy error, we did not notice the
-consequences:
-
- * This breaks boto3 that subclasses HTTPConnection because
-   HTTPHeaderDict does not support bytes values yet.
- * When proxying, headers are still a dictionary by default.
-
-We can decide to reintroduce a forced conversion to HTTPHeaderDict in
-urllib3 3.0 if the above issues are fixed.
----
- changelog/3343.bugfix.rst     | 1 +
- src/urllib3/connectionpool.py | 4 ++--
- 2 files changed, 3 insertions(+), 2 deletions(-)
- create mode 100644 changelog/3343.bugfix.rst
-
-diff --git a/changelog/3343.bugfix.rst b/changelog/3343.bugfix.rst
-new file mode 100644
-index 0000000000..4f2df9e7a4
---- /dev/null
-+++ b/changelog/3343.bugfix.rst
-@@ -0,0 +1 @@
-+Fixed ``HTTPConnectionPool.urlopen`` to stop automatically casting non-proxy headers to ``HTTPHeaderDict``. This change was premature as it did not apply to proxy headers and ``HTTPHeaderDict`` does not handle byte header values correctly yet.
-diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py
-index 1036f0d718..bd58ff14dd 100644
---- a/src/urllib3/connectionpool.py
-+++ b/src/urllib3/connectionpool.py
-@@ -751,8 +751,8 @@ def urlopen(  # type: ignore[override]
-         # have to copy the headers dict so we can safely change it without those
-         # changes being reflected in anyone else's copy.
-         if not http_tunnel_required:
--            headers = HTTPHeaderDict(headers)
--            headers.update(self.proxy_headers)
-+            headers = headers.copy()  # type: ignore[attr-defined]
-+            headers.update(self.proxy_headers)  # type: ignore[union-attr]
- 
-         # Must keep the exception bound to a separate variable or else Python 3
-         # complains about UnboundLocalError.

diff --git a/dev-python/urllib3/urllib3-2.0.7.ebuild b/dev-python/urllib3/urllib3-2.0.7.ebuild
deleted file mode 100644
index e5dc381b44ca..000000000000
--- a/dev-python/urllib3/urllib3-2.0.7.ebuild
+++ /dev/null
@@ -1,87 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
-EAPI=8
-
-DISTUTILS_USE_PEP517=hatchling
-PYTHON_TESTED=( python3_{10..12} pypy3 )
-PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1 multiprocessing pypi
-
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="
-	https://github.com/urllib3/urllib3/
-	https://pypi.org/project/urllib3/
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="brotli test zstd"
-RESTRICT="!test? ( test )"
-
-# [secure] extra is deprecated and slated for removal, we don't need it:
-# https://github.com/urllib3/urllib3/issues/2680
-RDEPEND="
-	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	brotli? ( >=dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] )
-	zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] )
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep "
-			${RDEPEND}
-			dev-python/brotlicffi[\${PYTHON_USEDEP}]
-			dev-python/freezegun[\${PYTHON_USEDEP}]
-			dev-python/pytest[\${PYTHON_USEDEP}]
-			dev-python/pytest-rerunfailures[\${PYTHON_USEDEP}]
-			dev-python/pytest-xdist[\${PYTHON_USEDEP}]
-			>=dev-python/tornado-4.2.1[\${PYTHON_USEDEP}]
-			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
-			>=dev-python/zstandard-0.18.0[\${PYTHON_USEDEP}]
-		" "${PYTHON_TESTED[@]}")
-	)
-"
-
-src_prepare() {
-	# upstream considers 0.5 s to be "long" for a timeout
-	# we get tons of test failures on *fast* systems because of that
-	sed -i -e '/LONG_TIMEOUT/s:0.5:5:' test/__init__.py || die
-	distutils-r1_src_prepare
-}
-
-python_test() {
-	local -x CI=1
-	if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
-		einfo "Skipping tests on ${EPYTHON}"
-		return
-	fi
-
-	local EPYTEST_DESELECT=(
-		# take forever
-		test/contrib/test_pyopenssl.py::TestSocketSSL::test_requesting_large_resources_via_ssl
-		test/with_dummyserver/test_socketlevel.py::TestSSL::test_requesting_large_resources_via_ssl
-		# stupid test, next bump please verify if they fixed it
-		test/test_poolmanager.py::TestPoolManager::test_deprecated_no_scheme
-		# fails with newer secure SSL configuration, which removes TLS 1.1
-		test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1::test_verify_none_and_good_fingerprint
-		test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_1::test_verify_none_and_good_fingerprint
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1::test_verify_none_and_good_fingerprint
-		test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_1::test_verify_none_and_good_fingerprint
-		# TODO: timeouts
-		test/contrib/test_pyopenssl.py::TestSocketClosing::test_timeout_errors_cause_retries
-		test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
-		# warnings, sigh
-		test/with_dummyserver/test_connectionpool.py::TestConnectionPool::test_request_chunked_is_deprecated
-	)
-
-	# plugins make tests slower, and more fragile
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	# some tests are very fragile to timing
-	epytest -p rerunfailures --reruns=10 --reruns-delay=2 \
-		-p xdist -n "$(makeopts_jobs)" --dist=worksteal
-}

diff --git a/dev-python/urllib3/urllib3-2.2.0-r1.ebuild b/dev-python/urllib3/urllib3-2.2.0-r1.ebuild
deleted file mode 100644
index c8abe317fa22..000000000000
--- a/dev-python/urllib3/urllib3-2.2.0-r1.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# please keep this ebuild at EAPI 8 -- sys-apps/portage dep
-EAPI=8
-
-DISTUTILS_USE_PEP517=hatchling
-PYTHON_TESTED=( python3_{10..12} pypy3 )
-PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
-PYTHON_REQ_USE="ssl(+)"
-
-inherit distutils-r1 pypi
-
-# The package has a test dependency on their own hypercorn fork.
-HYPERCORN_COMMIT=d1719f8c1570cbd8e6a3719ffdb14a4d72880abb
-DESCRIPTION="HTTP library with thread-safe connection pooling, file post, and more"
-HOMEPAGE="
-	https://github.com/urllib3/urllib3/
-	https://pypi.org/project/urllib3/
-"
-SRC_URI+="
-	test? (
-		https://github.com/urllib3/hypercorn/archive/${HYPERCORN_COMMIT}.tar.gz
-			-> hypercorn-${HYPERCORN_COMMIT}.gh.tar.gz
-	)
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~riscv"
-IUSE="brotli http2 test zstd"
-RESTRICT="!test? ( test )"
-
-# [secure] extra is deprecated and slated for removal, we don't need it:
-# https://github.com/urllib3/urllib3/issues/2680
-RDEPEND="
-	>=dev-python/PySocks-1.5.8[${PYTHON_USEDEP}]
-	<dev-python/PySocks-2.0[${PYTHON_USEDEP}]
-	brotli? ( >=dev-python/brotlicffi-0.8.0[${PYTHON_USEDEP}] )
-	http2? (
-		<dev-python/h2-5[${PYTHON_USEDEP}]
-		>=dev-python/h2-4[${PYTHON_USEDEP}]
-	)
-	zstd? ( >=dev-python/zstandard-0.18.0[${PYTHON_USEDEP}] )
-"
-BDEPEND="
-	test? (
-		$(python_gen_cond_dep "
-			${RDEPEND}
-			dev-python/brotlicffi[\${PYTHON_USEDEP}]
-			dev-python/freezegun[\${PYTHON_USEDEP}]
-			dev-python/h2[\${PYTHON_USEDEP}]
-			dev-python/httpx[\${PYTHON_USEDEP}]
-			dev-python/pytest[\${PYTHON_USEDEP}]
-			dev-python/pytest-rerunfailures[\${PYTHON_USEDEP}]
-			dev-python/pytest-timeout[\${PYTHON_USEDEP}]
-			dev-python/pytest-xdist[\${PYTHON_USEDEP}]
-			dev-python/quart[\${PYTHON_USEDEP}]
-			dev-python/quart-trio[\${PYTHON_USEDEP}]
-			dev-python/trio[\${PYTHON_USEDEP}]
-			>=dev-python/tornado-4.2.1[\${PYTHON_USEDEP}]
-			>=dev-python/trustme-0.5.3[\${PYTHON_USEDEP}]
-			>=dev-python/zstandard-0.18.0[\${PYTHON_USEDEP}]
-		" "${PYTHON_TESTED[@]}")
-	)
-"
-
-src_prepare() {
-	local PATCHES=(
-		# https://github.com/urllib3/urllib3/commit/49b2ddaf07ec9ef65ef12d0218117f20e739ee6e
-		"${FILESDIR}/${P}-revert.patch"
-		# https://github.com/urllib3/urllib3/commit/aa8d3dd2535cc125e123e5c2bca38738d6864b2a
-		"${FILESDIR}/${P}-pytest-8.patch"
-	)
-
-	# upstream considers 0.5 s to be "long" for a timeout
-	# we get tons of test failures on *fast* systems because of that
-	sed -i -e '/LONG_TIMEOUT/s:0.5:5:' test/__init__.py || die
-	distutils-r1_src_prepare
-}
-
-python_test() {
-	local -x PYTHONPATH=${WORKDIR}/hypercorn-${HYPERCORN_COMMIT}/src
-	local -x CI=1
-	if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then
-		einfo "Skipping tests on ${EPYTHON}"
-		return
-	fi
-
-	local EPYTEST_DESELECT=(
-		# TODO: timeouts
-		test/contrib/test_pyopenssl.py::TestSocketClosing::test_timeout_errors_cause_retries
-		test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_timeout_errors_cause_retries
-	)
-
-	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
-	local EPYTEST_XDIST=1
-	epytest -p timeout -p rerunfailures --reruns=10 --reruns-delay=2
-}


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

end of thread, other threads:[~2024-04-17 12:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-21 11:43 [gentoo-commits] repo/gentoo:master commit in: dev-python/urllib3/files/, dev-python/urllib3/ Justin Lecher
  -- strict thread matches above, loose matches on Subject: below --
2017-05-03 11:02 Michał Górny
2018-01-06 14:13 Michał Górny
2019-08-16 13:50 Michał Górny
2020-12-02 10:51 Michał Górny
2021-01-26 18:43 Michał Górny
2021-05-19 18:21 Michał Górny
2021-07-15 17:06 Michał Górny
2024-02-16 17:16 Michał Górny
2024-04-17 12:46 Michał Górny

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