forked from pool/python-urllib3
- Update to 2.0.1:
* Fixed a socket leak when fingerprint or hostname verifications fail. * Fixed an error when HTTPResponse.read(0) was the first read call or when the internal response body buffer was otherwise empty. * Removed support for Python 2.7, 3.5, and 3.6. * Removed fallback on certificate commonName in match_hostname() function. * Removed support for Python with an ssl module compiled with LibreSSL, CiscoSSL, wolfSSL, and all other OpenSSL alternatives. * Removed support for OpenSSL versions earlier than 1.1.1. * Removed urllib3.contrib.appengine.AppEngineManager and support for Google App Engine Standard Environment. * Changed ssl_version to instead set the corresponding SSLContext.minimum_version and SSLContext.maximum_version values. * Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2 in line with Python 3.10. * Changed urllib3.util.create_urllib3_context to not override the system cipher suites with a default value. * Changed multipart/form-data header parameter formatting matches the WHATWG HTML Standard as of 2021-06-10. * Changed HTTPConnection.request() to always use lowercase chunk boundaries when sending requests with Transfer-Encoding: chunked. * Changed enforce_content_length default to True, preventing silent data loss when reading streamed responses. * Changed all parameters in the HTTPConnection and HTTPSConnection constructors to be keyword-only except host and port. * Changed HTTPConnection.getresponse() to set the socket timeout from HTTPConnection.timeout value before reading data from the socket. * Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX. * Changed TLS handshakes to use SSLContext.check_hostname when possible. * Changed the default blocksize to 16KB to match OpenSSL's default read OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=152
This commit is contained in:
@@ -1,3 +1,48 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 3 06:50:06 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.0.1:
|
||||||
|
* Fixed a socket leak when fingerprint or hostname verifications fail.
|
||||||
|
* Fixed an error when HTTPResponse.read(0) was the first read call or when
|
||||||
|
the internal response body buffer was otherwise empty.
|
||||||
|
* Removed support for Python 2.7, 3.5, and 3.6.
|
||||||
|
* Removed fallback on certificate commonName in match_hostname() function.
|
||||||
|
* Removed support for Python with an ssl module compiled with LibreSSL,
|
||||||
|
CiscoSSL, wolfSSL, and all other OpenSSL alternatives.
|
||||||
|
* Removed support for OpenSSL versions earlier than 1.1.1.
|
||||||
|
* Removed urllib3.contrib.appengine.AppEngineManager and support for Google
|
||||||
|
App Engine Standard Environment.
|
||||||
|
* Changed ssl_version to instead set the corresponding
|
||||||
|
SSLContext.minimum_version and SSLContext.maximum_version values.
|
||||||
|
* Changed default SSLContext.minimum_version to be TLSVersion.TLSv1_2
|
||||||
|
in line with Python 3.10.
|
||||||
|
* Changed urllib3.util.create_urllib3_context to not override the system
|
||||||
|
cipher suites with a default value.
|
||||||
|
* Changed multipart/form-data header parameter formatting matches the
|
||||||
|
WHATWG HTML Standard as of 2021-06-10.
|
||||||
|
* Changed HTTPConnection.request() to always use lowercase chunk boundaries
|
||||||
|
when sending requests with Transfer-Encoding: chunked.
|
||||||
|
* Changed enforce_content_length default to True, preventing silent data
|
||||||
|
loss when reading streamed responses.
|
||||||
|
* Changed all parameters in the HTTPConnection and HTTPSConnection
|
||||||
|
constructors to be keyword-only except host and port.
|
||||||
|
* Changed HTTPConnection.getresponse() to set the socket timeout from
|
||||||
|
HTTPConnection.timeout value before reading data from the socket.
|
||||||
|
* Changed name of Retry.BACK0FF_MAX to be Retry.DEFAULT_BACKOFF_MAX.
|
||||||
|
* Changed TLS handshakes to use SSLContext.check_hostname when possible.
|
||||||
|
* Changed the default blocksize to 16KB to match OpenSSL's default read
|
||||||
|
amounts.
|
||||||
|
* Changed HTTPResponse.read() to raise an error when calling with
|
||||||
|
decode_content=False after using decode_content=True to prevent data loss.
|
||||||
|
* Fixed thread-safety issue where accessing a PoolManager with many
|
||||||
|
distinct origins would cause connection pools to be closed while
|
||||||
|
requests are in progress.
|
||||||
|
* Fixed the default value of HTTPSConnection.socket_options to match
|
||||||
|
HTTPConnection.
|
||||||
|
* Fixed a socket leak if HTTPConnection.connect() fails.
|
||||||
|
- Drop patch remove-mock.patch, included upstream.
|
||||||
|
- Fiddle with {Build,}Requires as appropiate, six finally dropped.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:38:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:38:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@@ -26,28 +26,24 @@
|
|||||||
%endif
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-urllib3%{psuffix}
|
Name: python-urllib3%{psuffix}
|
||||||
Version: 1.26.15
|
Version: 2.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: HTTP library with thread-safe connection pooling, file post, and more
|
Summary: HTTP library with thread-safe connection pooling, file post, and more
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://urllib3.readthedocs.org/
|
URL: https://urllib3.readthedocs.org/
|
||||||
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com
|
|
||||||
# remove dependency on the external module mock
|
|
||||||
Patch0: remove_mock.patch
|
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
|
BuildRequires: %{python_module hatchling}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
#!BuildIgnore: python-requests
|
#!BuildIgnore: python-requests
|
||||||
Requires: ca-certificates-mozilla
|
Requires: ca-certificates-mozilla
|
||||||
Requires: python-certifi
|
Requires: python-certifi
|
||||||
Requires: python-cryptography >= 1.3.4
|
Requires: python-cryptography >= 1.9
|
||||||
Requires: python-idna >= 2.0.0
|
Requires: python-idna >= 2.0.0
|
||||||
Requires: python-pyOpenSSL >= 0.14
|
Requires: python-pyOpenSSL >= 17.1.0
|
||||||
Requires: python-six >= 1.12.0
|
|
||||||
Recommends: python-Brotli >= 1.0.9
|
Recommends: python-Brotli >= 1.0.9
|
||||||
Recommends: python-PySocks >= 1.5.6
|
Recommends: python-PySocks >= 1.5.6
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -55,7 +51,7 @@ BuildArch: noarch
|
|||||||
BuildRequires: %{python_module Brotli >= 1.0.9}
|
BuildRequires: %{python_module Brotli >= 1.0.9}
|
||||||
BuildRequires: %{python_module PySocks >= 1.5.6}
|
BuildRequires: %{python_module PySocks >= 1.5.6}
|
||||||
BuildRequires: %{python_module certifi}
|
BuildRequires: %{python_module certifi}
|
||||||
BuildRequires: %{python_module cryptography >= 1.3.4}
|
BuildRequires: %{python_module cryptography >= 1.9}
|
||||||
BuildRequires: %{python_module dateutil}
|
BuildRequires: %{python_module dateutil}
|
||||||
BuildRequires: %{python_module flaky}
|
BuildRequires: %{python_module flaky}
|
||||||
BuildRequires: %{python_module idna >= 2.0.0}
|
BuildRequires: %{python_module idna >= 2.0.0}
|
||||||
@@ -67,6 +63,7 @@ BuildRequires: %{python_module python-dateutil}
|
|||||||
BuildRequires: %{python_module tornado >= 6}
|
BuildRequires: %{python_module tornado >= 6}
|
||||||
BuildRequires: %{python_module trustme >= 0.5.3}
|
BuildRequires: %{python_module trustme >= 0.5.3}
|
||||||
BuildRequires: %{python_module urllib3 >= %{version}}
|
BuildRequires: %{python_module urllib3 >= %{version}}
|
||||||
|
BuildRequires: timezone
|
||||||
%endif
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@@ -92,31 +89,14 @@ Highlights
|
|||||||
find . -type f -exec chmod a-x '{}' \;
|
find . -type f -exec chmod a-x '{}' \;
|
||||||
find . -name __pycache__ -type d -exec rm -fr {} +
|
find . -name __pycache__ -type d -exec rm -fr {} +
|
||||||
|
|
||||||
# Drop the dummyserver tests, they fail in OBS
|
|
||||||
rm test/with_dummyserver/test_proxy_poolmanager.py
|
|
||||||
rm test/with_dummyserver/test_poolmanager.py
|
|
||||||
# Don't run the Google App Engine tests
|
|
||||||
rm -r test/appengine/
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%python_install
|
%pyproject_install
|
||||||
|
|
||||||
%{python_expand # Unbundle six
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
rm %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py
|
|
||||||
rm %{buildroot}/%{$python_sitelib}/urllib3/packages/__pycache__/six*.pyc
|
|
||||||
|
|
||||||
ln -s %{$python_sitelib}/six.py %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py
|
|
||||||
ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.opt-1.pyc \
|
|
||||||
%{buildroot}/%{$python_sitelib}/urllib3/packages/__pycache__/
|
|
||||||
ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.pyc \
|
|
||||||
%{buildroot}/%{$python_sitelib}/urllib3/packages/__pycache__/
|
|
||||||
|
|
||||||
%fdupes %{buildroot}%{$python_sitelib}
|
|
||||||
}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
@@ -137,7 +117,7 @@ skiplist+=" or test_requesting_large_resources_via_ssl"
|
|||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.md
|
||||||
%{python_sitelib}/urllib3
|
%{python_sitelib}/urllib3
|
||||||
%{python_sitelib}/urllib3-%{version}*-info
|
%{python_sitelib}/urllib3-%{version}*-info
|
||||||
%endif
|
%endif
|
||||||
|
@@ -1,261 +0,0 @@
|
|||||||
Index: urllib3-1.26.10/docs/conf.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/docs/conf.py
|
|
||||||
+++ urllib3-1.26.10/docs/conf.py
|
|
||||||
@@ -14,7 +14,10 @@ sys.path.insert(0, root_path)
|
|
||||||
# Mock some expensive/platform-specific modules so build will work.
|
|
||||||
# (https://read-the-docs.readthedocs.io/en/latest/faq.html#\
|
|
||||||
# i-get-import-errors-on-libraries-that-depend-on-c-modules)
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
|
|
||||||
|
|
||||||
class MockModule(mock.Mock):
|
|
||||||
Index: urllib3-1.26.10/test/contrib/test_pyopenssl.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/contrib/test_pyopenssl.py
|
|
||||||
+++ urllib3-1.26.10/test/contrib/test_pyopenssl.py
|
|
||||||
@@ -1,7 +1,10 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import os
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
try:
|
|
||||||
Index: urllib3-1.26.10/test/contrib/test_pyopenssl_dependencies.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/contrib/test_pyopenssl_dependencies.py
|
|
||||||
+++ urllib3-1.26.10/test/contrib/test_pyopenssl_dependencies.py
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
import pytest
|
|
||||||
-from mock import Mock, patch
|
|
||||||
+try:
|
|
||||||
+ from unittest.mock import Mock, patch
|
|
||||||
+except ImportError:
|
|
||||||
+ from mock import Mock, patch
|
|
||||||
|
|
||||||
try:
|
|
||||||
from urllib3.contrib.pyopenssl import extract_from_urllib3, inject_into_urllib3
|
|
||||||
Index: urllib3-1.26.10/test/test_connection.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_connection.py
|
|
||||||
+++ urllib3-1.26.10/test/test_connection.py
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from urllib3.connection import RECENT_DATE, CertificateError, _match_hostname
|
|
||||||
Index: urllib3-1.26.10/test/test_connectionpool.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_connectionpool.py
|
|
||||||
+++ urllib3-1.26.10/test/test_connectionpool.py
|
|
||||||
@@ -6,7 +6,10 @@ from ssl import SSLError as BaseSSLError
|
|
||||||
from test import SHORT_TIMEOUT
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
-from mock import Mock
|
|
||||||
+try:
|
|
||||||
+ from unittest.mock import Mock
|
|
||||||
+except ImportError:
|
|
||||||
+ from mock import Mock
|
|
||||||
|
|
||||||
from dummyserver.server import DEFAULT_CA
|
|
||||||
from urllib3._collections import HTTPHeaderDict
|
|
||||||
Index: urllib3-1.26.10/test/test_queue_monkeypatch.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_queue_monkeypatch.py
|
|
||||||
+++ urllib3-1.26.10/test/test_queue_monkeypatch.py
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
from __future__ import absolute_import
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from urllib3 import HTTPConnectionPool
|
|
||||||
Index: urllib3-1.26.10/test/test_response.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_response.py
|
|
||||||
+++ urllib3-1.26.10/test/test_response.py
|
|
||||||
@@ -9,7 +9,10 @@ from base64 import b64decode
|
|
||||||
from io import BufferedReader, BytesIO, TextIOWrapper
|
|
||||||
from test import onlyBrotlipy
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
import six
|
|
||||||
|
|
||||||
Index: urllib3-1.26.10/test/test_retry.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_retry.py
|
|
||||||
+++ urllib3-1.26.10/test/test_retry.py
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from urllib3.exceptions import (
|
|
||||||
Index: urllib3-1.26.10/test/test_retry_deprecated.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_retry_deprecated.py
|
|
||||||
+++ urllib3-1.26.10/test/test_retry_deprecated.py
|
|
||||||
@@ -1,7 +1,10 @@
|
|
||||||
# This is a copy-paste of test_retry.py with extra asserts about deprecated options. It will be removed for v2.
|
|
||||||
import warnings
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from urllib3.exceptions import (
|
|
||||||
Index: urllib3-1.26.10/test/test_ssl.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_ssl.py
|
|
||||||
+++ urllib3-1.26.10/test/test_ssl.py
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
from test import notPyPy2
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from urllib3.exceptions import SNIMissingWarning
|
|
||||||
Index: urllib3-1.26.10/test/test_ssltransport.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_ssltransport.py
|
|
||||||
+++ urllib3-1.26.10/test/test_ssltransport.py
|
|
||||||
@@ -4,7 +4,10 @@ import socket
|
|
||||||
import ssl
|
|
||||||
import sys
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from dummyserver.server import DEFAULT_CA, DEFAULT_CERTS
|
|
||||||
Index: urllib3-1.26.10/test/test_util.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_util.py
|
|
||||||
+++ urllib3-1.26.10/test/test_util.py
|
|
||||||
@@ -9,7 +9,10 @@ from itertools import chain
|
|
||||||
from test import notBrotlipy, onlyBrotlipy, onlyPy2, onlyPy3
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
-from mock import Mock, patch
|
|
||||||
+try:
|
|
||||||
+ from unittest.mock import Mock, patch
|
|
||||||
+except ImportError:
|
|
||||||
+ from mock import Mock, patch
|
|
||||||
|
|
||||||
from urllib3 import add_stderr_logger, disable_warnings, util
|
|
||||||
from urllib3.exceptions import (
|
|
||||||
Index: urllib3-1.26.10/test/with_dummyserver/test_connectionpool.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/with_dummyserver/test_connectionpool.py
|
|
||||||
+++ urllib3-1.26.10/test/with_dummyserver/test_connectionpool.py
|
|
||||||
@@ -12,7 +12,10 @@ import warnings
|
|
||||||
from test import LONG_TIMEOUT, SHORT_TIMEOUT, onlyPy2
|
|
||||||
from threading import Event
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
import six
|
|
||||||
|
|
||||||
Index: urllib3-1.26.10/test/with_dummyserver/test_https.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/with_dummyserver/test_https.py
|
|
||||||
+++ urllib3-1.26.10/test/with_dummyserver/test_https.py
|
|
||||||
@@ -18,7 +18,10 @@ from test import (
|
|
||||||
resolvesLocalhostFQDN,
|
|
||||||
)
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
import trustme
|
|
||||||
|
|
||||||
Index: urllib3-1.26.10/test/with_dummyserver/test_socketlevel.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/with_dummyserver/test_socketlevel.py
|
|
||||||
+++ urllib3-1.26.10/test/with_dummyserver/test_socketlevel.py
|
|
||||||
@@ -53,7 +53,10 @@ from test import (
|
|
||||||
)
|
|
||||||
from threading import Event
|
|
||||||
|
|
||||||
-import mock
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
import pytest
|
|
||||||
import trustme
|
|
||||||
|
|
||||||
Index: urllib3-1.26.10/test/test_poolmanager.py
|
|
||||||
===================================================================
|
|
||||||
--- urllib3-1.26.10.orig/test/test_poolmanager.py
|
|
||||||
+++ urllib3-1.26.10/test/test_poolmanager.py
|
|
||||||
@@ -2,7 +2,11 @@ import socket
|
|
||||||
from test import resolvesLocalhostFQDN
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
-from mock import patch
|
|
||||||
+
|
|
||||||
+try:
|
|
||||||
+ import unittest.mock as mock
|
|
||||||
+except ImportError:
|
|
||||||
+ import mock
|
|
||||||
|
|
||||||
from urllib3 import connection_from_url
|
|
||||||
from urllib3.exceptions import ClosedPoolError, LocationValueError
|
|
||||||
@@ -383,7 +387,7 @@ class TestPoolManager(object):
|
|
||||||
"http://[a::b%25zone]",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
- @patch("urllib3.util.connection.create_connection")
|
|
||||||
+ @mock.patch("urllib3.util.connection.create_connection")
|
|
||||||
def test_e2e_connect_to_ipv6_scoped(self, create_connection, url):
|
|
||||||
"""Checks that IPv6 scoped addresses are properly handled end-to-end.
|
|
||||||
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305
|
|
||||||
size 301444
|
|
3
urllib3-2.0.1.tar.gz
Normal file
3
urllib3-2.0.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2ce66a68134be469f5df5d46d724237489b3cd85b2bba2223dbbee1746548826
|
||||||
|
size 277241
|
Reference in New Issue
Block a user