summaryrefslogtreecommitdiff
path: root/dev-python/urllib3
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
commit908778078736bd36f7a60a2d576d415cb8e000fa (patch)
treec6a4796c48b608c14dc7e9674cdbd38f905e3c15 /dev-python/urllib3
parent185fa19bbf68a4d4dca534d2b46729207a177f16 (diff)
gentoo resync : 22.05.2021
Diffstat (limited to 'dev-python/urllib3')
-rw-r--r--dev-python/urllib3/Manifest3
-rw-r--r--dev-python/urllib3/files/urllib3-1.26.4-test-ssltransport.patch31
-rw-r--r--dev-python/urllib3/urllib3-1.26.4.ebuild35
3 files changed, 67 insertions, 2 deletions
diff --git a/dev-python/urllib3/Manifest b/dev-python/urllib3/Manifest
index 10f61d2ce105..503a292529cf 100644
--- a/dev-python/urllib3/Manifest
+++ b/dev-python/urllib3/Manifest
@@ -1,3 +1,4 @@
+AUX urllib3-1.26.4-test-ssltransport.patch 1267 BLAKE2B e82ae435cfa8a2821f3f61d91a2e4f9011c5f68d37fddd1a40ae4658566db45717379c48d11299eb260c2f8816f416ac69b0379b3c7f925075ee9c1051aab1bd SHA512 bf5d2bb2b48444724ee1cfb87f4a84b3a63cd6ca598ba4d92a44bde71c66a35b815905de51fe027abb2eea63ae353dc0df2338ddd4f819f678f8a39b5c6d685b
DIST urllib3-1.26.4.tar.gz 293008 BLAKE2B 6ca88861baa87814d3856cd0f1fa0a6cb9e11ee745c782b598c4f5fe74b195ba47e8430b993ed8a5fb269153d700e4a803cd2ebc177e20e3186b3b26612262c7 SHA512 daf2ba432f2e4edaa6aa8c6bdaaea21fcb77cc5fdfd991f89b1f753b4f9901faab04120841e9fa8d93e2bd3d72cbdb647f1492d882266b4e0281c725e8d55a7a
-EBUILD urllib3-1.26.4.ebuild 1922 BLAKE2B f421d6ecd0571dfcca1a015d8e47462e70c58869b2704bc3283d10986f694e5fb98688b0e319a4be891bd7ec879bd56aa7fa16250679f04c09f83fa7763076f0 SHA512 03490b5a1949961c680681ed5324ba731907d2cef155a9e57ed87da6f2ef03995133c203395639f3439e53878c41d472a2c6b7623ea7d57f097459a29522edfa
+EBUILD urllib3-1.26.4.ebuild 4265 BLAKE2B 17f981911cc9adf17b7fa989833a47554127d9bdc7c1f49605c0c949c0c82ca24e48e5e1bea38f8f549c5eb00e047cfddf03a967a0ea7bf1e83afa9901044f7f SHA512 f9d2190c141b4c4daa2d9e3d4fe577acb3d0787c8591ca46bce3ccf5e22872349fa459e63cd5cb96710f25a5910a2ce600d0003b7e72e5f9c4e0797c459d07f2
MISC metadata.xml 530 BLAKE2B 148b6a1936566b905f38f00ec231a832e827bbdd4f6c2ceabe521779b08c1dbf60bdfa182234e8e67b6708efadd09d29e93c151f7c3d1d4fcd5ece3e3d9c0839 SHA512 9ab9fa9ecb34855be0f6e7914f70eadca67854fde865765b1257feec6c841bccd8276ad81f8d9bbfb544ca753c3d27681d6cc841cee008efca5ba72f5a236f3e
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 000000000000..346574fec91f
--- /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 c23d80a6edef..e0026885ab4d 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 }
}