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 <[email protected]>
-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 <[email protected]>
-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
-}

Reply via email to