==> Building on v ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/python-urllib3 ./ LICENSE 1,401 100% 0.00kB/s 0:00:00 1,401 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=2/4) PKGBUILD 2,113 100% 2.02MB/s 0:00:00 2,113 100% 2.02MB/s 0:00:00 (xfr#2, to-chk=1/4) python-urllib3-1.26.9-1.log 361 100% 352.54kB/s 0:00:00 361 100% 352.54kB/s 0:00:00 (xfr#3, to-chk=0/4) sent 2,183 bytes received 122 bytes 4,610.00 bytes/sec total size is 3,702 speedup is 1.61 ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l felix3 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... community downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix3]...done ==> Making package: python-urllib3 1.26.9-1 (Wed Aug 10 02:08:18 2022) ==> Retrieving sources...  -> Downloading python-urllib3-1.26.9.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 260k 0 260k 0 0 149k 0 --:--:-- 0:00:01 --:--:-- 271k ==> Validating source files with sha512sums... python-urllib3-1.26.9.tar.gz ... Passed ==> Making package: python-urllib3 1.26.9-1 (Wed Aug 10 02:09:11 2022) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (73) New Version Net Change Download Size core/libnsl 2.0.0-2 0.06 MiB core/python 3.10.5-1 80.43 MiB community/python-apipkg 3.0.1-1 0.04 MiB 0.01 MiB extra/python-appdirs 1.4.4-6 0.07 MiB community/python-astroid 2.12.2-1 0.03 MiB 0.02 MiB extra/python-attrs 21.4.0-1 0.45 MiB community/python-babel 2.10.3-1 29.15 MiB 6.10 MiB community/python-beautifulsoup4 4.11.1-1 1.19 MiB 0.20 MiB extra/python-cffi 1.15.1-1 1.00 MiB extra/python-chardet 5.0.0-1 2.44 MiB 0.22 MiB extra/python-cryptography 37.0.4-1 3.54 MiB community/python-dill 0.3.4-3 0.59 MiB 0.12 MiB community/python-docutils 1:0.19-1 4.28 MiB 0.72 MiB extra/python-idna 3.3-4 0.66 MiB 0.09 MiB community/python-imagesize 1.4.1-1 0.03 MiB 0.01 MiB community/python-importlib-metadata 4.8.1-3 0.15 MiB 0.03 MiB community/python-iniconfig 1.1.1-5 0.02 MiB 0.01 MiB community/python-isort 5.10.1-5 0.77 MiB 0.14 MiB community/python-jinja 1:3.1.2-2 1.28 MiB 0.23 MiB extra/python-lazy-object-proxy 1.7.1-1 0.12 MiB 0.03 MiB extra/python-markupsafe 2.1.1-1 0.06 MiB 0.02 MiB community/python-mccabe 0.7.0-1 0.04 MiB 0.01 MiB community/python-more-itertools 8.13.0-2 0.48 MiB extra/python-ordered-set 4.0.2-6 0.06 MiB extra/python-packaging 21.3-1 0.26 MiB community/python-pbr 5.9.0-1 0.66 MiB 0.13 MiB extra/python-platformdirs 2.5.2-1 0.12 MiB 0.02 MiB community/python-pluggy 1.0.0-1 0.10 MiB 0.02 MiB extra/python-ply 3.11-10 0.31 MiB community/python-py 1.11.0-1 0.71 MiB 0.15 MiB extra/python-pycparser 2.21-3 1.39 MiB community/python-pygments 2.12.0-1 11.43 MiB 2.08 MiB community/python-pylint 2.14.4-1 4.14 MiB 0.87 MiB extra/python-pyparsing 3.0.9-1 0.96 MiB community/python-pytest 7.1.2-1 2.62 MiB 0.49 MiB community/python-pytz 2022.1-1 0.14 MiB 0.04 MiB extra/python-requests 2.28.1-1 0.45 MiB 0.09 MiB extra/python-retrying 1.3.3-13 0.03 MiB 0.01 MiB extra/python-six 1.16.0-5 0.09 MiB community/python-snowballstemmer 2.2.0-3 1.78 MiB 0.18 MiB community/python-soupsieve 2.3.2.post1-1 0.32 MiB 0.06 MiB community/python-sphinx-alabaster-theme 0.7.12-9 0.04 MiB 0.02 MiB community/python-sphinx-basic-ng 0.0.1a12-1 0.04 MiB 0.02 MiB community/python-sphinxcontrib-applehelp 1.0.2-8 0.24 MiB 0.03 MiB community/python-sphinxcontrib-devhelp 1.0.2-8 0.12 MiB 0.02 MiB community/python-sphinxcontrib-htmlhelp 2.0.0-3 0.15 MiB 0.03 MiB community/python-sphinxcontrib-jsmath 1.0.1-11 0.01 MiB 0.01 MiB community/python-sphinxcontrib-qthelp 1.0.3-8 0.15 MiB 0.03 MiB community/python-sphinxcontrib-serializinghtml 1.1.5-3 0.12 MiB 0.03 MiB community/python-toml 0.10.2-7 0.14 MiB 0.03 MiB extra/python-tomli 2.0.1-1 0.08 MiB 0.02 MiB community/python-tomlkit 0.11.2-1 0.39 MiB 0.07 MiB community/python-typing_extensions 4.2.0-1 0.19 MiB extra/python-urllib3 1.26.7-5 0.69 MiB 0.18 MiB extra/python-wrapt 1.14.1-1 0.19 MiB 0.05 MiB community/python-zipp 3.8.1-1 0.03 MiB 0.01 MiB core/python-brotli 1.0.9-8 0.67 MiB 0.31 MiB community/python-dateutil 2.8.2-4 0.82 MiB 0.28 MiB community/python-flaky 3.7.0-6 0.16 MiB 0.03 MiB community/python-gcp-devrel-py-tools 0.0.16-5 0.10 MiB 0.03 MiB community/python-mock 3.0.5-9 0.21 MiB 0.05 MiB community/python-ndg-httpsclient 0.5.1-11 0.18 MiB 0.04 MiB extra/python-nose 1.3.7-14 0.89 MiB 0.21 MiB community/python-psutil 5.9.1-1 2.09 MiB 0.36 MiB extra/python-pyasn1 0.4.8-7 0.60 MiB extra/python-pyopenssl 22.0.0-1 0.54 MiB 0.08 MiB community/python-pysocks 1.7.1-7 0.10 MiB 0.03 MiB community/python-pytest-runner 5.3.1-3 0.03 MiB 0.01 MiB extra/python-setuptools 1:59.5.0-1 2.96 MiB community/python-sphinx 5.1.1-1 15.31 MiB 1.87 MiB community/python-sphinx-furo 2022.06.21-1 0.33 MiB 0.08 MiB community/python-tornado 6.1.0-5 4.03 MiB 0.63 MiB community/python-trustme 0.9.0-5 0.07 MiB 0.02 MiB Total Download Size: 16.71 MiB Total Installed Size: 184.12 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-babel-2.10.3-1-any downloading... python-pygments-2.12.0-1-any downloading... python-sphinx-5.1.1-1-any downloading... python-pylint-2.14.4-1-any downloading... python-docutils-1:0.19-1-any downloading... python-tornado-6.1.0-5-riscv64 downloading... python-pytest-7.1.2-1-any downloading... python-psutil-5.9.1-1-riscv64 downloading... python-brotli-1.0.9-8-riscv64 downloading... python-dateutil-2.8.2-4-any downloading... python-jinja-1:3.1.2-2-any downloading... python-chardet-5.0.0-1-any downloading... python-nose-1.3.7-14-any downloading... python-beautifulsoup4-4.11.1-1-any downloading... python-snowballstemmer-2.2.0-3-any downloading... python-urllib3-1.26.7-5-any downloading... python-py-1.11.0-1-any downloading... python-isort-5.10.1-5-any downloading... python-pbr-5.9.0-1-any downloading... python-dill-0.3.4-3-any downloading... python-requests-2.28.1-1-any downloading... python-idna-3.3-4-any downloading... python-pyopenssl-22.0.0-1-any downloading... python-sphinx-furo-2022.06.21-1-any downloading... python-tomlkit-0.11.2-1-any downloading... python-soupsieve-2.3.2.post1-1-any downloading... python-wrapt-1.14.1-1-riscv64 downloading... python-mock-3.0.5-9-any downloading... python-ndg-httpsclient-0.5.1-11-any downloading... python-pytz-2022.1-1-any downloading... python-toml-0.10.2-7-any downloading... python-sphinxcontrib-htmlhelp-2.0.0-3-any downloading... python-importlib-metadata-4.8.1-3-any downloading... python-sphinxcontrib-applehelp-1.0.2-8-any downloading... python-lazy-object-proxy-1.7.1-1-riscv64 downloading... python-flaky-3.7.0-6-any downloading... python-gcp-devrel-py-tools-0.0.16-5-any downloading... python-pysocks-1.7.1-7-any downloading... python-sphinxcontrib-qthelp-1.0.3-8-any downloading... python-sphinxcontrib-serializinghtml-1.1.5-3-any downloading... python-pluggy-1.0.0-1-any downloading... python-tomli-2.0.1-1-any downloading... python-sphinxcontrib-devhelp-1.0.2-8-any downloading... python-platformdirs-2.5.2-1-any downloading... python-trustme-0.9.0-5-any downloading... python-markupsafe-2.1.1-1-riscv64 downloading... python-sphinx-basic-ng-0.0.1a12-1-any downloading... python-astroid-2.12.2-1-any downloading... python-sphinx-alabaster-theme-0.7.12-9-any downloading... python-apipkg-3.0.1-1-any downloading... python-mccabe-0.7.0-1-any downloading... python-pytest-runner-5.3.1-3-any downloading... python-imagesize-1.4.1-1-any downloading... python-retrying-1.3.3-13-any downloading... python-zipp-3.8.1-1-any downloading... python-iniconfig-1.1.1-5-any downloading... python-sphinxcontrib-jsmath-1.0.1-11-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools [pending] python-pip sqlite [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter installing python-appdirs... installing python-more-itertools... installing python-ordered-set... installing python-pyparsing... Optional dependencies for python-pyparsing python-railroad-diagrams: for generating Railroad Diagrams python-jinja: for generating Railroad Diagrams [pending] installing python-packaging... installing python-setuptools... installing python-pytz... installing python-babel... installing python-docutils... installing python-imagesize... installing python-markupsafe... installing python-jinja... Optional dependencies for python-jinja python-babel: for i18n support [installed] installing python-pygments... installing python-urllib3... Optional dependencies for python-urllib3 python-pysocks: SOCKS support [pending] python-brotli: Brotli support [pending] python-pyopenssl: security support [pending] python-idna: security support [pending] installing python-chardet... installing python-idna... installing python-requests... Optional dependencies for python-requests python-pysocks: SOCKS proxy support [pending] installing python-snowballstemmer... Optional dependencies for python-snowballstemmer python-pystemmer: for improved performance installing python-sphinx-alabaster-theme... installing python-sphinxcontrib-applehelp... installing python-sphinxcontrib-devhelp... installing python-sphinxcontrib-htmlhelp... installing python-sphinxcontrib-jsmath... installing python-sphinxcontrib-qthelp... installing python-sphinxcontrib-serializinghtml... installing python-sphinx... Optional dependencies for python-sphinx imagemagick: for ext.imgconverter texlive-latexextra: for generation of PDF documentation installing python-ply... installing python-pycparser... installing python-cffi... installing python-cryptography... installing python-pyopenssl... installing python-pyasn1... installing python-ndg-httpsclient... installing python-pysocks... installing python-six... installing python-zipp... installing python-importlib-metadata... installing python-pbr... installing python-mock... installing python-brotli... installing python-sphinx-basic-ng... installing python-soupsieve... installing python-beautifulsoup4... Optional dependencies for python-beautifulsoup4 python-chardet: to autodetect character encodings [installed] python-lxml: alternative HTML parser python-html5lib: alternative HTML parser installing python-sphinx-furo... installing python-attrs... installing python-iniconfig... installing python-pluggy... installing python-apipkg... installing python-py... installing python-tomli... installing python-pytest... installing python-pytest-runner... installing python-tornado... Optional dependencies for python-tornado python-pycurl: for tornado.curl_httpclient python-twisted: for tornado.platform.twisted installing python-nose... installing python-psutil... installing python-trustme... installing python-retrying... installing python-lazy-object-proxy... installing python-typing_extensions... installing python-wrapt... installing python-astroid... installing python-dill... Optional dependencies for python-dill python-objgraph: graph support installing python-toml... installing python-isort... installing python-mccabe... installing python-platformdirs... installing python-tomlkit... installing python-pylint... Optional dependencies for python-pylint graphviz: Enable output formats other than dot or vcg tk: Pylint GUI installing python-gcp-devrel-py-tools... installing python-flaky... installing python-dateutil... [?25h==> Retrieving sources...  -> Found python-urllib3-1.26.9.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting python-urllib3-1.26.9.tar.gz with bsdtar ==> Starting build()... /usr/lib/python3.10/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'provides-extra' will not be supported in future versions. Please use the underscore name 'provides_extra' instead warnings.warn( /usr/lib/python3.10/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'requires-dist' will not be supported in future versions. Please use the underscore name 'requires_dist' instead warnings.warn( running build running build_py creating build creating build/lib creating build/lib/urllib3 copying src/urllib3/poolmanager.py -> build/lib/urllib3 copying src/urllib3/_collections.py -> build/lib/urllib3 copying src/urllib3/filepost.py -> build/lib/urllib3 copying src/urllib3/connectionpool.py -> build/lib/urllib3 copying src/urllib3/_version.py -> build/lib/urllib3 copying src/urllib3/connection.py -> build/lib/urllib3 copying src/urllib3/fields.py -> build/lib/urllib3 copying src/urllib3/exceptions.py -> build/lib/urllib3 copying src/urllib3/__init__.py -> build/lib/urllib3 copying src/urllib3/request.py -> build/lib/urllib3 copying src/urllib3/response.py -> build/lib/urllib3 creating build/lib/urllib3/packages copying src/urllib3/packages/six.py -> build/lib/urllib3/packages copying src/urllib3/packages/__init__.py -> build/lib/urllib3/packages creating build/lib/urllib3/packages/backports copying src/urllib3/packages/backports/makefile.py -> build/lib/urllib3/packages/backports copying src/urllib3/packages/backports/__init__.py -> build/lib/urllib3/packages/backports creating build/lib/urllib3/contrib copying src/urllib3/contrib/securetransport.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/pyopenssl.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/appengine.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/__init__.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/socks.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/ntlmpool.py -> build/lib/urllib3/contrib copying src/urllib3/contrib/_appengine_environ.py -> build/lib/urllib3/contrib creating build/lib/urllib3/contrib/_securetransport copying src/urllib3/contrib/_securetransport/low_level.py -> build/lib/urllib3/contrib/_securetransport copying src/urllib3/contrib/_securetransport/__init__.py -> build/lib/urllib3/contrib/_securetransport copying src/urllib3/contrib/_securetransport/bindings.py -> build/lib/urllib3/contrib/_securetransport creating build/lib/urllib3/util copying src/urllib3/util/proxy.py -> build/lib/urllib3/util copying src/urllib3/util/ssltransport.py -> build/lib/urllib3/util copying src/urllib3/util/queue.py -> build/lib/urllib3/util copying src/urllib3/util/ssl_.py -> build/lib/urllib3/util copying src/urllib3/util/connection.py -> build/lib/urllib3/util copying src/urllib3/util/__init__.py -> build/lib/urllib3/util copying src/urllib3/util/request.py -> build/lib/urllib3/util copying src/urllib3/util/ssl_match_hostname.py -> build/lib/urllib3/util copying src/urllib3/util/retry.py -> build/lib/urllib3/util copying src/urllib3/util/wait.py -> build/lib/urllib3/util copying src/urllib3/util/url.py -> build/lib/urllib3/util copying src/urllib3/util/timeout.py -> build/lib/urllib3/util copying src/urllib3/util/response.py -> build/lib/urllib3/util sphinx-build -b html -d _build/doctrees '-W' . _build/html Running Sphinx v5.1.1 making output directory... done loading intersphinx inventory from https://docs.python.org/3/objects.inv... building [mo]: targets for 0 po files that are out of date building [html]: targets for 21 source files that are out of date updating environment: [new config] 21 added, 0 changed, 0 removed reading sources... [ 4%] advanced-usage reading sources... [ 9%] contributing reading sources... [ 14%] index reading sources... [ 19%] reference/contrib/appengine reading sources... [ 23%] reference/contrib/index reading sources... [ 28%] reference/contrib/ntlmpool reading sources... [ 33%] reference/contrib/pyopenssl reading sources... [ 38%] reference/contrib/securetransport reading sources... [ 42%] reference/contrib/socks reading sources... [ 47%] reference/index reading sources... [ 52%] reference/urllib3.connection reading sources... [ 57%] reference/urllib3.connectionpool reading sources... [ 61%] reference/urllib3.exceptions reading sources... [ 66%] reference/urllib3.fields reading sources... [ 71%] reference/urllib3.poolmanager reading sources... [ 76%] reference/urllib3.request reading sources... [ 80%] reference/urllib3.response reading sources... [ 85%] reference/urllib3.util reading sources... [ 90%] sponsors reading sources... [ 95%] user-guide reading sources... [100%] v2-roadmap looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [ 4%] advanced-usage writing output... [ 9%] contributing writing output... [ 14%] index writing output... [ 19%] reference/contrib/appengine writing output... [ 23%] reference/contrib/index writing output... [ 28%] reference/contrib/ntlmpool writing output... [ 33%] reference/contrib/pyopenssl writing output... [ 38%] reference/contrib/securetransport writing output... [ 42%] reference/contrib/socks writing output... [ 47%] reference/index writing output... [ 52%] reference/urllib3.connection writing output... [ 57%] reference/urllib3.connectionpool writing output... [ 61%] reference/urllib3.exceptions writing output... [ 66%] reference/urllib3.fields writing output... [ 71%] reference/urllib3.poolmanager writing output... [ 76%] reference/urllib3.request writing output... [ 80%] reference/urllib3.response writing output... [ 85%] reference/urllib3.util writing output... [ 90%] sponsors writing output... [ 95%] user-guide writing output... [100%] v2-roadmap generating indices... genindex py-modindex done writing additional pages... search done copying static files... done copying extra files... done dumping search index in English (code: en)... done dumping object inventory... done build succeeded. The HTML pages are in _build/html. Build finished. The HTML pages are in _build/html. ==> Starting check()... /usr/lib/python3.10/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'provides-extra' will not be supported in future versions. Please use the underscore name 'provides_extra' instead warnings.warn( /usr/lib/python3.10/site-packages/setuptools/dist.py:720: UserWarning: Usage of dash-separated 'requires-dist' will not be supported in future versions. Please use the underscore name 'requires_dist' instead warnings.warn( running pytest running egg_info creating src/urllib3.egg-info writing src/urllib3.egg-info/PKG-INFO writing dependency_links to src/urllib3.egg-info/dependency_links.txt writing requirements to src/urllib3.egg-info/requires.txt writing top-level names to src/urllib3.egg-info/top_level.txt writing manifest file 'src/urllib3.egg-info/SOURCES.txt' reading manifest file 'src/urllib3.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching 'Makefile' adding license file 'LICENSE.txt' writing manifest file 'src/urllib3.egg-info/SOURCES.txt' running build_ext ============================= test session starts ============================== platform linux -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0 rootdir: /build/python-urllib3/src/urllib3-1.26.9, configfile: setup.cfg plugins: flaky-3.7.0 collected 1961 items / 54 deselected / 1907 selected test/test_collections.py ....................................s [ 1%] test/test_compatibility.py ... [ 2%] test/test_connection.py .............F [ 2%] test/test_connectionpool.py ............................................ [ 5%] ............................ [ 6%] test/test_exceptions.py ............. [ 7%] test/test_fields.py ............... [ 8%] test/test_filepost.py ........... [ 8%] test/test_no_ssl.py .. [ 8%] test/test_poolmanager.py .......................... [ 10%] test/test_proxymanager.py ...... [ 10%] test/test_queue_monkeypatch.py . [ 10%] test/test_response.py .................................................. [ 13%] .................. [ 14%] test/test_retry.py ................................ [ 15%] test/test_retry_deprecated.py .......................................... [ 17%] . [ 17%] test/test_ssl.py .................................. [ 19%] test/test_ssltransport.py .........Exception in thread Thread-9: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create ...... [ 20%] test/test_util.py ...................................................... [ 23%] ........................................................................ [ 27%] ..........................................................ss..s...s..... [ 30%] .................................................................. [ 34%] test/test_wait.py ............. [ 35%] test/contrib/test_pyopenssl.py ......................................... [ 37%] .........s.sssss..........ssssssssssssssssssssssssssssssssssssssssssssss [ 41%] ssssssssssssssssssssssssssssssssssssssss................................ [ 44%] .......s..........................................s..................... [ 48%] .....FException in thread Thread-59: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1275, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( F File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake ......... [ 49%] test/contrib/test_pyopenssl_dependencies.py .. [ 49%] test/contrib/test_securetransport.py sssssssssssssssssssssssssssssssssss [ 51%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 55%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 58%] ssssssssssssssssssssssssssssssssssssssssss [ 61%] test/contrib/test_socks.py .................. [ 62%] test/with_dummyserver/test_chunked_transfer.py ................ [ 62%] test/with_dummyserver/test_connectionpool.py ........................... [ 64%] ........................................................................ [ 68%] ........................................................................ [ 71%] ........................................................................ [ 75%] ........................................................................ [ 79%] .................s................... [ 81%] test/with_dummyserver/test_https.py .................................s.s [ 83%] sss....sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 86%] sssssssssssssssssssss................................................... [ 90%] .......................................... [ 92%] test/with_dummyserver/test_no_ssl.py .. [ 93%] test/with_dummyserver/test_poolmanager.py .......................... [ 94%] test/with_dummyserver/test_proxy_poolmanager.py ...s.s.................. [ 95%] ...................... [ 96%] test/with_dummyserver/test_socketlevel.py .............................. [ 98%] ..Exception in thread Thread-164: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1234, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) Exception in thread Thread-165: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1234, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) FException in thread Thread-166: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1275, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket Exception in thread Thread-167: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1275, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake F self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) ....Exception in thread Thread-169: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1373, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket Exception in thread Thread-170: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-171: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create Exception in thread Thread-173: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner Exception in thread Thread-172: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self.run() self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.server = self._start_server() self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1410, in socket_handler self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1410, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1410, in socket_handler self.socket_handler(sock) return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1410, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create return context.wrap_socket( self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) F..................... [100%] =================================== FAILURES =================================== _______________________ TestConnection.test_recent_date ________________________ self = def test_recent_date(self): # This test is to make sure that the RECENT_DATE value # doesn't get too far behind what the current date is. # When this test fails update urllib3.connection.RECENT_DATE # according to the rules defined in that file. two_years = datetime.timedelta(days=365 * 2) > assert RECENT_DATE > (datetime.datetime.today() - two_years).date() E AssertionError: assert datetime.date(2020, 7, 1) > datetime.date(2020, 8, 10) E + where datetime.date(2020, 8, 10) = () E + where = (datetime.datetime(2022, 8, 10, 2, 11, 38, 912082) - datetime.timedelta(days=730)).date E + where datetime.datetime(2022, 8, 10, 2, 11, 38, 912082) = () E + where = .today E + where = datetime.datetime test/test_connection.py:139: AssertionError ________________________ TestSSL.test_ssl_read_timeout _________________________ self = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = b'localhost' def wrap_socket( self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, ): cnx = OpenSSL.SSL.Connection(self._ctx, sock) if isinstance(server_hostname, six.text_type): # Platform-specific: Python 3 server_hostname = server_hostname.encode("utf-8") if server_hostname is not None: cnx.set_tlsext_host_name(server_hostname) cnx.set_connect_state() while True: try: > cnx.do_handshake() src/urllib3/contrib/pyopenssl.py:498: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def do_handshake(self): """ Perform an SSL handshake (usually called after :meth:`renegotiate` or one of :meth:`set_accept_state` or :meth:`set_connect_state`). This can raise the same exceptions as :meth:`send` and :meth:`recv`. :return: None. """ result = _lib.SSL_do_handshake(self._ssl) > self._raise_ssl_error(self._ssl, result) /usr/lib/python3.10/site-packages/OpenSSL/SSL.py:1991: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = ssl = , result = -1 def _raise_ssl_error(self, ssl, result): if self._context._verify_helper is not None: self._context._verify_helper.raise_if_problem() if self._context._alpn_select_helper is not None: self._context._alpn_select_helper.raise_if_problem() if self._context._ocsp_helper is not None: self._context._ocsp_helper.raise_if_problem() error = _lib.SSL_get_error(ssl, result) if error == _lib.SSL_ERROR_WANT_READ: > raise WantReadError() E OpenSSL.SSL.WantReadError /usr/lib/python3.10/site-packages/OpenSSL/SSL.py:1675: WantReadError During handling of the above exception, another exception occurred: self = conn = method = 'GET', url = '/' timeout = Timeout(connect=0.01, read=0.01, total=None), chunked = False httplib_request_kw = {'body': None, 'headers': {}} timeout_obj = Timeout(connect=0.01, read=0.01, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: > self._validate_conn(conn) src/urllib3/connectionpool.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = conn = def _validate_conn(self, conn): """ Called right before a request is made, after the socket is created. """ super(HTTPSConnectionPool, self)._validate_conn(conn) # Force connect early to allow us to validate the connection. if not getattr(conn, "sock", None): # AppEngine might not have `.sock` > conn.connect() src/urllib3/connectionpool.py:1040: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def connect(self): # Add certificate verification self.sock = conn = self._new_conn() hostname = self.host tls_in_tls = False if self._is_using_tunnel(): if self.tls_in_tls_required: self.sock = conn = self._connect_tls_proxy(hostname, conn) tls_in_tls = True # Calls self._set_hostport(), so self.host is # self._tunnel_host below. self._tunnel() # Mark this connection as not reusable self.auto_open = 0 # Override the host with the one we're requesting data from. hostname = self._tunnel_host server_hostname = hostname if self.server_hostname is not None: server_hostname = self.server_hostname is_time_off = datetime.date.today() < RECENT_DATE if is_time_off: warnings.warn( ( "System time is way off (before {0}). This will probably " "lead to SSL verification errors" ).format(RECENT_DATE), SystemTimeWarning, ) # Wrap socket using verification with the root certs in # trusted_root_certs default_ssl_context = False if self.ssl_context is None: default_ssl_context = True self.ssl_context = create_urllib3_context( ssl_version=resolve_ssl_version(self.ssl_version), cert_reqs=resolve_cert_reqs(self.cert_reqs), ) context = self.ssl_context context.verify_mode = resolve_cert_reqs(self.cert_reqs) # Try to load OS default certs if none are given. # Works well on Windows (requires Python3.4+) if ( not self.ca_certs and not self.ca_cert_dir and not self.ca_cert_data and default_ssl_context and hasattr(context, "load_default_certs") ): context.load_default_certs() > self.sock = ssl_wrap_socket( sock=conn, keyfile=self.key_file, certfile=self.cert_file, key_password=self.key_password, ca_certs=self.ca_certs, ca_cert_dir=self.ca_cert_dir, ca_cert_data=self.ca_cert_data, server_hostname=server_hostname, ssl_context=context, tls_in_tls=tls_in_tls, ) src/urllib3/connection.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = keyfile = None, certfile = None, cert_reqs = None ca_certs = '/build/python-urllib3/src/urllib3-1.26.9/dummyserver/certs/cacert.pem' server_hostname = 'localhost', ssl_version = None, ciphers = None ssl_context = ca_cert_dir = None, key_password = None, ca_cert_data = None, tls_in_tls = False def ssl_wrap_socket( sock, keyfile=None, certfile=None, cert_reqs=None, ca_certs=None, server_hostname=None, ssl_version=None, ciphers=None, ssl_context=None, ca_cert_dir=None, key_password=None, ca_cert_data=None, tls_in_tls=False, ): """ All arguments except for server_hostname, ssl_context, and ca_cert_dir have the same meaning as they do when using :func:`ssl.wrap_socket`. :param server_hostname: When SNI is supported, the expected hostname of the certificate :param ssl_context: A pre-made :class:`SSLContext` object. If none is provided, one will be created using :func:`create_urllib3_context`. :param ciphers: A string of ciphers we wish the client to support. :param ca_cert_dir: A directory containing CA certificates in multiple separate files, as supported by OpenSSL's -CApath flag or the capath argument to SSLContext.load_verify_locations(). :param key_password: Optional password if the keyfile is encrypted. :param ca_cert_data: Optional string containing CA certificates in PEM format suitable for passing as the cadata parameter to SSLContext.load_verify_locations() :param tls_in_tls: Use SSLTransport to wrap the existing socket. """ context = ssl_context if context is None: # Note: This branch of code and all the variables in it are no longer # used by urllib3 itself. We should consider deprecating and removing # this code. context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers) if ca_certs or ca_cert_dir or ca_cert_data: try: context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data) except (IOError, OSError) as e: raise SSLError(e) elif ssl_context is None and hasattr(context, "load_default_certs"): # try to load OS default certs; works well on Windows (require Python3.4+) context.load_default_certs() # Attempt to detect if we get the goofy behavior of the # keyfile being encrypted and OpenSSL asking for the # passphrase via the terminal and instead error out. if keyfile and key_password is None and _is_key_file_encrypted(keyfile): raise SSLError("Client private key is encrypted, password is required") if certfile: if key_password is None: context.load_cert_chain(certfile, keyfile) else: context.load_cert_chain(certfile, keyfile, key_password) try: if hasattr(context, "set_alpn_protocols"): context.set_alpn_protocols(ALPN_PROTOCOLS) except NotImplementedError: # Defensive: in CI, we always have set_alpn_protocols pass # If we detect server_hostname is an IP address then the SNI # extension should not be used according to RFC3546 Section 3.1 use_sni_hostname = server_hostname and not is_ipaddress(server_hostname) # SecureTransport uses server_hostname in certificate verification. send_sni = (use_sni_hostname and HAS_SNI) or ( IS_SECURETRANSPORT and server_hostname ) # Do not warn the user if server_hostname is an invalid SNI hostname. if not HAS_SNI and use_sni_hostname: warnings.warn( "An HTTPS request has been made, but the SNI (Server Name " "Indication) extension to TLS is not available on this platform. " "This may cause the server to present an incorrect TLS " "certificate, which can cause validation failures. You can upgrade to " "a newer version of Python to solve this. For more information, see " "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" "#ssl-warnings", SNIMissingWarning, ) if send_sni: > ssl_sock = _ssl_wrap_socket_impl( sock, context, tls_in_tls, server_hostname=server_hostname ) src/urllib3/util/ssl_.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = ssl_context = tls_in_tls = False, server_hostname = 'localhost' def _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname=None): if tls_in_tls: if not SSLTransport: # Import error, ssl is not available. raise ProxySchemeUnsupported( "TLS in TLS requires support for the 'ssl' module" ) SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context) return SSLTransport(sock, ssl_context, server_hostname) if server_hostname: > return ssl_context.wrap_socket(sock, server_hostname=server_hostname) src/urllib3/util/ssl_.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = b'localhost' def wrap_socket( self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, ): cnx = OpenSSL.SSL.Connection(self._ctx, sock) if isinstance(server_hostname, six.text_type): # Platform-specific: Python 3 server_hostname = server_hostname.encode("utf-8") if server_hostname is not None: cnx.set_tlsext_host_name(server_hostname) cnx.set_connect_state() while True: try: cnx.do_handshake() except OpenSSL.SSL.WantReadError: if not util.wait_for_read(sock, sock.gettimeout()): > raise timeout("select timed out") E TimeoutError: select timed out src/urllib3/contrib/pyopenssl.py:501: TimeoutError During handling of the above exception, another exception occurred: self = method = 'GET', url = '/', body = None, headers = {} retries = Retry(total=0, connect=None, read=None, redirect=None, status=None) redirect = True, assert_same_host = True, timeout = 0.01, pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # 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 = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) src/urllib3/connectionpool.py:703: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = conn = method = 'GET', url = '/' timeout = Timeout(connect=0.01, read=0.01, total=None), chunked = False httplib_request_kw = {'body': None, 'headers': {}} timeout_obj = Timeout(connect=0.01, read=0.01, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. > self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) src/urllib3/connectionpool.py:389: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('select timed out'), url = '/', timeout_value = 0.01 def _raise_timeout(self, err, url, timeout_value): """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, "Read timed out. (read timeout=%s)" % timeout_value ) E urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='localhost', port=35937): Read timed out. (read timeout=0.01) src/urllib3/connectionpool.py:340: ReadTimeoutError During handling of the above exception, another exception occurred: self = @notSecureTransport def test_ssl_read_timeout(self): timed_out = Event() def socket_handler(listener): sock = listener.accept()[0] ssl_sock = ssl.wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ) buf = b"" while not buf.endswith(b"\r\n\r\n"): buf += ssl_sock.recv(65536) # Send incomplete message (note Content-Length) ssl_sock.send( ( "HTTP/1.1 200 OK\r\n" "Content-Type: text/plain\r\n" "Content-Length: 10\r\n" "\r\n" "Hi-" ).encode("utf-8") ) timed_out.wait() sock.close() ssl_sock.close() self._start_server(socket_handler) with HTTPSConnectionPool(self.host, self.port, ca_certs=DEFAULT_CA) as pool: > response = pool.urlopen( "GET", "/", retries=0, preload_content=False, timeout=LONG_TIMEOUT ) test/with_dummyserver/test_socketlevel.py:1262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/urllib3/connectionpool.py:785: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=None, redirect=None, status=None) method = 'GET', url = '/', response = None error = ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=35937): Read timed out. (read timeout=0.01)") _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=35937): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=35937): Read timed out. (read timeout=0.01)")) src/urllib3/util/retry.py:592: MaxRetryError _______________ TestSSL.test_ssl_failed_fingerprint_verification _______________ self = def test_ssl_failed_fingerprint_verification(self): def socket_handler(listener): for i in range(2): sock = listener.accept()[0] ssl_sock = ssl.wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 5\r\n\r\n" b"Hello" ) ssl_sock.close() sock.close() self._start_server(socket_handler) # GitHub's fingerprint. Valid, but not matching. fingerprint = "A0:C4:A7:46:00:ED:A7:2D:C0:BE:CB:9A:8C:B6:07:CA:58:EE:74:5E" def request(): pool = HTTPSConnectionPool( self.host, self.port, assert_fingerprint=fingerprint ) try: timeout = Timeout(connect=LONG_TIMEOUT, read=SHORT_TIMEOUT) response = pool.urlopen( "GET", "/", preload_content=False, retries=0, timeout=timeout ) response.read() finally: pool.close() with pytest.raises(MaxRetryError) as cm: request() > assert isinstance(cm.value.reason, SSLError) E assert False E + where False = isinstance(ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41613): Read timed out. (read timeout=0.01)"), SSLError) E + where ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41613): Read timed out. (read timeout=0.01)") = MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41613): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41613): Read timed out. (read timeout=0.01)"))').reason E + where MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41613): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41613): Read timed out. (read timeout=0.01)"))') = .value test/with_dummyserver/test_socketlevel.py:1312: AssertionError ________________________ TestSSL.test_ssl_read_timeout _________________________ self = conn = method = 'GET', url = '/' timeout = Timeout(connect=0.01, read=0.01, total=None), chunked = False httplib_request_kw = {'body': None, 'headers': {}} timeout_obj = Timeout(connect=0.01, read=0.01, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: > self._validate_conn(conn) src/urllib3/connectionpool.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = conn = def _validate_conn(self, conn): """ Called right before a request is made, after the socket is created. """ super(HTTPSConnectionPool, self)._validate_conn(conn) # Force connect early to allow us to validate the connection. if not getattr(conn, "sock", None): # AppEngine might not have `.sock` > conn.connect() src/urllib3/connectionpool.py:1040: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def connect(self): # Add certificate verification self.sock = conn = self._new_conn() hostname = self.host tls_in_tls = False if self._is_using_tunnel(): if self.tls_in_tls_required: self.sock = conn = self._connect_tls_proxy(hostname, conn) tls_in_tls = True # Calls self._set_hostport(), so self.host is # self._tunnel_host below. self._tunnel() # Mark this connection as not reusable self.auto_open = 0 # Override the host with the one we're requesting data from. hostname = self._tunnel_host server_hostname = hostname if self.server_hostname is not None: server_hostname = self.server_hostname is_time_off = datetime.date.today() < RECENT_DATE if is_time_off: warnings.warn( ( "System time is way off (before {0}). This will probably " "lead to SSL verification errors" ).format(RECENT_DATE), SystemTimeWarning, ) # Wrap socket using verification with the root certs in # trusted_root_certs default_ssl_context = False if self.ssl_context is None: default_ssl_context = True self.ssl_context = create_urllib3_context( ssl_version=resolve_ssl_version(self.ssl_version), cert_reqs=resolve_cert_reqs(self.cert_reqs), ) context = self.ssl_context context.verify_mode = resolve_cert_reqs(self.cert_reqs) # Try to load OS default certs if none are given. # Works well on Windows (requires Python3.4+) if ( not self.ca_certs and not self.ca_cert_dir and not self.ca_cert_data and default_ssl_context and hasattr(context, "load_default_certs") ): context.load_default_certs() > self.sock = ssl_wrap_socket( sock=conn, keyfile=self.key_file, certfile=self.cert_file, key_password=self.key_password, ca_certs=self.ca_certs, ca_cert_dir=self.ca_cert_dir, ca_cert_data=self.ca_cert_data, server_hostname=server_hostname, ssl_context=context, tls_in_tls=tls_in_tls, ) src/urllib3/connection.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = keyfile = None, certfile = None, cert_reqs = None ca_certs = '/build/python-urllib3/src/urllib3-1.26.9/dummyserver/certs/cacert.pem' server_hostname = 'localhost', ssl_version = None, ciphers = None ssl_context = , ca_cert_dir = None key_password = None, ca_cert_data = None, tls_in_tls = False def ssl_wrap_socket( sock, keyfile=None, certfile=None, cert_reqs=None, ca_certs=None, server_hostname=None, ssl_version=None, ciphers=None, ssl_context=None, ca_cert_dir=None, key_password=None, ca_cert_data=None, tls_in_tls=False, ): """ All arguments except for server_hostname, ssl_context, and ca_cert_dir have the same meaning as they do when using :func:`ssl.wrap_socket`. :param server_hostname: When SNI is supported, the expected hostname of the certificate :param ssl_context: A pre-made :class:`SSLContext` object. If none is provided, one will be created using :func:`create_urllib3_context`. :param ciphers: A string of ciphers we wish the client to support. :param ca_cert_dir: A directory containing CA certificates in multiple separate files, as supported by OpenSSL's -CApath flag or the capath argument to SSLContext.load_verify_locations(). :param key_password: Optional password if the keyfile is encrypted. :param ca_cert_data: Optional string containing CA certificates in PEM format suitable for passing as the cadata parameter to SSLContext.load_verify_locations() :param tls_in_tls: Use SSLTransport to wrap the existing socket. """ context = ssl_context if context is None: # Note: This branch of code and all the variables in it are no longer # used by urllib3 itself. We should consider deprecating and removing # this code. context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers) if ca_certs or ca_cert_dir or ca_cert_data: try: context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data) except (IOError, OSError) as e: raise SSLError(e) elif ssl_context is None and hasattr(context, "load_default_certs"): # try to load OS default certs; works well on Windows (require Python3.4+) context.load_default_certs() # Attempt to detect if we get the goofy behavior of the # keyfile being encrypted and OpenSSL asking for the # passphrase via the terminal and instead error out. if keyfile and key_password is None and _is_key_file_encrypted(keyfile): raise SSLError("Client private key is encrypted, password is required") if certfile: if key_password is None: context.load_cert_chain(certfile, keyfile) else: context.load_cert_chain(certfile, keyfile, key_password) try: if hasattr(context, "set_alpn_protocols"): context.set_alpn_protocols(ALPN_PROTOCOLS) except NotImplementedError: # Defensive: in CI, we always have set_alpn_protocols pass # If we detect server_hostname is an IP address then the SNI # extension should not be used according to RFC3546 Section 3.1 use_sni_hostname = server_hostname and not is_ipaddress(server_hostname) # SecureTransport uses server_hostname in certificate verification. send_sni = (use_sni_hostname and HAS_SNI) or ( IS_SECURETRANSPORT and server_hostname ) # Do not warn the user if server_hostname is an invalid SNI hostname. if not HAS_SNI and use_sni_hostname: warnings.warn( "An HTTPS request has been made, but the SNI (Server Name " "Indication) extension to TLS is not available on this platform. " "This may cause the server to present an incorrect TLS " "certificate, which can cause validation failures. You can upgrade to " "a newer version of Python to solve this. For more information, see " "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" "#ssl-warnings", SNIMissingWarning, ) if send_sni: > ssl_sock = _ssl_wrap_socket_impl( sock, context, tls_in_tls, server_hostname=server_hostname ) src/urllib3/util/ssl_.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = ssl_context = , tls_in_tls = False server_hostname = 'localhost' def _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname=None): if tls_in_tls: if not SSLTransport: # Import error, ssl is not available. raise ProxySchemeUnsupported( "TLS in TLS requires support for the 'ssl' module" ) SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context) return SSLTransport(sock, ssl_context, server_hostname) if server_hostname: > return ssl_context.wrap_socket(sock, server_hostname=server_hostname) src/urllib3/util/ssl_.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = 'localhost', session = None def wrap_socket(self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, session=None): # SSLSocket class handles server_hostname encoding before it calls # ctx._wrap_socket() > return self.sslsocket_class._create( sock=sock, server_side=server_side, do_handshake_on_connect=do_handshake_on_connect, suppress_ragged_eofs=suppress_ragged_eofs, server_hostname=server_hostname, context=self, session=session ) /usr/lib/python3.10/ssl.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = 'localhost', context = session = None @classmethod def _create(cls, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, context=None, session=None): if sock.getsockopt(SOL_SOCKET, SO_TYPE) != SOCK_STREAM: raise NotImplementedError("only stream sockets are supported") if server_side: if server_hostname: raise ValueError("server_hostname can only be specified " "in client mode") if session is not None: raise ValueError("session can only be specified in " "client mode") if context.check_hostname and not server_hostname: raise ValueError("check_hostname requires server_hostname") kwargs = dict( family=sock.family, type=sock.type, proto=sock.proto, fileno=sock.fileno() ) self = cls.__new__(cls, **kwargs) super(SSLSocket, self).__init__(**kwargs) self.settimeout(sock.gettimeout()) sock.detach() self._context = context self._session = session self._closed = False self._sslobj = None self.server_side = server_side self.server_hostname = context._encode_hostname(server_hostname) self.do_handshake_on_connect = do_handshake_on_connect self.suppress_ragged_eofs = suppress_ragged_eofs # See if we are connected try: self.getpeername() except OSError as e: if e.errno != errno.ENOTCONN: raise connected = False else: connected = True self._connected = connected if connected: # create the SSL object try: self._sslobj = self._context._wrap_socket( self, server_side, self.server_hostname, owner=self, session=self._session, ) if do_handshake_on_connect: timeout = self.gettimeout() if timeout == 0.0: # non-blocking raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets") > self.do_handshake() /usr/lib/python3.10/ssl.py:1071: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = block = False @_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None) > self._sslobj.do_handshake() E TimeoutError: _ssl.c:980: The handshake operation timed out /usr/lib/python3.10/ssl.py:1342: TimeoutError During handling of the above exception, another exception occurred: self = method = 'GET', url = '/', body = None, headers = {} retries = Retry(total=0, connect=None, read=None, redirect=None, status=None) redirect = True, assert_same_host = True, timeout = 0.01, pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'preload_content': False} parsed_url = Url(scheme=None, auth=None, host=None, port=None, path='/', query=None, fragment=None) destination_scheme = None, conn = None, release_this_conn = True http_tunnel_required = False, err = None, clean_exit = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parsed_url.url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # 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 = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn and http_tunnel_required: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) src/urllib3/connectionpool.py:703: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = conn = method = 'GET', url = '/' timeout = Timeout(connect=0.01, read=0.01, total=None), chunked = False httplib_request_kw = {'body': None, 'headers': {}} timeout_obj = Timeout(connect=0.01, read=0.01, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: self._validate_conn(conn) except (SocketTimeout, BaseSSLError) as e: # Py2 raises this as a BaseSSLError, Py3 raises it as socket timeout. > self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) src/urllib3/connectionpool.py:389: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('_ssl.c:980: The handshake operation timed out'), url = '/' timeout_value = 0.01 def _raise_timeout(self, err, url, timeout_value): """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, "Read timed out. (read timeout=%s)" % timeout_value ) E urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='localhost', port=40453): Read timed out. (read timeout=0.01) src/urllib3/connectionpool.py:340: ReadTimeoutError During handling of the above exception, another exception occurred: self = @notSecureTransport def test_ssl_read_timeout(self): timed_out = Event() def socket_handler(listener): sock = listener.accept()[0] ssl_sock = ssl.wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ) buf = b"" while not buf.endswith(b"\r\n\r\n"): buf += ssl_sock.recv(65536) # Send incomplete message (note Content-Length) ssl_sock.send( ( "HTTP/1.1 200 OK\r\n" "Content-Type: text/plain\r\n" "Content-Length: 10\r\n" "\r\n" "Hi-" ).encode("utf-8") ) timed_out.wait() sock.close() ssl_sock.close() self._start_server(socket_handler) with HTTPSConnectionPool(self.host, self.port, ca_certs=DEFAULT_CA) as pool: > response = pool.urlopen( "GET", "/", retries=0, preload_content=False, timeout=LONG_TIMEOUT ) test/with_dummyserver/test_socketlevel.py:1262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/urllib3/connectionpool.py:785: in urlopen retries = retries.increment( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=None, redirect=None, status=None) method = 'GET', url = '/', response = None error = ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=40453): Read timed out. (read timeout=0.01)") _pool = _stacktrace = def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status other = self.other cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif error: # Other retry? if other is not None: other -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and the given method is in the allowed_methods cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, other=other, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='localhost', port=40453): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=40453): Read timed out. (read timeout=0.01)")) src/urllib3/util/retry.py:592: MaxRetryError _______________ TestSSL.test_ssl_failed_fingerprint_verification _______________ self = def test_ssl_failed_fingerprint_verification(self): def socket_handler(listener): for i in range(2): sock = listener.accept()[0] ssl_sock = ssl.wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 5\r\n\r\n" b"Hello" ) ssl_sock.close() sock.close() self._start_server(socket_handler) # GitHub's fingerprint. Valid, but not matching. fingerprint = "A0:C4:A7:46:00:ED:A7:2D:C0:BE:CB:9A:8C:B6:07:CA:58:EE:74:5E" def request(): pool = HTTPSConnectionPool( self.host, self.port, assert_fingerprint=fingerprint ) try: timeout = Timeout(connect=LONG_TIMEOUT, read=SHORT_TIMEOUT) response = pool.urlopen( "GET", "/", preload_content=False, retries=0, timeout=timeout ) response.read() finally: pool.close() with pytest.raises(MaxRetryError) as cm: request() > assert isinstance(cm.value.reason, SSLError) E assert False E + where False = isinstance(ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41787): Read timed out. (read timeout=0.01)"), SSLError) E + where ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41787): Read timed out. (read timeout=0.01)") = MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41787): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41787): Read timed out. (read timeout=0.01)"))').reason E + where MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41787): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41787): Read timed out. (read timeout=0.01)"))') = .value test/with_dummyserver/test_socketlevel.py:1312: AssertionError ----------------------------- Captured stderr call ----------------------------- return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) ____________ TestSSL.test_ssl_custom_validation_failure_terminates _____________ self = conn = method = 'GET', url = '/' timeout = Timeout(connect=0.01, read=0.01, total=None), chunked = False httplib_request_kw = {'body': None, 'headers': {}} timeout_obj = Timeout(connect=0.01, read=0.01, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: > self._validate_conn(conn) src/urllib3/connectionpool.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = conn = def _validate_conn(self, conn): """ Called right before a request is made, after the socket is created. """ super(HTTPSConnectionPool, self)._validate_conn(conn) # Force connect early to allow us to validate the connection. if not getattr(conn, "sock", None): # AppEngine might not have `.sock` > conn.connect() src/urllib3/connectionpool.py:1040: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def connect(self): # Add certificate verification self.sock = conn = self._new_conn() hostname = self.host tls_in_tls = False if self._is_using_tunnel(): if self.tls_in_tls_required: self.sock = conn = self._connect_tls_proxy(hostname, conn) tls_in_tls = True # Calls self._set_hostport(), so self.host is # self._tunnel_host below. self._tunnel() # Mark this connection as not reusable self.auto_open = 0 # Override the host with the one we're requesting data from. hostname = self._tunnel_host server_hostname = hostname if self.server_hostname is not None: server_hostname = self.server_hostname is_time_off = datetime.date.today() < RECENT_DATE if is_time_off: warnings.warn( ( "System time is way off (before {0}). This will probably " "lead to SSL verification errors" ).format(RECENT_DATE), SystemTimeWarning, ) # Wrap socket using verification with the root certs in # trusted_root_certs default_ssl_context = False if self.ssl_context is None: default_ssl_context = True self.ssl_context = create_urllib3_context( ssl_version=resolve_ssl_version(self.ssl_version), cert_reqs=resolve_cert_reqs(self.cert_reqs), ) context = self.ssl_context context.verify_mode = resolve_cert_reqs(self.cert_reqs) # Try to load OS default certs if none are given. # Works well on Windows (requires Python3.4+) if ( not self.ca_certs and not self.ca_cert_dir and not self.ca_cert_data and default_ssl_context and hasattr(context, "load_default_certs") ): context.load_default_certs() > self.sock = ssl_wrap_socket( sock=conn, keyfile=self.key_file, certfile=self.cert_file, key_password=self.key_password, ca_certs=self.ca_certs, ca_cert_dir=self.ca_cert_dir, ca_cert_data=self.ca_cert_data, server_hostname=server_hostname, ssl_context=context, tls_in_tls=tls_in_tls, ) src/urllib3/connection.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = keyfile = None, certfile = None, cert_reqs = None ca_certs = '/tmp/pytest-of-builduser/pytest-0/test_ssl_custom_validation_fai2/ca.pem' server_hostname = 'localhost', ssl_version = None, ciphers = None ssl_context = , ca_cert_dir = None key_password = None, ca_cert_data = None, tls_in_tls = False def ssl_wrap_socket( sock, keyfile=None, certfile=None, cert_reqs=None, ca_certs=None, server_hostname=None, ssl_version=None, ciphers=None, ssl_context=None, ca_cert_dir=None, key_password=None, ca_cert_data=None, tls_in_tls=False, ): """ All arguments except for server_hostname, ssl_context, and ca_cert_dir have the same meaning as they do when using :func:`ssl.wrap_socket`. :param server_hostname: When SNI is supported, the expected hostname of the certificate :param ssl_context: A pre-made :class:`SSLContext` object. If none is provided, one will be created using :func:`create_urllib3_context`. :param ciphers: A string of ciphers we wish the client to support. :param ca_cert_dir: A directory containing CA certificates in multiple separate files, as supported by OpenSSL's -CApath flag or the capath argument to SSLContext.load_verify_locations(). :param key_password: Optional password if the keyfile is encrypted. :param ca_cert_data: Optional string containing CA certificates in PEM format suitable for passing as the cadata parameter to SSLContext.load_verify_locations() :param tls_in_tls: Use SSLTransport to wrap the existing socket. """ context = ssl_context if context is None: # Note: This branch of code and all the variables in it are no longer # used by urllib3 itself. We should consider deprecating and removing # this code. context = create_urllib3_context(ssl_version, cert_reqs, ciphers=ciphers) if ca_certs or ca_cert_dir or ca_cert_data: try: context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data) except (IOError, OSError) as e: raise SSLError(e) elif ssl_context is None and hasattr(context, "load_default_certs"): # try to load OS default certs; works well on Windows (require Python3.4+) context.load_default_certs() # Attempt to detect if we get the goofy behavior of the # keyfile being encrypted and OpenSSL asking for the # passphrase via the terminal and instead error out. if keyfile and key_password is None and _is_key_file_encrypted(keyfile): raise SSLError("Client private key is encrypted, password is required") if certfile: if key_password is None: context.load_cert_chain(certfile, keyfile) else: context.load_cert_chain(certfile, keyfile, key_password) try: if hasattr(context, "set_alpn_protocols"): context.set_alpn_protocols(ALPN_PROTOCOLS) except NotImplementedError: # Defensive: in CI, we always have set_alpn_protocols pass # If we detect server_hostname is an IP address then the SNI # extension should not be used according to RFC3546 Section 3.1 use_sni_hostname = server_hostname and not is_ipaddress(server_hostname) # SecureTransport uses server_hostname in certificate verification. send_sni = (use_sni_hostname and HAS_SNI) or ( IS_SECURETRANSPORT and server_hostname ) # Do not warn the user if server_hostname is an invalid SNI hostname. if not HAS_SNI and use_sni_hostname: warnings.warn( "An HTTPS request has been made, but the SNI (Server Name " "Indication) extension to TLS is not available on this platform. " "This may cause the server to present an incorrect TLS " "certificate, which can cause validation failures. You can upgrade to " "a newer version of Python to solve this. For more information, see " "https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html" "#ssl-warnings", SNIMissingWarning, ) if send_sni: > ssl_sock = _ssl_wrap_socket_impl( sock, context, tls_in_tls, server_hostname=server_hostname ) src/urllib3/util/ssl_.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sock = ssl_context = , tls_in_tls = False server_hostname = 'localhost' def _ssl_wrap_socket_impl(sock, ssl_context, tls_in_tls, server_hostname=None): if tls_in_tls: if not SSLTransport: # Import error, ssl is not available. raise ProxySchemeUnsupported( "TLS in TLS requires support for the 'ssl' module" ) SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context) return SSLTransport(sock, ssl_context, server_hostname) if server_hostname: > return ssl_context.wrap_socket(sock, server_hostname=server_hostname) src/urllib3/util/ssl_.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = 'localhost', session = None def wrap_socket(self, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, session=None): # SSLSocket class handles server_hostname encoding before it calls # ctx._wrap_socket() > return self.sslsocket_class._create( sock=sock, server_side=server_side, do_handshake_on_connect=do_handshake_on_connect, suppress_ragged_eofs=suppress_ragged_eofs, server_hostname=server_hostname, context=self, session=session ) /usr/lib/python3.10/ssl.py:513: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = sock = server_side = False, do_handshake_on_connect = True, suppress_ragged_eofs = True server_hostname = 'localhost', context = session = None @classmethod def _create(cls, sock, server_side=False, do_handshake_on_connect=True, suppress_ragged_eofs=True, server_hostname=None, context=None, session=None): if sock.getsockopt(SOL_SOCKET, SO_TYPE) != SOCK_STREAM: raise NotImplementedError("only stream sockets are supported") if server_side: if server_hostname: raise ValueError("server_hostname can only be specified " "in client mode") if session is not None: raise ValueError("session can only be specified in " "client mode") if context.check_hostname and not server_hostname: raise ValueError("check_hostname requires server_hostname") kwargs = dict( family=sock.family, type=sock.type, proto=sock.proto, fileno=sock.fileno() ) self = cls.__new__(cls, **kwargs) super(SSLSocket, self).__init__(**kwargs) self.settimeout(sock.gettimeout()) sock.detach() self._context = context self._session = session self._closed = False self._sslobj = None self.server_side = server_side self.server_hostname = context._encode_hostname(server_hostname) self.do_handshake_on_connect = do_handshake_on_connect self.suppress_ragged_eofs = suppress_ragged_eofs # See if we are connected try: self.getpeername() except OSError as e: if e.errno != errno.ENOTCONN: raise connected = False else: connected = True self._connected = connected if connected: # create the SSL object try: self._sslobj = self._context._wrap_socket( self, server_side, self.server_hostname, owner=self, session=self._session, ) if do_handshake_on_connect: timeout = self.gettimeout() if timeout == 0.0: # non-blocking raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets") > self.do_handshake() /usr/lib/python3.10/ssl.py:1071: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = block = False @_sslcopydoc def do_handshake(self, block=False): self._check_connected() timeout = self.gettimeout() try: if timeout == 0.0 and block: self.settimeout(None) > self._sslobj.do_handshake() E TimeoutError: _ssl.c:980: The handshake operation timed out /usr/lib/python3.10/ssl.py:1342: TimeoutError During handling of the above exception, another exception occurred: self = tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_ssl_custom_validation_fai2') def test_ssl_custom_validation_failure_terminates(self, tmpdir): """ Ensure that the underlying socket is terminated if custom validation fails. """ server_closed = Event() def is_closed_socket(sock): try: sock.settimeout(SHORT_TIMEOUT) # Python 3 sock.recv(1) # Python 2 except (OSError, socket.error): return True return False def socket_handler(listener): sock = listener.accept()[0] try: _ = ssl.wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) except ssl.SSLError as e: assert "alert unknown ca" in str(e) if is_closed_socket(sock): server_closed.set() self._start_server(socket_handler) # client uses a different ca other_ca = trustme.CA() other_ca_path = str(tmpdir / "ca.pem") other_ca.cert_pem.write_to_path(other_ca_path) with HTTPSConnectionPool( self.host, self.port, cert_reqs="REQUIRED", ca_certs=other_ca_path ) as pool: with pytest.raises(SSLError): > pool.request("GET", "/", retries=False, timeout=LONG_TIMEOUT) test/with_dummyserver/test_socketlevel.py:1498: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ src/urllib3/request.py:74: in request return self.request_encode_url( src/urllib3/request.py:96: in request_encode_url return self.urlopen(method, url, **extra_kw) src/urllib3/connectionpool.py:785: in urlopen retries = retries.increment( src/urllib3/util/retry.py:525: in increment raise six.reraise(type(error), error, _stacktrace) src/urllib3/packages/six.py:770: in reraise raise value src/urllib3/connectionpool.py:703: in urlopen httplib_response = self._make_request( src/urllib3/connectionpool.py:389: in _make_request self._raise_timeout(err=e, url=url, timeout_value=conn.timeout) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = err = TimeoutError('_ssl.c:980: The handshake operation timed out'), url = '/' timeout_value = 0.01 def _raise_timeout(self, err, url, timeout_value): """Is the error actually a timeout? Will raise a ReadTimeout or pass""" if isinstance(err, SocketTimeout): > raise ReadTimeoutError( self, url, "Read timed out. (read timeout=%s)" % timeout_value ) E urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='localhost', port=34675): Read timed out. (read timeout=0.01) src/urllib3/connectionpool.py:340: ReadTimeoutError =============================== warnings summary =============================== test/conftest.py:211 /build/python-urllib3/src/urllib3-1.26.9/test/conftest.py:211: PytestDeprecationWarning: @pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same. def stub_timezone(request): ../../../../usr/lib/python3.10/site-packages/gcp_devrel/testing/appengine.py:121 /usr/lib/python3.10/site-packages/gcp_devrel/testing/appengine.py:121: PytestDeprecationWarning: @pytest.yield_fixture is deprecated. Use @pytest.fixture instead; they are the same. def testbed(): test/test_retry.py:323 /build/python-urllib3/src/urllib3-1.26.9/test/test_retry.py:323: PytestUnknownMarkWarning: Unknown pytest.mark.freeze_time - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.freeze_time("2019-06-03 11:00:00", tz_offset=0) test/test_retry_deprecated.py:325 /build/python-urllib3/src/urllib3-1.26.9/test/test_retry_deprecated.py:325: PytestUnknownMarkWarning: Unknown pytest.mark.freeze_time - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.freeze_time("2019-06-03 11:00:00", tz_offset=0) test/test_ssltransport.py:102 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:102: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:111 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:111: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:124 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:124: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:138 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:138: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:152 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:152: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:188 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:188: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:216 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:216: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:347 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:347: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:369 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:369: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:391 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:391: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:427 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:427: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:459 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:459: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssltransport.py:484 /build/python-urllib3/src/urllib3-1.26.9/test/test_ssltransport.py:484: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.timeout(PER_TEST_TIMEOUT) test/test_ssl.py::test_context_sni_with_ip_address[False-www.python.org-False] /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/util/ssl_.py:437: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings warnings.warn( test/test_ssltransport.py::SingleTLSLayerTestCase::test_ssl_object_attributes /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/util/ssltransport.py:169: DeprecationWarning: ssl NPN is deprecated, use ALPN instead return self.sslobj.selected_npn_protocol() test/contrib/test_pyopenssl.py: 48 warnings test/with_dummyserver/test_connectionpool.py: 24 warnings test/with_dummyserver/test_https.py: 43 warnings test/with_dummyserver/test_no_ssl.py: 8 warnings test/with_dummyserver/test_poolmanager.py: 7 warnings test/with_dummyserver/test_proxy_poolmanager.py: 49 warnings /usr/lib/python3.10/site-packages/tornado/ioloop.py:263: DeprecationWarning: There is no current event loop loop = asyncio.get_event_loop() test/contrib/test_pyopenssl.py::TestHTTPS::test_simple /usr/lib/python3.10/site-packages/tornado/platform/asyncio.py:279: DeprecationWarning: There is no current event loop super().initialize(asyncio.get_event_loop(), **kwargs) test/contrib/test_pyopenssl.py: 10 warnings test/with_dummyserver/test_https.py: 9 warnings test/with_dummyserver/test_no_ssl.py: 1 warning test/with_dummyserver/test_proxy_poolmanager.py: 11 warnings /build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py:157: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated ctx = ssl.SSLContext(ssl_version) test/contrib/test_pyopenssl.py: 13 warnings test/with_dummyserver/test_connectionpool.py: 6 warnings test/with_dummyserver/test_https.py: 12 warnings test/with_dummyserver/test_no_ssl.py: 2 warnings test/with_dummyserver/test_poolmanager.py: 2 warnings test/with_dummyserver/test_proxy_poolmanager.py: 6 warnings /usr/lib/python3.10/site-packages/tornado/platform/asyncio.py:193: DeprecationWarning: There is no current event loop old_loop = asyncio.get_event_loop() test/contrib/test_pyopenssl.py: 6 warnings test/with_dummyserver/test_https.py: 6 warnings test/with_dummyserver/test_no_ssl.py: 1 warning test/with_dummyserver/test_proxy_poolmanager.py: 1 warning test/with_dummyserver/test_socketlevel.py: 1 warning /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings warnings.warn( test/contrib/test_pyopenssl.py: 3 warnings test/with_dummyserver/test_https.py: 6 warnings test/with_dummyserver/test_socketlevel.py: 1 warning /build/python-urllib3/src/urllib3-1.26.9/test/__init__.py:71: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated ctx = ctx_cls(protocol=ssl_.PROTOCOL_TLS) test/contrib/test_pyopenssl.py::TestHTTPS_IPv6Addr::test_strip_square_brackets_before_validating[::1] test/contrib/test_pyopenssl.py::TestHTTPS_IPv6Addr::test_strip_square_brackets_before_validating[[::1]] test/with_dummyserver/test_https.py::TestHTTPS_IPv6Addr::test_strip_square_brackets_before_validating[::1] test/with_dummyserver/test_https.py::TestHTTPS_IPv6Addr::test_strip_square_brackets_before_validating[[::1]] /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/connection.py:458: SubjectAltNameWarning: Certificate for ::1 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.) warnings.warn( test/contrib/test_pyopenssl.py::TestHTTPS_NoSAN::test_common_name_without_san_with_different_common_name test/with_dummyserver/test_https.py::TestHTTPS_NoSAN::test_common_name_without_san_with_different_common_name /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/connection.py:458: SubjectAltNameWarning: Certificate for localhost has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/urllib3/urllib3/issues/497 for details.) warnings.warn( test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1::test_simple test/with_dummyserver/test_https.py::TestHTTPS_TLSv1::test_simple /build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py:157: DeprecationWarning: ssl.PROTOCOL_TLSv1 is deprecated ctx = ssl.SSLContext(ssl_version) test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_1::test_simple test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_1::test_simple /build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py:157: DeprecationWarning: ssl.PROTOCOL_TLSv1_1 is deprecated ctx = ssl.SSLContext(ssl_version) test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_simple test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_simple /build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py:157: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated ctx = ssl.SSLContext(ssl_version) test/contrib/test_pyopenssl.py: 5 warnings test/with_dummyserver/test_socketlevel.py: 5 warnings /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:175: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() return ssl.wrap_socket( test/contrib/test_pyopenssl.py: 16 warnings test/with_dummyserver/test_socketlevel.py: 22 warnings /usr/lib/python3.10/ssl.py:1434: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = SSLContext(ssl_version) test/contrib/test_pyopenssl.py::TestSSL::test_ssl_failure_midway_through_conn test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failure_midway_through_conn /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1197: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_ssl_failure_midway_through_conn /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-57 Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1197, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:997) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1234: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-58 Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1234, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/contrib/test_pyopenssl.py::TestSSL::test_ssl_failed_fingerprint_verification test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failed_fingerprint_verification test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failed_fingerprint_verification /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1275: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_retry_ssl_error test/with_dummyserver/test_socketlevel.py::TestSSL::test_retry_ssl_error /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1322: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_retry_ssl_error test/with_dummyserver/test_socketlevel.py::TestSSL::test_retry_ssl_error /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1347: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_ssl_load_default_certs_when_empty test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_load_default_certs_when_empty /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1373: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/contrib/test_pyopenssl.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/contrib/test_pyopenssl.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/contrib/test_pyopenssl.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_dont_load_default_certs_when_given test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_dont_load_default_certs_when_given /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1410: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/contrib/test_pyopenssl.py::TestSSL::test_ssl_dont_load_default_certs_when_given /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-61 Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1373, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/contrib/test_pyopenssl.py::TestSSL::test_ssl_custom_validation_failure_terminates test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_custom_validation_failure_terminates test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_custom_validation_failure_terminates /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1475: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() _ = ssl.wrap_socket( test/contrib/test_securetransport.py::TestUtilSSL::test_resolve_cert_reqs[None-VerifyMode.CERT_REQUIRED] /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-65 Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1410, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/contrib/test_socks.py: 17 warnings /build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py:117: NoIPv6Warning: No IPv6 support. Falling back to IPv4. warnings.warn("No IPv6 support. Falling back to IPv4.", NoIPv6Warning) test/contrib/test_socks.py::TestSOCKSWithTLS::test_basic_request /build/python-urllib3/src/urllib3-1.26.9/test/contrib/test_socks.py:681: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = better_ssl.SSLContext(ssl.PROTOCOL_SSLv23) test/with_dummyserver/test_connectionpool.py::TestRetry::test_retries_wrong_method_list /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_connectionpool.py:1111: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead retry = Retry(total=1, status_forcelist=[418], method_whitelist=["POST"]) test/with_dummyserver/test_https.py::TestHTTPS_TLSv1_2::test_set_ssl_version_to_tls_version /build/python-urllib3/src/urllib3-1.26.9/src/urllib3/util/ssl_.py:290: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated context = SSLContext(ssl_version) test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_string_password test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_bytes_password /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:336: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated ssl_context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23) test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:355: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23) test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_connect_reconn test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_connect_reconn /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1078: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_connect_ipv6_addr /build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py:1130: DeprecationWarning: ssl.wrap_socket() is deprecated, use SSLContext.wrap_socket() ssl_sock = ssl.wrap_socket( test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failure_midway_through_conn /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-163 Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1197, in socket_handler ssl_sock = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:997) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_custom_validation_failure_terminates /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-174 Traceback (most recent call last): File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1475, in socket_handler _ = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1483, in socket_handler assert "alert unknown ca" in str(e) AssertionError: assert 'alert unknown ca' in 'EOF occurred in violation of protocol (_ssl.c:997)' + where 'EOF occurred in violation of protocol (_ssl.c:997)' = str(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_custom_validation_failure_terminates /usr/lib/python3.10/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-175 Traceback (most recent call last): File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1475, in socket_handler _ = ssl.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 1442, in wrap_socket return context.wrap_socket( File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:997) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 134, in run self.server = self._start_server() File "/build/python-urllib3/src/urllib3-1.26.9/dummyserver/server.py", line 130, in _start_server self.socket_handler(sock) File "/build/python-urllib3/src/urllib3-1.26.9/test/with_dummyserver/test_socketlevel.py", line 1483, in socket_handler assert "alert unknown ca" in str(e) AssertionError: assert 'alert unknown ca' in 'EOF occurred in violation of protocol (_ssl.c:997)' + where 'EOF occurred in violation of protocol (_ssl.c:997)' = str(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)')) warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_chunks passed 1 out of the required 1 times. Success! test_bytestring_body passed 1 out of the required 1 times. Success! test_unicode_body passed 1 out of the required 1 times. Success! test_empty_body passed 1 out of the required 1 times. Success! test_empty_string_body passed 1 out of the required 1 times. Success! test_empty_iterable_body passed 1 out of the required 1 times. Success! test_removes_duplicate_host_header passed 1 out of the required 1 times. Success! test_provides_default_host_header passed 1 out of the required 1 times. Success! test_provides_default_user_agent_header passed 1 out of the required 1 times. Success! test_preserve_user_agent_header passed 1 out of the required 1 times. Success! test_remove_user_agent_header passed 1 out of the required 1 times. Success! test_provides_default_transfer_encoding_header passed 1 out of the required 1 times. Success! test_preserve_transfer_encoding_header passed 1 out of the required 1 times. Success! test_preserve_chunked_on_retry_after passed 1 out of the required 1 times. Success! test_preserve_chunked_on_redirect passed 1 out of the required 1 times. Success! test_preserve_chunked_on_broken_connection passed 1 out of the required 1 times. Success! test_timeout_float passed 1 out of the required 1 times. Success! test_conn_closed passed 1 out of the required 1 times. Success! test_timeout passed 1 out of the required 1 times. Success! test_connect_timeout passed 1 out of the required 1 times. Success! test_total_applies_connect passed 1 out of the required 1 times. Success! test_total_timeout passed 1 out of the required 1 times. Success! test_create_connection_timeout passed 1 out of the required 1 times. Success! test_get passed 1 out of the required 1 times. Success! test_post_url passed 1 out of the required 1 times. Success! test_urlopen_put passed 1 out of the required 1 times. Success! test_wrong_specific_method passed 1 out of the required 1 times. Success! test_upload passed 1 out of the required 1 times. Success! test_one_name_multiple_values passed 1 out of the required 1 times. Success! test_request_method_body passed 1 out of the required 1 times. Success! test_unicode_upload passed 1 out of the required 1 times. Success! test_nagle passed 1 out of the required 1 times. Success! test_socket_options passed 1 out of the required 1 times. Success! test_disable_default_socket_options passed 1 out of the required 1 times. Success! test_defaults_are_applied passed 1 out of the required 1 times. Success! test_connection_error_retries passed 1 out of the required 1 times. Success! test_timeout_success passed 1 out of the required 1 times. Success! test_tunnel passed 1 out of the required 1 times. Success! test_redirect passed 1 out of the required 1 times. Success! test_bad_connect passed 1 out of the required 1 times. Success! test_keepalive passed 1 out of the required 1 times. Success! test_keepalive_close passed 1 out of the required 1 times. Success! test_post_with_urlencode passed 1 out of the required 1 times. Success! test_post_with_multipart passed 1 out of the required 1 times. Success! test_post_with_multipart__iter__ passed 1 out of the required 1 times. Success! test_check_gzip passed 1 out of the required 1 times. Success! test_check_deflate passed 1 out of the required 1 times. Success! test_bad_decode passed 1 out of the required 1 times. Success! test_connection_count passed 1 out of the required 1 times. Success! test_connection_count_bigpool passed 1 out of the required 1 times. Success! test_partial_response passed 1 out of the required 1 times. Success! test_lazy_load_twice passed 1 out of the required 1 times. Success! test_for_double_release passed 1 out of the required 1 times. Success! test_release_conn_parameter passed 1 out of the required 1 times. Success! test_dns_error passed 1 out of the required 1 times. Success! test_invalid_method_not_allowed[ ] passed 1 out of the required 1 times. Success! test_invalid_method_not_allowed[\r] passed 1 out of the required 1 times. Success! test_invalid_method_not_allowed[\n] passed 1 out of the required 1 times. Success! test_invalid_method_not_allowed[\x00] passed 1 out of the required 1 times. Success! test_percent_encode_invalid_target_chars passed 1 out of the required 1 times. Success! test_source_address passed 1 out of the required 1 times. Success! test_source_address_error passed 1 out of the required 1 times. Success! test_stream_keepalive passed 1 out of the required 1 times. Success! test_read_chunked_short_circuit passed 1 out of the required 1 times. Success! test_read_chunked_on_closed_response passed 1 out of the required 1 times. Success! test_chunked_gzip passed 1 out of the required 1 times. Success! test_cleanup_on_connection_error passed 1 out of the required 1 times. Success! test_mixed_case_hostname passed 1 out of the required 1 times. Success! test_preserves_path_dot_segments passed 1 out of the required 1 times. Success! test_default_user_agent_header passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-None] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-headers1] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-headers2] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-headers3] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-headers4] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[True-headers5] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-None] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-headers1] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-headers2] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-headers3] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-headers4] passed 1 out of the required 1 times. Success! test_user_agent_header_not_sent_twice[False-headers5] passed 1 out of the required 1 times. Success! test_no_user_agent_header passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent0-None-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent0-None-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-User-Agent1-None-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-user-agent1-None-None] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[True-None-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[True-None-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[True-None-None-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent0-None-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent0-None-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-User-Agent1-None-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-user-agent1-None-None] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host0-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host0-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host0-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host0-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host0-None] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-Host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host1-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host1-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host1-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host1-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-host1-None] passed 1 out of the required 1 times. Success! test_skip_header[False-None-None-Accept-Encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-None-accept-encoding0] passed 1 out of the required 1 times. Success! test_skip_header[False-None-None-Accept-Encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-None-accept-encoding1] passed 1 out of the required 1 times. Success! test_skip_header[False-None-None-None] passed 1 out of the required 1 times. Success! test_skip_header_non_supported[True-Content-Length] passed 1 out of the required 1 times. Success! test_skip_header_non_supported[True-content-length] passed 1 out of the required 1 times. Success! test_skip_header_non_supported[False-Content-Length] passed 1 out of the required 1 times. Success! test_skip_header_non_supported[False-content-length] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[dict-True-True] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[dict-True-False] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[dict-False-True] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[dict-False-False] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[HTTPHeaderDict-True-True] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[HTTPHeaderDict-True-False] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[HTTPHeaderDict-False-True] passed 1 out of the required 1 times. Success! test_headers_not_modified_by_request[HTTPHeaderDict-False-False] passed 1 out of the required 1 times. Success! test_bytes_header passed 1 out of the required 1 times. Success! test_user_agent_non_ascii_user_agent[Sch\xf6nefeld/1.18.00] passed 1 out of the required 1 times. Success! test_user_agent_non_ascii_user_agent[Sch\xf6nefeld/1.18.01] passed 1 out of the required 1 times. Success! test_max_retry passed 1 out of the required 1 times. Success! test_disabled_retry passed 1 out of the required 1 times. Success! test_read_retries passed 1 out of the required 1 times. Success! test_read_total_retries passed 1 out of the required 1 times. Success! test_retries_wrong_whitelist passed 1 out of the required 1 times. Success! test_default_method_whitelist_retried passed 1 out of the required 1 times. Success! test_retries_wrong_method_list passed 1 out of the required 1 times. Success! test_read_retries_unsuccessful passed 1 out of the required 1 times. Success! test_retry_reuse_safe passed 1 out of the required 1 times. Success! test_retry_return_in_response passed 1 out of the required 1 times. Success! test_retry_redirect_history passed 1 out of the required 1 times. Success! test_multi_redirect_history passed 1 out of the required 1 times. Success! test_retry_after passed 1 out of the required 1 times. Success! test_redirect_after passed 1 out of the required 1 times. Success! test_retries_put_filehandle passed 1 out of the required 1 times. Success! test_redirect_put_file passed 1 out of the required 1 times. Success! test_redirect_with_failed_tell passed 1 out of the required 1 times. Success! test_pool_size_retry passed 1 out of the required 1 times. Success! test_pool_size_redirect passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_dotted_fqdn passed 1 out of the required 1 times. Success! test_client_intermediate passed 1 out of the required 1 times. Success! test_client_no_intermediate passed 1 out of the required 1 times. Success! test_client_key_password passed 1 out of the required 1 times. Success! test_client_encrypted_key_requires_password passed 1 out of the required 1 times. Success! test_verified passed 1 out of the required 1 times. Success! test_verified_with_context passed 1 out of the required 1 times. Success! test_context_combines_with_ca_certs passed 1 out of the required 1 times. Success! test_ca_dir_verified passed 1 out of the required 1 times. Success! test_invalid_common_name passed 1 out of the required 1 times. Success! test_verified_with_bad_ca_certs passed 1 out of the required 1 times. Success! test_wrap_socket_failure_resource_leak passed 1 out of the required 1 times. Success! test_verified_without_ca_certs passed 1 out of the required 1 times. Success! test_no_ssl passed 1 out of the required 1 times. Success! test_unverified_ssl passed 1 out of the required 1 times. Success! test_ssl_unverified_with_ca_certs passed 1 out of the required 1 times. Success! test_assert_hostname_false passed 1 out of the required 1 times. Success! test_assert_specific_hostname passed 1 out of the required 1 times. Success! test_server_hostname passed 1 out of the required 1 times. Success! test_assert_fingerprint_md5 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha1 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha256 passed 1 out of the required 1 times. Success! test_assert_invalid_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_bad_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_good_fingerprint passed 1 out of the required 1 times. Success! test_good_fingerprint_and_hostname_mismatch passed 1 out of the required 1 times. Success! test_https_timeout passed 1 out of the required 1 times. Success! test_tunnel passed 1 out of the required 1 times. Success! test_enhanced_timeout passed 1 out of the required 1 times. Success! test_enhanced_ssl_connection passed 1 out of the required 1 times. Success! test_ssl_correct_system_time passed 1 out of the required 1 times. Success! test_ssl_wrong_system_time passed 1 out of the required 1 times. Success! test_set_cert_default_cert_required passed 1 out of the required 1 times. Success! test_sslkeylogfile passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[None] passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[] passed 1 out of the required 1 times. Success! test_alpn_default passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_dotted_fqdn passed 1 out of the required 1 times. Success! test_client_intermediate passed 1 out of the required 1 times. Success! test_client_no_intermediate passed 1 out of the required 1 times. Success! test_client_key_password passed 1 out of the required 1 times. Success! test_client_encrypted_key_requires_password passed 1 out of the required 1 times. Success! test_verified passed 1 out of the required 1 times. Success! test_verified_with_context passed 1 out of the required 1 times. Success! test_context_combines_with_ca_certs passed 1 out of the required 1 times. Success! test_ca_dir_verified passed 1 out of the required 1 times. Success! test_invalid_common_name passed 1 out of the required 1 times. Success! test_verified_with_bad_ca_certs passed 1 out of the required 1 times. Success! test_wrap_socket_failure_resource_leak passed 1 out of the required 1 times. Success! test_verified_without_ca_certs passed 1 out of the required 1 times. Success! test_no_ssl passed 1 out of the required 1 times. Success! test_unverified_ssl passed 1 out of the required 1 times. Success! test_ssl_unverified_with_ca_certs passed 1 out of the required 1 times. Success! test_assert_hostname_false passed 1 out of the required 1 times. Success! test_assert_specific_hostname passed 1 out of the required 1 times. Success! test_server_hostname passed 1 out of the required 1 times. Success! test_assert_fingerprint_md5 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha1 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha256 passed 1 out of the required 1 times. Success! test_assert_invalid_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_bad_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_good_fingerprint passed 1 out of the required 1 times. Success! test_good_fingerprint_and_hostname_mismatch passed 1 out of the required 1 times. Success! test_https_timeout passed 1 out of the required 1 times. Success! test_tunnel passed 1 out of the required 1 times. Success! test_enhanced_timeout passed 1 out of the required 1 times. Success! test_enhanced_ssl_connection passed 1 out of the required 1 times. Success! test_ssl_correct_system_time passed 1 out of the required 1 times. Success! test_ssl_wrong_system_time passed 1 out of the required 1 times. Success! test_set_ssl_version_to_tls_version passed 1 out of the required 1 times. Success! test_set_cert_default_cert_required passed 1 out of the required 1 times. Success! test_tls_protocol_name_of_socket passed 1 out of the required 1 times. Success! test_default_tls_version_deprecations passed 1 out of the required 1 times. Success! test_no_tls_version_deprecation_with_ssl_version passed 1 out of the required 1 times. Success! test_no_tls_version_deprecation_with_ssl_context passed 1 out of the required 1 times. Success! test_sslkeylogfile passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[None] passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[] passed 1 out of the required 1 times. Success! test_alpn_default passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_dotted_fqdn passed 1 out of the required 1 times. Success! test_client_intermediate passed 1 out of the required 1 times. Success! test_client_no_intermediate passed 1 out of the required 1 times. Success! test_client_key_password passed 1 out of the required 1 times. Success! test_client_encrypted_key_requires_password passed 1 out of the required 1 times. Success! test_verified passed 1 out of the required 1 times. Success! test_verified_with_context passed 1 out of the required 1 times. Success! test_context_combines_with_ca_certs passed 1 out of the required 1 times. Success! test_ca_dir_verified passed 1 out of the required 1 times. Success! test_invalid_common_name passed 1 out of the required 1 times. Success! test_verified_with_bad_ca_certs passed 1 out of the required 1 times. Success! test_wrap_socket_failure_resource_leak passed 1 out of the required 1 times. Success! test_verified_without_ca_certs passed 1 out of the required 1 times. Success! test_no_ssl passed 1 out of the required 1 times. Success! test_unverified_ssl passed 1 out of the required 1 times. Success! test_ssl_unverified_with_ca_certs passed 1 out of the required 1 times. Success! test_assert_hostname_false passed 1 out of the required 1 times. Success! test_assert_specific_hostname passed 1 out of the required 1 times. Success! test_server_hostname passed 1 out of the required 1 times. Success! test_assert_fingerprint_md5 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha1 passed 1 out of the required 1 times. Success! test_assert_fingerprint_sha256 passed 1 out of the required 1 times. Success! test_assert_invalid_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_bad_fingerprint passed 1 out of the required 1 times. Success! test_verify_none_and_good_fingerprint passed 1 out of the required 1 times. Success! test_good_fingerprint_and_hostname_mismatch passed 1 out of the required 1 times. Success! test_https_timeout passed 1 out of the required 1 times. Success! test_tunnel passed 1 out of the required 1 times. Success! test_enhanced_timeout passed 1 out of the required 1 times. Success! test_enhanced_ssl_connection passed 1 out of the required 1 times. Success! test_ssl_correct_system_time passed 1 out of the required 1 times. Success! test_ssl_wrong_system_time passed 1 out of the required 1 times. Success! test_set_ssl_version_to_tls_version passed 1 out of the required 1 times. Success! test_set_cert_default_cert_required passed 1 out of the required 1 times. Success! test_tls_protocol_name_of_socket passed 1 out of the required 1 times. Success! test_default_tls_version_deprecations passed 1 out of the required 1 times. Success! test_no_tls_version_deprecation_with_ssl_version passed 1 out of the required 1 times. Success! test_no_tls_version_deprecation_with_ssl_context passed 1 out of the required 1 times. Success! test_sslkeylogfile passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[None] passed 1 out of the required 1 times. Success! test_sslkeylogfile_empty[] passed 1 out of the required 1 times. Success! test_alpn_default passed 1 out of the required 1 times. Success! test_warning_for_certs_without_a_san passed 1 out of the required 1 times. Success! test_common_name_without_san_with_different_common_name passed 1 out of the required 1 times. Success! test_can_validate_ip_san passed 1 out of the required 1 times. Success! test_strip_square_brackets_before_validating[::1] passed 1 out of the required 1 times. Success! test_strip_square_brackets_before_validating[[::1]] passed 1 out of the required 1 times. Success! test_can_validate_ipv6_san[::1] passed 1 out of the required 1 times. Success! test_can_validate_ipv6_san[[::1]] passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_redirect passed 1 out of the required 1 times. Success! test_redirect_twice passed 1 out of the required 1 times. Success! test_redirect_to_relative_url passed 1 out of the required 1 times. Success! test_cross_host_redirect passed 1 out of the required 1 times. Success! test_too_many_redirects passed 1 out of the required 1 times. Success! test_redirect_cross_host_remove_headers passed 1 out of the required 1 times. Success! test_redirect_cross_host_no_remove_headers passed 1 out of the required 1 times. Success! test_redirect_cross_host_set_removed_headers passed 1 out of the required 1 times. Success! test_redirect_without_preload_releases_connection passed 1 out of the required 1 times. Success! test_unknown_scheme passed 1 out of the required 1 times. Success! test_raise_on_redirect passed 1 out of the required 1 times. Success! test_raise_on_status passed 1 out of the required 1 times. Success! test_missing_port passed 1 out of the required 1 times. Success! test_headers passed 1 out of the required 1 times. Success! test_http_with_ssl_keywords passed 1 out of the required 1 times. Success! test_http_with_server_hostname passed 1 out of the required 1 times. Success! test_http_with_ca_cert_dir passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri?q=1#fragment-/echo_uri?q=1] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri?#-/echo_uri?] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri#?-/echo_uri] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri#?#-/echo_uri] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri??#-/echo_uri??] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri?%3f#-/echo_uri?%3F] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri?%3F#-/echo_uri?%3F] passed 1 out of the required 1 times. Success! test_encode_http_target[/echo_uri?[]-/echo_uri?%5B%5D] passed 1 out of the required 1 times. Success! test_ipv6 passed 1 out of the required 1 times. Success! test_basic_proxy passed 1 out of the required 1 times. Success! test_https_proxy passed 1 out of the required 1 times. Success! test_https_proxy_with_proxy_ssl_context passed 1 out of the required 1 times. Success! test_https_proxy_pyopenssl_not_supported passed 1 out of the required 1 times. Success! test_https_proxy_forwarding_for_https passed 1 out of the required 1 times. Success! test_nagle_proxy passed 1 out of the required 1 times. Success! test_proxy_conn_fail passed 1 out of the required 1 times. Success! test_oldapi passed 1 out of the required 1 times. Success! test_proxy_verified passed 1 out of the required 1 times. Success! test_proxy_verified_warning passed 1 out of the required 1 times. Success! test_redirect passed 1 out of the required 1 times. Success! test_cross_host_redirect passed 1 out of the required 1 times. Success! test_cross_protocol_redirect passed 1 out of the required 1 times. Success! test_headers passed 1 out of the required 1 times. Success! test_https_headers passed 1 out of the required 1 times. Success! test_https_headers_forwarding_for_https passed 1 out of the required 1 times. Success! test_headerdict passed 1 out of the required 1 times. Success! test_proxy_pooling passed 1 out of the required 1 times. Success! test_proxy_pooling_ext passed 1 out of the required 1 times. Success! test_forwarding_proxy_request_timeout[http-http-False] passed 1 out of the required 1 times. Success! test_forwarding_proxy_request_timeout[https-http-False] passed 1 out of the required 1 times. Success! test_forwarding_proxy_request_timeout[https-https-True] passed 1 out of the required 1 times. Success! test_tunneling_proxy_request_timeout[http-https] passed 1 out of the required 1 times. Success! test_tunneling_proxy_request_timeout[https-https] passed 1 out of the required 1 times. Success! test_forwarding_proxy_connect_timeout[http-http-False] passed 1 out of the required 1 times. Success! test_forwarding_proxy_connect_timeout[https-http-False] passed 1 out of the required 1 times. Success! test_forwarding_proxy_connect_timeout[https-https-True] passed 1 out of the required 1 times. Success! test_tunneling_proxy_connect_timeout[http-https] passed 1 out of the required 1 times. Success! test_tunneling_proxy_connect_timeout[https-https] passed 1 out of the required 1 times. Success! test_https_proxy_tls_error[http-False] passed 1 out of the required 1 times. Success! test_https_proxy_tls_error[https-False] passed 1 out of the required 1 times. Success! test_https_proxy_tls_error[https-True] passed 1 out of the required 1 times. Success! test_proxy_https_target_tls_error[http-False] passed 1 out of the required 1 times. Success! test_proxy_https_target_tls_error[https-False] passed 1 out of the required 1 times. Success! test_proxy_https_target_tls_error[https-True] passed 1 out of the required 1 times. Success! test_scheme_host_case_insensitive passed 1 out of the required 1 times. Success! test_invalid_schema[127.0.0.1-Proxy URL had no scheme, should start with http:// or https://] passed 1 out of the required 1 times. Success! test_invalid_schema[localhost:8080-Proxy URL had no scheme, should start with http:// or https://] passed 1 out of the required 1 times. Success! test_invalid_schema[ftp://google.com-Proxy URL had unsupported scheme ftp, should use http:// or https://] passed 1 out of the required 1 times. Success! test_basic_ipv6_proxy passed 1 out of the required 1 times. Success! test_https_proxy_hostname_verification passed 1 out of the required 1 times. Success! test_https_proxy_ipv4_san passed 1 out of the required 1 times. Success! test_https_proxy_ipv6_san passed 1 out of the required 1 times. Success! test_https_proxy_common_name_warning passed 1 out of the required 1 times. Success! test_multi_setcookie passed 1 out of the required 1 times. Success! test_hostname_in_first_request_packet passed 1 out of the required 1 times. Success! test_alpn_protocol_in_first_request_packet passed 1 out of the required 1 times. Success! test_client_certs_two_files passed 1 out of the required 1 times. Success! test_client_certs_one_file passed 1 out of the required 1 times. Success! test_missing_client_certs_raises_error passed 1 out of the required 1 times. Success! test_client_cert_with_string_password passed 1 out of the required 1 times. Success! test_client_cert_with_bytes_password passed 1 out of the required 1 times. Success! test_load_keyfile_with_invalid_password passed 1 out of the required 1 times. Success! test_recovery_when_server_closes_connection passed 1 out of the required 1 times. Success! test_connection_refused passed 1 out of the required 1 times. Success! test_connection_read_timeout passed 1 out of the required 1 times. Success! test_read_timeout_dont_retry_method_not_in_allowlist passed 1 out of the required 1 times. Success! test_https_connection_read_timeout passed 1 out of the required 1 times. Success! test_timeout_errors_cause_retries failed (1 runs remaining out of 2). HTTPConnectionPool(host='localhost', port=33411): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPConnectionPool(host='localhost', port=33411): Read timed out. (read timeout=0.01)")) [, , , , , ] test_timeout_errors_cause_retries passed 1 out of the required 1 times. Success! test_delayed_body_read_timeout passed 1 out of the required 1 times. Success! test_delayed_body_read_timeout_with_preload passed 1 out of the required 1 times. Success! test_incomplete_response passed 1 out of the required 1 times. Success! test_retry_weird_http_version passed 1 out of the required 1 times. Success! test_connection_cleanup_on_read_timeout passed 1 out of the required 1 times. Success! test_connection_cleanup_on_protocol_error_during_read passed 1 out of the required 1 times. Success! test_connection_closed_on_read_timeout_preload_false passed 1 out of the required 1 times. Success! test_closing_response_actually_closes_connection passed 1 out of the required 1 times. Success! test_release_conn_param_is_respected_after_timeout_retry passed 1 out of the required 1 times. Success! test_simple passed 1 out of the required 1 times. Success! test_headers passed 1 out of the required 1 times. Success! test_retries passed 1 out of the required 1 times. Success! test_connect_reconn passed 1 out of the required 1 times. Success! test_connect_ipv6_addr passed 1 out of the required 1 times. Success! test_https_proxymanager_connected_to_http_proxy[http] passed 1 out of the required 1 times. Success! test_https_proxymanager_connected_to_http_proxy[https] passed 1 out of the required 1 times. Success! test_ssl_failure_midway_through_conn passed 1 out of the required 1 times. Success! test_ssl_read_timeout failed (1 runs remaining out of 2). HTTPSConnectionPool(host='localhost', port=42695): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=42695): Read timed out. (read timeout=0.01)")) [, , ] test_ssl_read_timeout failed; it passed 0 out of the required 1 times. HTTPSConnectionPool(host='localhost', port=40453): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=40453): Read timed out. (read timeout=0.01)")) [, , ] test_ssl_failed_fingerprint_verification failed (1 runs remaining out of 2). assert False + where False = isinstance(ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=45363): Read timed out. (read timeout=0.01)"), SSLError) + where ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=45363): Read timed out. (read timeout=0.01)") = MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=45363): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=45363): Read timed out. (read timeout=0.01)"))').reason + where MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=45363): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=45363): Read timed out. (read timeout=0.01)"))') = .value [] test_ssl_failed_fingerprint_verification failed; it passed 0 out of the required 1 times. assert False + where False = isinstance(ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41787): Read timed out. (read timeout=0.01)"), SSLError) + where ReadTimeoutError("HTTPSConnectionPool(host='localhost', port=41787): Read timed out. (read timeout=0.01)") = MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41787): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41787): Read timed out. (read timeout=0.01)"))').reason + where MaxRetryError('HTTPSConnectionPool(host=\'localhost\', port=41787): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPSConnectionPool(host=\'localhost\', port=41787): Read timed out. (read timeout=0.01)"))') = .value [] test_retry_ssl_error passed 1 out of the required 1 times. Success! test_ssl_load_default_certs_when_empty passed 1 out of the required 1 times. Success! test_ssl_dont_load_default_certs_when_given passed 1 out of the required 1 times. Success! test_load_verify_locations_exception passed 1 out of the required 1 times. Success! test_ssl_custom_validation_failure_terminates failed (1 runs remaining out of 2). HTTPSConnectionPool(host='localhost', port=45361): Read timed out. (read timeout=0.01) [, , , , , , , , ] test_ssl_custom_validation_failure_terminates failed; it passed 0 out of the required 1 times. HTTPSConnectionPool(host='localhost', port=34675): Read timed out. (read timeout=0.01) [, , , , , , , , ] test_bad_statusline passed 1 out of the required 1 times. Success! test_unknown_protocol passed 1 out of the required 1 times. Success! test_httplib_headers_case_insensitive passed 1 out of the required 1 times. Success! test_headers_are_sent_with_the_original_case passed 1 out of the required 1 times. Success! test_ua_header_can_be_overridden passed 1 out of the required 1 times. Success! test_request_headers_are_sent_in_the_original_order passed 1 out of the required 1 times. Success! test_request_host_header_ignores_fqdn_dot passed 1 out of the required 1 times. Success! test_response_headers_are_returned_in_the_original_order passed 1 out of the required 1 times. Success! test_header_without_name passed 1 out of the required 1 times. Success! test_header_without_name_or_value passed 1 out of the required 1 times. Success! test_header_without_colon_or_value passed 1 out of the required 1 times. Success! test_header_text_plain passed 1 out of the required 1 times. Success! test_header_message_rfc822 passed 1 out of the required 1 times. Success! test_chunked_head_response_does_not_hang passed 1 out of the required 1 times. Success! test_empty_head_response_does_not_hang passed 1 out of the required 1 times. Success! test_stream_none_unchunked_response_does_not_hang passed 1 out of the required 1 times. Success! test_enforce_content_length_get passed 1 out of the required 1 times. Success! test_enforce_content_length_no_body passed 1 out of the required 1 times. Success! test_pool_size_retry_drain_fail passed 1 out of the required 1 times. Success! test_ignore_broken_pipe_errors passed 1 out of the required 1 times. Success! test_multipart_assert_header_parsing_no_defects passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== =========================== short test summary info ============================ FAILED test/test_connection.py::TestConnection::test_recent_date - AssertionE... FAILED test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout - urlli... FAILED test/contrib/test_pyopenssl.py::TestSSL::test_ssl_failed_fingerprint_verification FAILED test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout FAILED test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failed_fingerprint_verification FAILED test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_custom_validation_failure_terminates = 6 failed, 1487 passed, 414 skipped, 54 deselected, 414 warnings in 718.76s (0:11:58) = ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix3/build receiving incremental file list python-urllib3-1.26.9-1-riscv64-build.log python-urllib3-1.26.9-1-riscv64-check.log sent 62 bytes received 28,174 bytes 56,472.00 bytes/sec total size is 199,720 speedup is 7.07