==> Building on mausholdvii ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/python-urllib3 ./ .SRCINFO 1,854 100% 0.00kB/s 0:00:00 1,854 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=7/9) .nvchecker.toml 92 100% 89.84kB/s 0:00:00 92 100% 89.84kB/s 0:00:00 (xfr#2, to-chk=6/9) LICENSE 646 100% 630.86kB/s 0:00:00 646 100% 630.86kB/s 0:00:00 (xfr#3, to-chk=5/9) PKGBUILD 3,475 100% 3.31MB/s 0:00:00 3,475 100% 3.31MB/s 0:00:00 (xfr#4, to-chk=4/9) REUSE.toml 179 100% 174.80kB/s 0:00:00 179 100% 174.80kB/s 0:00:00 (xfr#5, to-chk=3/9) python-urllib3-2.7.0-1.log 740 100% 722.66kB/s 0:00:00 740 100% 722.66kB/s 0:00:00 (xfr#6, to-chk=2/9) LICENSES/ LICENSES/0BSD.txt -> ../LICENSE sent 3,810 bytes received 190 bytes 1,600.00 bytes/sec total size is 6,454 speedup is 1.61 ==> Running pkgctl build --arch riscv64 on remote host... ==> WARNING: invalid architecture: riscv64 ==> Updating pacman database cache [?25l:: Synchronizing package databases... core downloading... extra downloading... multilib downloading... [?25h==> Building python-urllib3 -> repo: extra -> arch: riscv64 -> worker: felix-0 ==> Building python-urllib3 for [extra] (riscv64) [?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... resolving dependencies... looking for conflicting packages... Package (2) Old Version New Version Net Change Download Size core/libgcrypt 1.12.2-1 1.12.3-1 0.00 MiB 0.75 MiB core/libksba 1.8.0-1 1.8.1-1 0.00 MiB 0.15 MiB Total Download Size: 0.90 MiB Total Installed Size: 1.85 MiB Net Upgrade Size: 0.01 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... libgcrypt-1.12.3-1-riscv64 downloading... libksba-1.8.1-1-riscv64 downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... upgrading libgcrypt... upgrading libksba... :: Running post-transaction hooks... (1/2) Arming ConditionNeedsUpdate... (2/2) Updating the info directory file... [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix-0]...done ==> Making package: python-urllib3 2.7.0-1 (Sun Aug 30 18:36:49 2026) ==> Retrieving sources...  -> Downloading python-urllib3-2.7.0.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 0 0 0 0 0 0 0 0 00:01 0 100 443.3k 0 443.3k 0 0 194.3k 0 00:02 0 100 443.3k 0 443.3k 0 0 194.2k 0 00:02 0 100 443.3k 0 443.3k 0 0 193.9k 0 00:02 0  -> Downloading hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.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 0 0 0 0 0 0 0 0 0 100 152.5k 0 152.5k 0 0 91125 0 00:01 0 100 152.5k 0 152.5k 0 0 91063 0 00:01 0 100 152.5k 0 152.5k 0 0 90957 0 00:01 0 ==> Validating source files with sha512sums... python-urllib3-2.7.0.tar.gz ... Passed hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz ... Passed ==> Validating source files with b2sums... python-urllib3-2.7.0.tar.gz ... Passed hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz ... Passed ==> Making package: python-urllib3 2.7.0-1 (Sun Aug 30 18:37:48 2026) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (66) New Version Net Change Download Size extra/hypercorn 0.18.0-2 0.87 MiB 0.14 MiB extra/python-aiofiles 25.1.0-2 0.12 MiB 0.02 MiB extra/python-anyio 4.14.2-1 2.13 MiB 0.30 MiB extra/python-attrs 26.1.0-1 0.63 MiB extra/python-autocommand 2.2.2-9 0.08 MiB extra/python-blinker 1.9.0-4 0.08 MiB extra/python-certifi 2026.07.22-1 0.02 MiB extra/python-click 8.3.3-1 1.38 MiB extra/python-editables 0.6-1 0.04 MiB extra/python-fastjsonschema 2.21.2-2 0.28 MiB extra/python-flask 3.1.3-1 1.13 MiB extra/python-h11 0.16.0-2 0.29 MiB 0.06 MiB extra/python-hpack 4.2.0-1 0.62 MiB 0.06 MiB extra/python-httpcore 1.0.9-3 1.04 MiB 0.12 MiB extra/python-hyperframe 6.1.0-2 0.15 MiB 0.03 MiB extra/python-importlib-metadata 9.0.1-1 0.26 MiB 0.05 MiB extra/python-iniconfig 2.3.0-1 0.07 MiB extra/python-itsdangerous 2.2.0-2 0.15 MiB extra/python-jaraco.collections 5.1.0-3 0.11 MiB extra/python-jaraco.context 6.1.2-1 0.06 MiB extra/python-jaraco.functools 4.1.0-3 0.07 MiB extra/python-jaraco.text 4.0.0-4 0.08 MiB extra/python-jinja 1:3.1.6-3.1 2.04 MiB extra/python-lark-parser 1.3.1-2 1.39 MiB extra/python-markupsafe 3.0.3-1 0.09 MiB extra/python-more-itertools 11.1.0-1 0.77 MiB extra/python-outcome 1.3.0.post0-7 0.05 MiB 0.02 MiB extra/python-packaging 26.3-1 1.58 MiB extra/python-pathspec 1.1.1-1 0.47 MiB extra/python-pkg_resources 81.0.0-1 0.50 MiB extra/python-platformdirs 4.11.5-1 0.47 MiB 0.05 MiB extra/python-pluggy 1.6.0-3.1 0.23 MiB extra/python-priority 2.0.0-8 0.07 MiB 0.02 MiB extra/python-pycparser 3.00-1 0.71 MiB extra/python-pygments 2.20.0-1 15.36 MiB extra/python-pyproject-hooks 1.2.0-6 0.11 MiB extra/python-setuptools 1:82.0.1-1 7.35 MiB extra/python-setuptools-scm 10.2.1-1 0.23 MiB 0.05 MiB extra/python-sniffio 1.3.1-5 0.04 MiB 0.01 MiB extra/python-sortedcontainers 2.4.0-8 0.38 MiB 0.05 MiB extra/python-trove-classifiers 2026.6.1.19-1 0.16 MiB extra/python-typing_extensions 4.16.0-1 0.53 MiB extra/python-vcs-versioning 2.3.1-1 1.18 MiB 0.21 MiB extra/python-werkzeug 3.1.8-1 2.75 MiB 0.43 MiB extra/python-wsproto 1.3.2-1 0.28 MiB 0.05 MiB extra/python-zipp 3.21.0-4 0.08 MiB 0.02 MiB extra/python-build 1.4.3-1 0.26 MiB extra/python-cffi 2.1.1-1 1.41 MiB 0.30 MiB extra/python-cryptography 50.0.1-1 6.43 MiB 1.58 MiB extra/python-h2 4.4.1-1 0.75 MiB 0.11 MiB extra/python-hatch-vcs 0.5.0-4.1 0.04 MiB 0.01 MiB extra/python-hatchling 1.30.1-1 1.09 MiB 0.16 MiB extra/python-httpx 0.28.1-7 2.83 MiB 0.37 MiB extra/python-idna 3.19-1 0.66 MiB extra/python-installer 1.0.0-1 0.20 MiB extra/python-poetry-core 2.4.1-1 1.68 MiB extra/python-pyopenssl 26.4.0-1 0.72 MiB 0.11 MiB extra/python-pysocks 1.7.1-12 0.13 MiB 0.03 MiB extra/python-pytest 1:9.0.3-1 4.86 MiB 0.79 MiB extra/python-pytest-socket 0.8.1-1 0.06 MiB 0.02 MiB extra/python-pytest-timeout 2.5.0-1 0.09 MiB 0.02 MiB extra/python-quart 0.21.0-1 1.11 MiB 0.18 MiB extra/python-quart-trio 0.12.0-2 0.20 MiB 0.04 MiB extra/python-trio 0.33.0-1 6.87 MiB 1.11 MiB extra/python-trustme 1.2.1-1 0.10 MiB 0.03 MiB extra/python-wheel 0.48.0-1 0.34 MiB 0.07 MiB Total Download Size: 6.65 MiB Total Installed Size: 76.32 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-cryptography-50.0.1-1-riscv64 downloading... python-trio-0.33.0-1-any downloading... python-pytest-1:9.0.3-1-any downloading... python-werkzeug-3.1.8-1-any downloading... python-httpx-0.28.1-7-any downloading... python-cffi-2.1.1-1-riscv64 downloading... python-anyio-4.14.2-1-any downloading... python-vcs-versioning-2.3.1-1-any downloading... python-quart-0.21.0-1-any downloading... python-hatchling-1.30.1-1-any downloading... hypercorn-0.18.0-2-any downloading... python-httpcore-1.0.9-3-any downloading... python-h2-4.4.1-1-any downloading... python-pyopenssl-26.4.0-1-any downloading... python-wheel-0.48.0-1-any downloading... python-h11-0.16.0-2-any downloading... python-hpack-4.2.0-1-any downloading... python-sortedcontainers-2.4.0-8-any downloading... python-wsproto-1.3.2-1-any downloading... python-importlib-metadata-9.0.1-1-any downloading... python-platformdirs-4.11.5-1-any downloading... python-setuptools-scm-10.2.1-1-any downloading... python-quart-trio-0.12.0-2-any downloading... python-pysocks-1.7.1-12-any downloading... python-hyperframe-6.1.0-2-any downloading... python-trustme-1.2.1-1-any downloading... python-aiofiles-25.1.0-2-any downloading... python-pytest-timeout-2.5.0-1-any downloading... python-zipp-3.21.0-4-any downloading... python-priority-2.0.0-8-any downloading... python-pytest-socket-0.8.1-1-any downloading... python-outcome-1.3.0.post0-7-any downloading... python-sniffio-1.3.1-5-any downloading... python-hatch-vcs-0.5.0-4.1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-packaging... installing python-pyproject-hooks... installing python-build... Optional dependencies for python-build python-pip: to use as the Python package installer (default) python-uv: to use as the Python package installer python-virtualenv: to use virtualenv for build isolation installing python-editables... installing python-pathspec... Optional dependencies for python-pathspec python-google-re2: re2 backend installing python-pluggy... installing python-trove-classifiers... installing python-hatchling... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing python-jaraco.text... Optional dependencies for python-jaraco.text python-inflect: for show-newlines script installing python-jaraco.collections... installing python-platformdirs... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures python-setuptools: for legacy bdist_wheel subcommand [pending] installing python-typing_extensions... installing python-pkg_resources... installing python-setuptools... installing python-vcs-versioning... Optional dependencies for python-vcs-versioning python-rich: formatting of log messages installing python-setuptools-scm... Optional dependencies for python-setuptools-scm python-rich: use rich as console log handler installing python-hatch-vcs... installing python-installer... installing python-pycparser... installing python-cffi... Optional dependencies for python-cffi python-setuptools: "limited api" version checking in cffi.setuptools_ext [installed] installing python-cryptography... installing python-hpack... installing python-hyperframe... installing python-h2... installing python-certifi... installing python-h11... installing python-httpcore... Optional dependencies for python-httpcore python-h2: for HTTP/2 support [installed] python-socksio: for SOCKS support python-anyio: for asyncio backend [pending] python-trio: for trio backend [pending] python-sniffio: for async support [pending] installing python-idna... installing python-anyio... Optional dependencies for python-anyio python-trio: trio backend [pending] python-outcome: trio backend [pending] python-uvloop: use uvloop for asyncio backend python-pytest: pytest plugin [pending] installing python-httpx... Optional dependencies for python-httpx python-brotli: for brotli response decompression python-brotlicffi: for brotli response decompression python-zstandard: for zstd response decompression python-h2: HTTP/2 support [installed] python-socksio: SOCKS proxy support python-click: command line client support [pending] python-rich: command line client support python-pygments: command line client support [pending] python-trio: alternative async library [pending] installing python-pyopenssl... installing python-pysocks... installing python-iniconfig... installing python-pygments... installing python-pytest... installing python-pytest-socket... installing python-pytest-timeout... installing python-priority... installing python-wsproto... installing hypercorn... Optional dependencies for hypercorn python-trio: trio support [pending] installing python-aiofiles... installing python-blinker... installing python-click... installing python-itsdangerous... installing python-markupsafe... installing python-jinja... Optional dependencies for python-jinja python-babel: for i18n support installing python-werkzeug... Optional dependencies for python-werkzeug python-watchdog: faster and more advanced reloader installing python-flask... Optional dependencies for python-flask python-asgiref: async functions and views python-cryptography: using ad-hoc certificates [installed] python-dotenv: loading env vars from files installing python-zipp... installing python-importlib-metadata... installing python-quart... Optional dependencies for python-quart python-dotenv: support for .env files installing python-attrs... installing python-outcome... installing python-sniffio... installing python-sortedcontainers... installing python-trio... installing python-quart-trio... installing python-trustme... installing python-fastjsonschema... installing python-lark-parser... Optional dependencies for python-lark-parser python-atomicwrites: for atomic_cache python-regex: for regex support installing python-poetry-core... :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [?25h==> Retrieving sources...  -> Found python-urllib3-2.7.0.tar.gz  -> Found hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting python-urllib3-2.7.0.tar.gz with bsdtar  -> Extracting hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz with bsdtar ==> Starting build()... * Building wheel... Successfully built urllib3-2.7.0-py3-none-any.whl ==> Starting check()... * Getting build dependencies for wheel... * Building wheel... The "poetry.dev-dependencies" section is deprecated and will be removed in a future version. Use "poetry.group.dev.dependencies" instead. Successfully built hypercorn-0.15.0-py3-none-any.whl ============================= test session starts ============================== platform linux -- Python 3.14.7, pytest-9.0.3, pluggy-1.6.0 rootdir: /build/python-urllib3/src/urllib3-2.7.0 configfile: pyproject.toml plugins: socket-0.8.1, timeout-2.4.0, anyio-4.14.2 collected 2273 items / 2 deselected / 1 skipped / 2271 selected test/contrib/test_pyopenssl.py ......................................... [ 1%] ......................FFFFFsssssssssssssssssssssssssssssssssssssssssssss [ 4%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 8%] sssssssssssFF.FFFF.FFFFF.......FF............FFF...FFFFFFFssFFFFFFxs.... [ 11%] ...FF.FFFF.FFFFF.......FF............FFF...FsFFFFFssFFFFFFxs....s..FEFFE [ 14%] FEFE.E..................FEFE....sssss.... [ 16%] test/contrib/test_pyopenssl_dependencies.py .. [ 16%] test/contrib/test_socks.py ................... [ 17%] test/test_collections.py ............................................... [ 19%] .. [ 19%] test/test_compatibility.py .. [ 19%] test/test_connection.py ................................................ [ 21%] ........................................................................ [ 24%] ........................................................................ [ 27%] ........................................................................ [ 30%] ............... [ 31%] test/test_connectionpool.py ............................................ [ 33%] ................................... [ 35%] test/test_exceptions.py ................... [ 35%] test/test_fields.py .................... [ 36%] test/test_filepost.py ......... [ 37%] test/test_http2_connection.py .................. [ 37%] test/test_no_ssl.py .. [ 38%] test/test_poolmanager.py ..................................... [ 39%] test/test_proxymanager.py ...... [ 39%] test/test_queue_monkeypatch.py . [ 39%] test/test_response.py ...............................................sss [ 42%] ........................ss........ss..............ssss.......s....s....s [ 45%] ....s................................................................... [ 48%] ................. [ 49%] test/test_retry.py ..................................................... [ 51%] ......... [ 52%] test/test_ssl.py ............................................. [ 53%] test/test_ssltransport.py ................. [ 54%] test/test_util.py ...................................................... [ 57%] ........................................................................ [ 60%] ........................................................................ [ 63%] .........................................ss.s..ss.s..................... [ 66%] ............................................................ [ 69%] test/test_wait.py ............. [ 69%] test/with_dummyserver/test_chunked_transfer.py ....................... [ 70%] test/with_dummyserver/test_connection.py ......... [ 71%] test/with_dummyserver/test_connectionpool.py ........................... [ 72%] ........................................................................ [ 75%] ....................... [ 76%] test/with_dummyserver/test_https.py ssssssssssssssssssssssssssssssssssss [ 78%] ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 81%] ssssssssssssssssssss.................................................... [ 84%] ...xs................................................s.............xs... [ 87%] .s...................... [ 88%] test/with_dummyserver/test_no_ssl.py .. [ 88%] test/with_dummyserver/test_poolmanager.py .............................. [ 90%] ................................. [ 91%] test/with_dummyserver/test_proxy_poolmanager.py ........FF.....FFF...... [ 92%] FFFF....FF.F..........sF...FFFFFFFFFFFFFFF [ 94%] test/with_dummyserver/test_socketlevel.py ...FEFFEFEFE.E................ [ 95%] .FE...FE.......FEFE...sssss............................................. [ 98%] s.s.s..................... [100%] ==================================== ERRORS ==================================== _________ ERROR at setup of TestClientCerts.test_client_certs_one_file _________ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_thread_exception() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process thread exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) except pytest.PytestUnhandledThreadExceptionWarning as e: # This except happens when the warning is treated as an error (e.g. `-Werror`). if meta.exc_value is not None: # Exceptions have a better way to show the traceback, but # warnings do not, so hide the traceback from the msg and # set the cause so the traceback shows up in the right place. e.args = (meta.cause_msg,) e.__cause__ = meta.exc_value errors.append(e) if len(errors) == 1: raise errors[0] if errors: raise ExceptionGroup("multiple thread exception warnings", errors) finally: > del errors, meta, hook_error ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:74: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9e59d2d0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning __ ERROR at teardown of TestClientCerts.test_client_cert_with_string_password __ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception __ ERROR at teardown of TestClientCerts.test_client_cert_with_bytes_password ___ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception _ ERROR at teardown of TestClientCerts.test_load_keyfile_with_invalid_password _ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception _______ ERROR at teardown of TestClientCerts.test_load_invalid_cert_file _______ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception _____ ERROR at setup of TestSocketSSL.test_ssl_failure_midway_through_conn _____ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: > meta = pop_thread_exception() ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:46: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9e511b10> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning _____________ ERROR at setup of TestSocketSSL.test_retry_ssl_error _____________ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_thread_exception() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process thread exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) except pytest.PytestUnhandledThreadExceptionWarning as e: # This except happens when the warning is treated as an error (e.g. `-Werror`). if meta.exc_value is not None: # Exceptions have a better way to show the traceback, but # warnings do not, so hide the traceback from the msg and # set the cause so the traceback shows up in the right place. e.args = (meta.cause_msg,) e.__cause__ = meta.exc_value errors.append(e) if len(errors) == 1: raise errors[0] if errors: raise ExceptionGroup("multiple thread exception warnings", errors) finally: > del errors, meta, hook_error ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:74: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9e4e12d0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning _________ ERROR at setup of TestClientCerts.test_client_certs_one_file _________ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_thread_exception() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process thread exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) except pytest.PytestUnhandledThreadExceptionWarning as e: # This except happens when the warning is treated as an error (e.g. `-Werror`). if meta.exc_value is not None: # Exceptions have a better way to show the traceback, but # warnings do not, so hide the traceback from the msg and # set the cause so the traceback shows up in the right place. e.args = (meta.cause_msg,) e.__cause__ = meta.exc_value errors.append(e) if len(errors) == 1: raise errors[0] if errors: raise ExceptionGroup("multiple thread exception warnings", errors) finally: > del errors, meta, hook_error ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:74: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9c3690c0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning __ ERROR at teardown of TestClientCerts.test_client_cert_with_string_password __ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception __ ERROR at teardown of TestClientCerts.test_client_cert_with_bytes_password ___ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception _ ERROR at teardown of TestClientCerts.test_load_keyfile_with_invalid_password _ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception _______ ERROR at teardown of TestClientCerts.test_load_invalid_cert_file _______ self = def teardown_method(self) -> None: if hasattr(self, "server_thread"): > self.quit_server_thread(self.server_thread) dummyserver/testcase.py:151: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ server_thread = @staticmethod def quit_server_thread(server_thread: SocketServerThread) -> None: if server_thread.quit_event: server_thread.quit_event.set() # in principle the maximum time that the thread can take to notice # the quit_event is LONG_TIMEOUT and the thread should terminate # shortly after that, we give 5 seconds leeway just in case server_thread.join(LONG_TIMEOUT * 2 + 5.0) if server_thread.is_alive(): > raise Exception("server_thread did not exit") E Exception: server_thread did not exit dummyserver/testcase.py:142: Exception ________________ ERROR at setup of TestProxyManager.test_simple ________________ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: > meta = pop_thread_exception() ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:46: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9c3c3c10> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning _____ ERROR at setup of TestProxyManager.test_connect_ipv6_addr_from_host ______ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_thread_exception() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process thread exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) except pytest.PytestUnhandledThreadExceptionWarning as e: # This except happens when the warning is treated as an error (e.g. `-Werror`). if meta.exc_value is not None: # Exceptions have a better way to show the traceback, but # warnings do not, so hide the traceback from the msg and # set the cause so the traceback shows up in the right place. e.args = (meta.cause_msg,) e.__cause__ = meta.exc_value errors.append(e) if len(errors) == 1: raise errors[0] if errors: raise ExceptionGroup("multiple thread exception warnings", errors) finally: > del errors, meta, hook_error ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:74: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9c385c70> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning _______________ ERROR at setup of TestSSL.test_ssl_read_timeout ________________ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_thread_exception(config: Config) -> None: pop_thread_exception = config.stash[thread_exceptions].pop errors: list[pytest.PytestUnhandledThreadExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_thread_exception() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process thread exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) except pytest.PytestUnhandledThreadExceptionWarning as e: # This except happens when the warning is treated as an error (e.g. `-Werror`). if meta.exc_value is not None: # Exceptions have a better way to show the traceback, but # warnings do not, so hide the traceback from the msg and # set the cause so the traceback shows up in the right place. e.args = (meta.cause_msg,) e.__cause__ = meta.exc_value errors.append(e) if len(errors) == 1: raise errors[0] if errors: raise ExceptionGroup("multiple thread exception warnings", errors) finally: > del errors, meta, hook_error ^^^^ E ResourceWarning: unclosed /usr/lib/python3.14/site-packages/_pytest/threadexception.py:74: ResourceWarning The above exception was the direct cause of the following exception: cls = func = . at 0x3f9c3b4720> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None, ) -> CallInfo[TResult]: """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :type func: Callable[[], _pytest.runner.TResult] :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None instant = timing.Instant() try: > result: TResult | None = func() ^^^^^^ /usr/lib/python3.14/site-packages/_pytest/runner.py:353: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.14/site-packages/_pytest/runner.py:245: in lambda: runtest_hook(item=item, **kwds), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_hooks.py:512: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pluggy/_manager.py:120: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield /usr/lib/python3.14/site-packages/_pytest/capture.py:895: in pytest_runtest_setup return (yield) ^^^^^ /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:153: in pytest_runtest_setup collect_unraisable(item.config) /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:79: in collect_unraisable raise errors[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ config = <_pytest.config.Config object at 0x3fa1db4830> def collect_unraisable(config: Config) -> None: pop_unraisable = config.stash[unraisable_exceptions].pop errors: list[pytest.PytestUnraisableExceptionWarning | RuntimeError] = [] meta = None hook_error = None try: while True: try: meta = pop_unraisable() except IndexError: break if isinstance(meta, BaseException): hook_error = RuntimeError("Failed to process unraisable exception") hook_error.__cause__ = meta errors.append(hook_error) continue msg = meta.msg try: > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None /usr/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning _______ ERROR at setup of TestSSL.test_ssl_load_default_certs_when_empty _______ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 353, in from_call | result: TResult | None = func() | ~~~~^^ | File "/usr/lib/python3.14/site-packages/_pytest/runner.py", line 245, in | lambda: runtest_hook(item=item, **kwds), | ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/pluggy/_hooks.py", line 512, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/pluggy/_manager.py", line 120, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 167, in _multicall | raise exception | File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall | teardown.throw(exception) | ~~~~~~~~~~~~~~^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/_pytest/logging.py", line 843, in pytest_runtest_setup | yield | File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 139, in _multicall | teardown.throw(exception) | ~~~~~~~~~~~~~~^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/_pytest/capture.py", line 895, in pytest_runtest_setup | return (yield) | ^^^^^ | File "/usr/lib/python3.14/site-packages/pluggy/_callers.py", line 121, in _multicall | res = hook_impl.function(*args) | File "/usr/lib/python3.14/site-packages/_pytest/unraisableexception.py", line 153, in pytest_runtest_setup | collect_unraisable(item.config) | ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/_pytest/unraisableexception.py", line 81, in collect_unraisable | raise ExceptionGroup("multiple unraisable exception warnings", errors) | ExceptionGroup: multiple unraisable exception warnings (2 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/_pytest/threadexception.py", line 74, in collect_thread_exception | del errors, meta, hook_error | ^^^^ | ResourceWarning: unclosed | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/_pytest/unraisableexception.py", line 67, in collect_unraisable | warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) | ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None | +---------------- 2 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/_pytest/threadexception.py", line 74, in collect_thread_exception | del errors, meta, hook_error | ^^^^ | ResourceWarning: unclosed | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/_pytest/unraisableexception.py", line 67, in collect_unraisable | warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) | ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | pytest.PytestUnraisableExceptionWarning: Exception ignored while finalizing socket : None | +------------------------------------ =================================== FAILURES =================================== __________________ TestHTTPS_IPV4SAN.test_can_validate_ip_san __________________ self = ipv4_san_server = ServerConfig(scheme='https', host='127.0.0.1', port=46311, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs0/ca.pem') def test_can_validate_ip_san(self, ipv4_san_server: ServerConfig) -> None: """Ensure that urllib3 can validate SANs with IP addresses in them.""" with HTTPSConnectionPool( ipv4_san_server.host, ipv4_san_server.port, cert_reqs="CERT_REQUIRED", ca_certs=ipv4_san_server.ca_certs, ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:1334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:12 +0000] [1259] [INFO] Running on https://127.0.0.1:46311 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46311 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): 127.0.0.1:46311 ____________ TestHTTPS_IPV6SAN.test_can_validate_ipv6_san[h11-::1] _____________ self = ipv6_san_server = ServerConfig(scheme='https', host='::1', port=43973, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs1/ca.pem') host = '::1', http_version = 'h11' @pytest.mark.parametrize("host", ["::1", "[::1]"]) def test_can_validate_ipv6_san( self, ipv6_san_server: ServerConfig, host: str, http_version: str ) -> None: """Ensure that urllib3 can validate SANs with IPv6 addresses in them.""" with HTTPSConnectionPool( host, ipv6_san_server.port, cert_reqs="CERT_REQUIRED", ca_certs=ipv6_san_server.ca_certs, ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:1350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:14 +0000] [1259] [INFO] Running on https://[::1]:43973 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:43973 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): ::1:43973 ___________ TestHTTPS_IPV6SAN.test_can_validate_ipv6_san[h11-[::1]] ____________ self = ipv6_san_server = ServerConfig(scheme='https', host='::1', port=37329, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs2/ca.pem') host = '[::1]', http_version = 'h11' @pytest.mark.parametrize("host", ["::1", "[::1]"]) def test_can_validate_ipv6_san( self, ipv6_san_server: ServerConfig, host: str, http_version: str ) -> None: """Ensure that urllib3 can validate SANs with IPv6 addresses in them.""" with HTTPSConnectionPool( host, ipv6_san_server.port, cert_reqs="CERT_REQUIRED", ca_certs=ipv6_san_server.ca_certs, ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:1350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:16 +0000] [1259] [INFO] Running on https://[::1]:37329 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:37329 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): ::1:37329 _____________ TestHTTPS_IPV6SAN.test_can_validate_ipv6_san[h2-::1] _____________ self = ipv6_san_server = ServerConfig(scheme='https', host='::1', port=41905, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs3/ca.pem') host = '::1', http_version = 'h2' @pytest.mark.parametrize("host", ["::1", "[::1]"]) def test_can_validate_ipv6_san( self, ipv6_san_server: ServerConfig, host: str, http_version: str ) -> None: """Ensure that urllib3 can validate SANs with IPv6 addresses in them.""" with HTTPSConnectionPool( host, ipv6_san_server.port, cert_reqs="CERT_REQUIRED", ca_certs=ipv6_san_server.ca_certs, ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:1350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:17 +0000] [1259] [INFO] Running on https://[::1]:41905 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:41905 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): ::1:41905 ____________ TestHTTPS_IPV6SAN.test_can_validate_ipv6_san[h2-[::1]] ____________ self = ipv6_san_server = ServerConfig(scheme='https', host='::1', port=42813, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs4/ca.pem') host = '[::1]', http_version = 'h2' @pytest.mark.parametrize("host", ["::1", "[::1]"]) def test_can_validate_ipv6_san( self, ipv6_san_server: ServerConfig, host: str, http_version: str ) -> None: """Ensure that urllib3 can validate SANs with IPv6 addresses in them.""" with HTTPSConnectionPool( host, ipv6_san_server.port, cert_reqs="CERT_REQUIRED", ca_certs=ipv6_san_server.ca_certs, ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:1350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:19 +0000] [1259] [INFO] Running on https://[::1]:42813 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:42813 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): ::1:42813 ______________________ TestHTTPS_TLSv1_2.test_simple[h11] ______________________ self = http_version = 'h11' def test_simple(self, http_version: str) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:40:25 +0000] [1259] [INFO] Running on https://[::1]:42819 (CTRL + C to quit) [2026-08-30 18:40:25 +0000] [1259] [INFO] Running on https://127.0.0.1:42819 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:42819 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:42819 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ______________________ TestHTTPS_TLSv1_2.test_simple[h2] _______________________ self = http_version = 'h2' def test_simple(self, http_version: str) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ______________________ TestHTTPS_TLSv1_2.test_dotted_fqdn ______________________ self = @resolvesLocalhostFQDN() def test_dotted_fqdn(self) -> None: with HTTPSConnectionPool( self.host + ".", self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:166: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost.:42819 __________________ TestHTTPS_TLSv1_2.test_client_intermediate __________________ self = def test_client_intermediate(self) -> None: """Check that certificate chains work well with client certs We generate an intermediate CA from the root CA, and issue a client certificate from that intermediate CA. Since the server only knows about the root CA, we need to send it the certificate *and* the intermediate CA, so that it can check the whole chain. """ with HTTPSConnectionPool( self.host, self.port, key_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_KEY), cert_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_PEM), ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/certificate") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ________________ TestHTTPS_TLSv1_2.test_client_no_intermediate _________________ self = def test_client_no_intermediate(self) -> None: """Check that missing links in certificate chains indeed break The only difference with test_client_intermediate is that we don't send the intermediate CA to the server, only the client cert. """ with HTTPSConnectionPool( self.host, self.port, cert_file=os.path.join(self.certs_dir, CLIENT_NO_INTERMEDIATE_PEM), key_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_KEY), ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with pytest.raises((SSLError, ProtocolError)): > https_pool.request("GET", "/certificate", retries=False) test/with_dummyserver/test_https.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 __________________ TestHTTPS_TLSv1_2.test_client_key_password __________________ self = def test_client_key_password(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, key_file=os.path.join(self.certs_dir, PASSWORD_CLIENT_KEYFILE), cert_file=os.path.join(self.certs_dir, CLIENT_CERT), key_password="letmein", ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/certificate") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:975: in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:429: in ssl_wrap_socket context.load_cert_chain(certfile, keyfile, key_password) test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9e6ae350>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _______________________ TestHTTPS_TLSv1_2.test_verified ________________________ self = def test_verified(self) -> None: with HTTPSConnectionPool( self.host, self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with warnings.catch_warnings(record=True) as w: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:246: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:42819 _________________ TestHTTPS_TLSv1_2.test_verified_with_context _________________ self = def test_verified_with_context(self) -> None: ctx = util.ssl_.create_urllib3_context( cert_reqs=ssl.CERT_REQUIRED, ssl_minimum_version=self.tls_version() ) ctx.load_verify_locations(cafile=DEFAULT_CA) with HTTPSConnectionPool(self.host, self.port, ssl_context=ctx) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with mock.patch("warnings.warn") as warn: r = https_pool.request("GET", "/") assert r.status == 200 > assert not warn.called, warn.call_args_list E AssertionError: [call("X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead.", category=, stacklevel=2)] E assert not True E + where True = .called test/with_dummyserver/test_https.py:263: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:42819 "GET / HTTP/1.1" 200 0 ____________ TestHTTPS_TLSv1_2.test_context_combines_with_ca_certs _____________ self = def test_context_combines_with_ca_certs(self) -> None: ctx = util.ssl_.create_urllib3_context( cert_reqs=ssl.CERT_REQUIRED, ssl_minimum_version=self.tls_version() ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_context=ctx ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with mock.patch("warnings.warn") as warn: r = https_pool.request("GET", "/") assert r.status == 200 > assert not warn.called, warn.call_args_list E AssertionError: [call("X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead.", category=, stacklevel=2)] E assert not True E + where True = .called test/with_dummyserver/test_https.py:278: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:42819 "GET / HTTP/1.1" 200 0 ____________________ TestHTTPS_TLSv1_2.test_ca_dir_verified ____________________ self = tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_ca_dir_verified0') def test_ca_dir_verified(self, tmp_path: Path) -> None: # OpenSSL looks up certificates by the hash for their name, see c_rehash # TODO infer the bytes using `cryptography.x509.Name.public_bytes`. # https://github.com/pyca/cryptography/pull/3236 shutil.copyfile(DEFAULT_CA, str(tmp_path / "81deb5f7.0")) with HTTPSConnectionPool( self.host, self.port, cert_reqs="CERT_REQUIRED", ca_cert_dir=str(tmp_path), ssl_minimum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with warnings.catch_warnings(record=True) as w: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:42819 __________________ TestHTTPS_TLSv1_2.test_invalid_common_name __________________ self = def test_invalid_common_name(self) -> None: with HTTPSConnectionPool( "127.0.0.1", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with pytest.raises(MaxRetryError) as e: > https_pool.request("GET", "/", retries=0) test/with_dummyserver/test_https.py:311: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): 127.0.0.1:42819 _______________ TestHTTPS_TLSv1_2.test_assert_specific_hostname ________________ self = def test_assert_specific_hostname(self) -> None: with HTTPSConnectionPool( "localhost", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.assert_hostname = "localhost" > https_pool.request("GET", "/") test/with_dummyserver/test_https.py:443: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ____________________ TestHTTPS_TLSv1_2.test_server_hostname ____________________ self = def test_server_hostname(self) -> None: with HTTPSConnectionPool( "127.0.0.1", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, server_hostname="localhost", ssl_minimum_version=self.tls_version(), ) as https_pool: conn = https_pool._new_conn() > conn.request("GET", "/") test/with_dummyserver/test_https.py:455: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:500: in request self.endheaders() /usr/lib/python3.14/http/client.py:1381: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib/python3.14/http/client.py:1141: in _send_output self.send(msg) /usr/lib/python3.14/http/client.py:1085: in send self.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): 127.0.0.1:42819 ________________ TestHTTPS_TLSv1_2.test_ssl_correct_system_time ________________ self = def test_ssl_correct_system_time(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.cert_reqs = "CERT_REQUIRED" https_pool.ca_certs = DEFAULT_CA w = self._request_without_resource_warnings("GET", "/") > assert [] == w E assert [] == [] E E Right contains one more item: E Use -v to get more diff test/with_dummyserver/test_https.py:710: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:42819 "GET / HTTP/1.1" 200 0 _________________ TestHTTPS_TLSv1_2.test_ssl_wrong_system_time _________________ self = def test_ssl_wrong_system_time(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.cert_reqs = "CERT_REQUIRED" https_pool.ca_certs = DEFAULT_CA with mock.patch("urllib3.connection.datetime") as mock_date: mock_date.date.today.return_value = datetime.date(1970, 1, 1) w = self._request_without_resource_warnings("GET", "/") > assert len(w) == 1 E AssertionError: assert 2 == 1 E + where 2 = len([]) test/with_dummyserver/test_https.py:726: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:42819 "GET / HTTP/1.1" 200 0 ____________ TestHTTPS_TLSv1_2.test_set_ssl_version_to_tls_version _____________ self = def test_set_ssl_version_to_tls_version(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA ) as https_pool: https_pool.ssl_version = ssl_version = self.certs["ssl_version"] if ssl_version is getattr(ssl, "PROTOCOL_TLS", object()): cmgr: contextlib.AbstractContextManager[object] = ( contextlib.nullcontext() ) else: cmgr = pytest.warns( FutureWarning, match=r"'ssl_version' option is deprecated and will be removed " r"in urllib3 v3\.0\. Instead use 'ssl_minimum_version'", ) > with cmgr: ^^^^ E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. test/with_dummyserver/test_https.py:768: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:42819 "GET / HTTP/1.1" 200 0 ______________ TestHTTPS_TLSv1_2.test_tls_protocol_name_of_socket ______________ self = def test_tls_protocol_name_of_socket(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ssl_maximum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: > conn.connect() test/with_dummyserver/test_https.py:814: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _______________ TestHTTPS_TLSv1_2.test_ssl_version_is_deprecated _______________ self = def test_ssl_version_is_deprecated(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.ssl_version() == ssl.PROTOCOL_TLS_CLIENT: pytest.skip( "Skipping because ssl_version=ssl.PROTOCOL_TLS_CLIENT is not deprecated" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=self.ssl_version() ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: > with pytest.warns(FutureWarning) as w: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. test/with_dummyserver/test_https.py:831: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _ TestHTTPS_TLSv1_2.test_ssl_version_with_protocol_tls_or_client_not_deprecated[None] _ self = ssl_version = None @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _ TestHTTPS_TLSv1_2.test_ssl_version_with_protocol_tls_or_client_not_deprecated[2] _ self = ssl_version = <_SSLMethod.PROTOCOL_TLS: 2> @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _ TestHTTPS_TLSv1_2.test_ssl_version_with_protocol_tls_or_client_not_deprecated[16] _ self = ssl_version = <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ______ TestHTTPS_TLSv1_2.test_no_tls_version_deprecation_with_ssl_context ______ self = def test_no_tls_version_deprecation_with_ssl_context(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") ctx = util.ssl_.create_urllib3_context(ssl_minimum_version=self.tls_version()) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_context=ctx, ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:881: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ____________ TestHTTPS_TLSv1_2.test_tls_version_maximum_and_minimum ____________ self = def test_tls_version_maximum_and_minimum(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") from ssl import TLSVersion min_max_versions = [ (self.tls_version(), self.tls_version()), (TLSVersion.MINIMUM_SUPPORTED, self.tls_version()), (TLSVersion.MINIMUM_SUPPORTED, TLSVersion.MAXIMUM_SUPPORTED), ] for minimum_version, maximum_version in min_max_versions: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=minimum_version, ssl_maximum_version=maximum_version, ) as https_pool: conn = https_pool._get_conn() try: > conn.connect() test/with_dummyserver/test_https.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _______________ TestHTTPS_TLSv1_2.test_sslkeylogfile_empty[None] _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f9e8b2570> sslkeylogfile = None @pytest.mark.parametrize("sslkeylogfile", [None, ""]) def test_sslkeylogfile_empty( self, monkeypatch: pytest.MonkeyPatch, sslkeylogfile: str | None ) -> None: # Assert that an HTTPS connection doesn't error out when given # no SSLKEYLOGFILE or an empty value (ie 'SSLKEYLOGFILE=') if sslkeylogfile is not None: monkeypatch.setenv("SSLKEYLOGFILE", sslkeylogfile) else: monkeypatch.delenv("SSLKEYLOGFILE", raising=False) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 _________________ TestHTTPS_TLSv1_2.test_sslkeylogfile_empty[] _________________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f9e3dacd0> sslkeylogfile = '' @pytest.mark.parametrize("sslkeylogfile", [None, ""]) def test_sslkeylogfile_empty( self, monkeypatch: pytest.MonkeyPatch, sslkeylogfile: str | None ) -> None: # Assert that an HTTPS connection doesn't error out when given # no SSLKEYLOGFILE or an empty value (ie 'SSLKEYLOGFILE=') if sslkeylogfile is not None: monkeypatch.setenv("SSLKEYLOGFILE", sslkeylogfile) else: monkeypatch.delenv("SSLKEYLOGFILE", raising=False) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ___________________ TestHTTPS_TLSv1_2.test_alpn_default[h11] ___________________ self = http_version = 'h11' def test_alpn_default(self, http_version: str) -> None: """Default ALPN protocols are sent by default.""" with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:980: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ___________________ TestHTTPS_TLSv1_2.test_alpn_default[h2] ____________________ self = http_version = 'h2' def test_alpn_default(self, http_version: str) -> None: """Default ALPN protocols are sent by default.""" with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:980: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ___________ TestHTTPS_TLSv1_2.test_http2_probe_result_is_cached[h11] ___________ self = http_version = 'h11' def test_http2_probe_result_is_cached(self, http_version: str) -> None: assert http2_probe._values() == {} for i in range(2): # Do this twice to exercise the cache path with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:996: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ___________ TestHTTPS_TLSv1_2.test_http2_probe_result_is_cached[h2] ____________ self = http_version = 'h2' def test_http2_probe_result_is_cached(self, http_version: str) -> None: assert http2_probe._values() == {} for i in range(2): # Do this twice to exercise the cache path with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:996: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:42819 ______________________ TestHTTPS_TLSv1_3.test_simple[h11] ______________________ self = http_version = 'h11' def test_simple(self, http_version: str) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:41:08 +0000] [1259] [INFO] Running on https://[::1]:44449 (CTRL + C to quit) [2026-08-30 18:41:08 +0000] [1259] [INFO] Running on https://127.0.0.1:44449 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:44449 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:44449 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ______________________ TestHTTPS_TLSv1_3.test_simple[h2] _______________________ self = http_version = 'h2' def test_simple(self, http_version: str) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ______________________ TestHTTPS_TLSv1_3.test_dotted_fqdn ______________________ self = @resolvesLocalhostFQDN() def test_dotted_fqdn(self) -> None: with HTTPSConnectionPool( self.host + ".", self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:166: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost.:44449 __________________ TestHTTPS_TLSv1_3.test_client_intermediate __________________ self = def test_client_intermediate(self) -> None: """Check that certificate chains work well with client certs We generate an intermediate CA from the root CA, and issue a client certificate from that intermediate CA. Since the server only knows about the root CA, we need to send it the certificate *and* the intermediate CA, so that it can check the whole chain. """ with HTTPSConnectionPool( self.host, self.port, key_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_KEY), cert_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_PEM), ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/certificate") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ________________ TestHTTPS_TLSv1_3.test_client_no_intermediate _________________ self = def test_client_no_intermediate(self) -> None: """Check that missing links in certificate chains indeed break The only difference with test_client_intermediate is that we don't send the intermediate CA to the server, only the client cert. """ with HTTPSConnectionPool( self.host, self.port, cert_file=os.path.join(self.certs_dir, CLIENT_NO_INTERMEDIATE_PEM), key_file=os.path.join(self.certs_dir, CLIENT_INTERMEDIATE_KEY), ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with pytest.raises((SSLError, ProtocolError)): > https_pool.request("GET", "/certificate", retries=False) test/with_dummyserver/test_https.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 __________________ TestHTTPS_TLSv1_3.test_client_key_password __________________ self = def test_client_key_password(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, key_file=os.path.join(self.certs_dir, PASSWORD_CLIENT_KEYFILE), cert_file=os.path.join(self.certs_dir, CLIENT_CERT), key_password="letmein", ssl_minimum_version=self.tls_version(), ) as https_pool: > r = https_pool.request("GET", "/certificate") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:975: in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:429: in ssl_wrap_socket context.load_cert_chain(certfile, keyfile, key_password) test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9ea97ab0>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _______________________ TestHTTPS_TLSv1_3.test_verified ________________________ self = def test_verified(self) -> None: with HTTPSConnectionPool( self.host, self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with warnings.catch_warnings(record=True) as w: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:246: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:44449 _________________ TestHTTPS_TLSv1_3.test_verified_with_context _________________ self = def test_verified_with_context(self) -> None: ctx = util.ssl_.create_urllib3_context( cert_reqs=ssl.CERT_REQUIRED, ssl_minimum_version=self.tls_version() ) ctx.load_verify_locations(cafile=DEFAULT_CA) with HTTPSConnectionPool(self.host, self.port, ssl_context=ctx) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with mock.patch("warnings.warn") as warn: r = https_pool.request("GET", "/") assert r.status == 200 > assert not warn.called, warn.call_args_list E AssertionError: [call("X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead.", category=, stacklevel=2)] E assert not True E + where True = .called test/with_dummyserver/test_https.py:263: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:44449 "GET / HTTP/1.1" 200 0 ____________ TestHTTPS_TLSv1_3.test_context_combines_with_ca_certs _____________ self = def test_context_combines_with_ca_certs(self) -> None: ctx = util.ssl_.create_urllib3_context( cert_reqs=ssl.CERT_REQUIRED, ssl_minimum_version=self.tls_version() ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_context=ctx ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with mock.patch("warnings.warn") as warn: r = https_pool.request("GET", "/") assert r.status == 200 > assert not warn.called, warn.call_args_list E AssertionError: [call("X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead.", category=, stacklevel=2)] E assert not True E + where True = .called test/with_dummyserver/test_https.py:278: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:44449 "GET / HTTP/1.1" 200 0 ____________________ TestHTTPS_TLSv1_3.test_ca_dir_verified ____________________ self = tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_ca_dir_verified1') def test_ca_dir_verified(self, tmp_path: Path) -> None: # OpenSSL looks up certificates by the hash for their name, see c_rehash # TODO infer the bytes using `cryptography.x509.Name.public_bytes`. # https://github.com/pyca/cryptography/pull/3236 shutil.copyfile(DEFAULT_CA, str(tmp_path / "81deb5f7.0")) with HTTPSConnectionPool( self.host, self.port, cert_reqs="CERT_REQUIRED", ca_cert_dir=str(tmp_path), ssl_minimum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection with warnings.catch_warnings(record=True) as w: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (2): localhost:44449 __________________ TestHTTPS_TLSv1_3.test_invalid_common_name __________________ self = def test_invalid_common_name(self) -> None: with HTTPSConnectionPool( "127.0.0.1", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: with pytest.raises(MaxRetryError) as e: > https_pool.request("GET", "/", retries=0) test/with_dummyserver/test_https.py:311: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): 127.0.0.1:44449 _______________ TestHTTPS_TLSv1_3.test_assert_specific_hostname ________________ self = def test_assert_specific_hostname(self) -> None: with HTTPSConnectionPool( "localhost", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.assert_hostname = "localhost" > https_pool.request("GET", "/") test/with_dummyserver/test_https.py:443: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ____________________ TestHTTPS_TLSv1_3.test_server_hostname ____________________ self = def test_server_hostname(self) -> None: with HTTPSConnectionPool( "127.0.0.1", self.port, cert_reqs="CERT_REQUIRED", ca_certs=DEFAULT_CA, server_hostname="localhost", ssl_minimum_version=self.tls_version(), ) as https_pool: conn = https_pool._new_conn() > conn.request("GET", "/") test/with_dummyserver/test_https.py:455: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:500: in request self.endheaders() /usr/lib/python3.14/http/client.py:1381: in endheaders self._send_output(message_body, encode_chunked=encode_chunked) /usr/lib/python3.14/http/client.py:1141: in _send_output self.send(msg) /usr/lib/python3.14/http/client.py:1085: in send self.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): 127.0.0.1:44449 ________________ TestHTTPS_TLSv1_3.test_ssl_correct_system_time ________________ self = def test_ssl_correct_system_time(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.cert_reqs = "CERT_REQUIRED" https_pool.ca_certs = DEFAULT_CA w = self._request_without_resource_warnings("GET", "/") > assert [] == w E assert [] == [] E E Right contains one more item: E Use -v to get more diff test/with_dummyserver/test_https.py:710: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:44449 "GET / HTTP/1.1" 200 0 _________________ TestHTTPS_TLSv1_3.test_ssl_wrong_system_time _________________ self = def test_ssl_wrong_system_time(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as https_pool: https_pool.cert_reqs = "CERT_REQUIRED" https_pool.ca_certs = DEFAULT_CA with mock.patch("urllib3.connection.datetime") as mock_date: mock_date.date.today.return_value = datetime.date(1970, 1, 1) w = self._request_without_resource_warnings("GET", "/") > assert len(w) == 1 E AssertionError: assert 2 == 1 E + where 2 = len([]) test/with_dummyserver/test_https.py:726: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 DEBUG urllib3.connectionpool:connectionpool.py:544 https://localhost:44449 "GET / HTTP/1.1" 200 0 ____________ TestHTTPS_TLSv1_3.test_set_ssl_version_to_tls_version _____________ self = def test_set_ssl_version_to_tls_version(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA ) as https_pool: https_pool.ssl_version = ssl_version = self.certs["ssl_version"] if ssl_version is getattr(ssl, "PROTOCOL_TLS", object()): cmgr: contextlib.AbstractContextManager[object] = ( contextlib.nullcontext() ) else: cmgr = pytest.warns( FutureWarning, match=r"'ssl_version' option is deprecated and will be removed " r"in urllib3 v3\.0\. Instead use 'ssl_minimum_version'", ) with cmgr: > r = https_pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:769: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ______________ TestHTTPS_TLSv1_3.test_tls_protocol_name_of_socket ______________ self = def test_tls_protocol_name_of_socket(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ssl_maximum_version=self.tls_version(), ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: > conn.connect() test/with_dummyserver/test_https.py:814: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _ TestHTTPS_TLSv1_3.test_ssl_version_with_protocol_tls_or_client_not_deprecated[None] _ self = ssl_version = None @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _ TestHTTPS_TLSv1_3.test_ssl_version_with_protocol_tls_or_client_not_deprecated[2] _ self = ssl_version = <_SSLMethod.PROTOCOL_TLS: 2> @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _ TestHTTPS_TLSv1_3.test_ssl_version_with_protocol_tls_or_client_not_deprecated[16] _ self = ssl_version = <_SSLMethod.PROTOCOL_TLS_CLIENT: 16> @pytest.mark.parametrize( "ssl_version", [None, ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS_CLIENT] ) def test_ssl_version_with_protocol_tls_or_client_not_deprecated( self, ssl_version: int | None ) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") if self.tls_protocol_not_default(): pytest.skip( f"Skipping because '{self.tls_protocol_name}' isn't set by default" ) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_version=ssl_version ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ______ TestHTTPS_TLSv1_3.test_no_tls_version_deprecation_with_ssl_context ______ self = def test_no_tls_version_deprecation_with_ssl_context(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") ctx = util.ssl_.create_urllib3_context(ssl_minimum_version=self.tls_version()) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_context=ctx, ) as https_pool: with contextlib.closing(https_pool._get_conn()) as conn: with warnings.catch_warnings(record=True) as w: > conn.connect() test/with_dummyserver/test_https.py:881: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ____________ TestHTTPS_TLSv1_3.test_tls_version_maximum_and_minimum ____________ self = def test_tls_version_maximum_and_minimum(self) -> None: if self.tls_protocol_name is None: pytest.skip("Skipping base test class") from ssl import TLSVersion min_max_versions = [ (self.tls_version(), self.tls_version()), (TLSVersion.MINIMUM_SUPPORTED, self.tls_version()), (TLSVersion.MINIMUM_SUPPORTED, TLSVersion.MAXIMUM_SUPPORTED), ] for minimum_version, maximum_version in min_max_versions: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=minimum_version, ssl_maximum_version=maximum_version, ) as https_pool: conn = https_pool._get_conn() try: > conn.connect() test/with_dummyserver/test_https.py:907: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _______________ TestHTTPS_TLSv1_3.test_sslkeylogfile_empty[None] _______________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f9e4c9b00> sslkeylogfile = None @pytest.mark.parametrize("sslkeylogfile", [None, ""]) def test_sslkeylogfile_empty( self, monkeypatch: pytest.MonkeyPatch, sslkeylogfile: str | None ) -> None: # Assert that an HTTPS connection doesn't error out when given # no SSLKEYLOGFILE or an empty value (ie 'SSLKEYLOGFILE=') if sslkeylogfile is not None: monkeypatch.setenv("SSLKEYLOGFILE", sslkeylogfile) else: monkeypatch.delenv("SSLKEYLOGFILE", raising=False) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _________________ TestHTTPS_TLSv1_3.test_sslkeylogfile_empty[] _________________ self = monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x3f9e4e96a0> sslkeylogfile = '' @pytest.mark.parametrize("sslkeylogfile", [None, ""]) def test_sslkeylogfile_empty( self, monkeypatch: pytest.MonkeyPatch, sslkeylogfile: str | None ) -> None: # Assert that an HTTPS connection doesn't error out when given # no SSLKEYLOGFILE or an empty value (ie 'SSLKEYLOGFILE=') if sslkeylogfile is not None: monkeypatch.setenv("SSLKEYLOGFILE", sslkeylogfile) else: monkeypatch.delenv("SSLKEYLOGFILE", raising=False) with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/") ^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:969: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ___________________ TestHTTPS_TLSv1_3.test_alpn_default[h11] ___________________ self = http_version = 'h11' def test_alpn_default(self, http_version: str) -> None: """Default ALPN protocols are sent by default.""" with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:980: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ___________________ TestHTTPS_TLSv1_3.test_alpn_default[h2] ____________________ self = http_version = 'h2' def test_alpn_default(self, http_version: str) -> None: """Default ALPN protocols are sent by default.""" with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ssl_minimum_version=self.tls_version(), ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:980: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ___________ TestHTTPS_TLSv1_3.test_http2_probe_result_is_cached[h11] ___________ self = http_version = 'h11' def test_http2_probe_result_is_cached(self, http_version: str) -> None: assert http2_probe._values() == {} for i in range(2): # Do this twice to exercise the cache path with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:996: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 ___________ TestHTTPS_TLSv1_3.test_http2_probe_result_is_cached[h2] ____________ self = http_version = 'h2' def test_http2_probe_result_is_cached(self, http_version: str) -> None: assert http2_probe._values() == {} for i in range(2): # Do this twice to exercise the cache path with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA, ) as pool: > r = pool.request("GET", "/alpn_protocol", retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_https.py:996: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/http2/connection.py:106: in connect super().connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44449 _________________ TestClientCerts.test_client_certs_two_files __________________ self = def test_client_certs_two_files(self) -> None: """ Having a client cert in a separate file to its associated key works properly. """ done_receiving = Event() client_certs = [] def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] sock = self._wrap_in_ssl(sock) client_certs.append(sock.getpeercert()) data = b"" while not data.endswith(b"\r\n\r\n"): data += sock.recv(8192) sock.sendall( b"HTTP/1.1 200 OK\r\n" b"Server: testsocket\r\n" b"Connection: close\r\n" b"Content-Length: 6\r\n" b"\r\n" b"Valid!" ) done_receiving.wait(5) sock.close() self._start_server(socket_handler) with HTTPSConnectionPool( self.host, self.port, cert_file=self.cert_path, key_file=self.key_path, cert_reqs="REQUIRED", ca_certs=self.ca_path, ) as pool: > pool.request("GET", "/", retries=0) test/with_dummyserver/test_socketlevel.py:256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:44989 ____________ TestClientCerts.test_missing_client_certs_raises_error ____________ self = def test_missing_client_certs_raises_error(self) -> None: """ Having client certs not be present causes an error. """ done_receiving = Event() def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] try: self._wrap_in_ssl(sock) except ssl.SSLError: pass done_receiving.wait(5) sock.close() self._start_server(socket_handler) with HTTPSConnectionPool( self.host, self.port, cert_reqs="REQUIRED", ca_certs=self.ca_path ) as pool: with pytest.raises(MaxRetryError): > pool.request("GET", "/", retries=0) test/with_dummyserver/test_socketlevel.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:37051 ____________ TestClientCerts.test_client_cert_with_string_password _____________ self = def test_client_cert_with_string_password(self) -> None: > self.run_client_cert_with_password_test("letmein") test/with_dummyserver/test_socketlevel.py:331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/with_dummyserver/test_socketlevel.py:368: in run_client_cert_with_password_test ssl_context.load_cert_chain( test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9e59fe20>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _____________ TestClientCerts.test_client_cert_with_bytes_password _____________ self = def test_client_cert_with_bytes_password(self) -> None: > self.run_client_cert_with_password_test(b"letmein") test/with_dummyserver/test_socketlevel.py:334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/with_dummyserver/test_socketlevel.py:368: in run_client_cert_with_password_test ssl_context.load_cert_chain( test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9e59cb40>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ___________ TestClientCerts.test_load_keyfile_with_invalid_password ____________ self = def test_load_keyfile_with_invalid_password(self) -> None: assert ssl_.SSLContext is not None context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23) with pytest.raises(ssl.SSLError): > context.load_cert_chain( certfile=self.cert_path, keyfile=self.password_key_path, password=b"letmei", ) test/with_dummyserver/test_socketlevel.py:388: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9f083060>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ______________ TestSocketClosing.test_socket_shutdown_stops_recv _______________ self = def test_socket_shutdown_stops_recv(self) -> None: timed_out, starting_read = Event(), Event() def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] ssl_sock = original_ssl_wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) # Consume request buf = b"" while not buf.endswith(b"\r\n\r\n"): buf = ssl_sock.recv(65535) # Send incomplete message (note Content-Length) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 10\r\n" b"\r\n" b"Hi-" ) timed_out.wait(5) ssl_sock.close() self._start_server(socket_handler) class TestClient(threading.Thread): def __init__(self, host: str, port: int) -> None: super().__init__() self.host, self.port = host, port self.response: BaseHTTPResponse | None = None def run(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA ) as pool: self.response = pool.urlopen( "GET", "/", preload_content=False, retries=0 ) with pytest.raises(ProtocolError, match="Connection broken"): starting_read.set() self.response.read() test_client = TestClient(self.host, self.port) test_client.start() # First, wait to make sure the client is really stuck reading starting_read.wait(5) time.sleep(LONG_TIMEOUT) # Calling shutdown here calls shutdown() on the underlying socket, # so that the remaining read will fail instead of blocking # indefinitely > assert test_client.response is not None E assert None is not None E + where None = .response test/with_dummyserver/test_socketlevel.py:1088: AssertionError ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:39147 _____________________ TestSocketSSL.test_ssl_read_timeout ______________________ self = def test_ssl_read_timeout(self) -> None: timed_out = Event() def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] # disable Nagle's algorithm so there's no delay in sending a partial body sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, True) ssl_sock = original_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( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 10\r\n" b"\r\n" b"Hi-" ) 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:1575: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG urllib3.util.retry:retry.py:306 Converted retries value: 0 -> Retry(total=0, connect=None, read=None, redirect=None, status=None) DEBUG urllib3.connectionpool:connectionpool.py:1062 Starting new HTTPS connection (1): localhost:39175 ________ TestHTTPProxyManager.test_https_proxy_pyopenssl_not_supported _________ self = @withPyOpenSSL def test_https_proxy_pyopenssl_not_supported(self) -> None: with proxy_from_url(self.https_proxy_url, ca_certs=DEFAULT_CA) as https: > r = https.request("GET", f"{self.http_url}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning __________ TestHTTPProxyManager.test_https_proxy_forwarding_for_https __________ self = def test_https_proxy_forwarding_for_https(self) -> None: with proxy_from_url( self.https_proxy_url, ca_certs=DEFAULT_CA, use_forwarding_for_https=True, ) as https: > r = https.request("GET", f"{self.http_url}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _______________________ TestHTTPProxyManager.test_oldapi _______________________ self = def test_oldapi(self) -> None: with ProxyManager( connection_from_url(self.proxy_url), ca_certs=DEFAULT_CA # type: ignore[arg-type] ) as http: r = http.request("GET", f"{self.http_url}/") assert r.status == 200 > r = http.request("GET", f"{self.https_url}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'content-type', b'text/html; charset=utf-8'), (b'content-length', b'13'), (b'date', b'Sun, 30 Aug 2026 18:44:29 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:34239/ "HTTP/1.1 200 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete __________________ TestHTTPProxyManager.test_proxy_https_fqdn __________________ self = @resolvesLocalhostFQDN() def test_proxy_https_fqdn(self) -> None: with proxy_from_url(self.proxy_url, ca_certs=DEFAULT_CA) as http: > r = http.request("GET", f"{self.https_url_fqdn}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:220: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ___________________ TestHTTPProxyManager.test_proxy_verified ___________________ self = def test_proxy_verified(self) -> None: with proxy_from_url( self.proxy_url, cert_reqs="REQUIRED", ca_certs=self.bad_ca_path ) as http: with http._new_pool( "https", self.https_host, self.https_port ) as https_pool: with pytest.raises(MaxRetryError) as e: https_pool.request("GET", "/", retries=0) assert isinstance(e.value.reason, SSLError) assert ( "certificate verify failed" in str(e.value.reason) # PyPy is more specific or "self signed certificate in certificate chain" in str(e.value.reason) ), f"Expected 'certificate verify failed', instead got: {e.value.reason!r}" http = proxy_from_url( self.proxy_url, cert_reqs="REQUIRED", ca_certs=DEFAULT_CA ) with http._new_pool( "https", self.https_host, self.https_port ) as https_pool2: with contextlib.closing(https_pool._new_conn()) as conn: assert conn.__class__ == VerifiedHTTPSConnection > https_pool2.request( "GET", "/" ) # Should succeed without exceptions. test/with_dummyserver/test_proxy_poolmanager.py:247: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ----------------------------- Captured stderr call ----------------------------- [2026-08-30 18:44:33 +0000] [1259] [ERROR] Error in ASGI Framework + Exception Group Traceback (most recent call last): | File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/trio/task_group.py", line 26, in _handle | await app(scope, receive, send, sync_spawn, call_soon) | File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/app_wrappers.py", line 33, in __call__ | await self.app(scope, receive, send) | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 45, in __call__ | await self.connect(scope, send) | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 113, in connect | async with trio.open_nursery(strict_exception_groups=True) as nursery: | ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_core/_run.py", line 1126, in __aexit__ | raise combined_error_from_nursery | ExceptionGroup: Exceptions from Trio nursery (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 46, in _translate_socket_errors_to_stream_errors | yield | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 149, in receive_some | return await self.socket.recv(max_bytes) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_socket.py", line 440, in wrapper | return await self._nonblocking_helper(wait_fn, fn, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_socket.py", line 1014, in _nonblocking_helper | return fn(self._sock, *args, **kwargs) | ConnectionResetError: [Errno 104] Connection reset by peer | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 98, in start_forward | data = await reader.receive_some(4096) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 148, in receive_some | with _translate_socket_errors_to_stream_errors(): | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ | File "/usr/lib/python3.14/contextlib.py", line 162, in __exit__ | self.gen.throw(value) | ~~~~~~~~~~~~~~^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 51, in _translate_socket_errors_to_stream_errors | raise trio.BrokenResourceError(f"socket connection broken: {exc}") from exc | trio.BrokenResourceError: socket connection broken: [Errno 104] Connection reset by peer +------------------------------------ ------------------------------ Captured log call ------------------------------- ERROR hypercorn.error:logging.py:114 Error in ASGI Framework + Exception Group Traceback (most recent call last): | File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/trio/task_group.py", line 26, in _handle | await app(scope, receive, send, sync_spawn, call_soon) | File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/app_wrappers.py", line 33, in __call__ | await self.app(scope, receive, send) | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 45, in __call__ | await self.connect(scope, send) | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 113, in connect | async with trio.open_nursery(strict_exception_groups=True) as nursery: | ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_core/_run.py", line 1126, in __aexit__ | raise combined_error_from_nursery | ExceptionGroup: Exceptions from Trio nursery (1 sub-exception) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 46, in _translate_socket_errors_to_stream_errors | yield | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 149, in receive_some | return await self.socket.recv(max_bytes) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_socket.py", line 440, in wrapper | return await self._nonblocking_helper(wait_fn, fn, *args, **kwargs) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_socket.py", line 1014, in _nonblocking_helper | return fn(self._sock, *args, **kwargs) | ConnectionResetError: [Errno 104] Connection reset by peer | | The above exception was the direct cause of the following exception: | | Traceback (most recent call last): | File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 98, in start_forward | data = await reader.receive_some(4096) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 148, in receive_some | with _translate_socket_errors_to_stream_errors(): | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ | File "/usr/lib/python3.14/contextlib.py", line 162, in __exit__ | self.gen.throw(value) | ~~~~~~~~~~~~~~^^^^^^^ | File "/usr/lib/python3.14/site-packages/trio/_highlevel_socket.py", line 51, in _translate_socket_errors_to_stream_errors | raise trio.BrokenResourceError(f"socket connection broken: {exc}") from exc | trio.BrokenResourceError: socket connection broken: [Errno 104] Connection reset by peer +------------------------------------ ______________ TestHTTPProxyManager.test_cross_protocol_redirect _______________ self = def test_cross_protocol_redirect(self) -> None: with proxy_from_url(self.proxy_url, ca_certs=DEFAULT_CA) as http: cross_protocol_location = f"{self.https_url}/echo?a=b" with pytest.raises(MaxRetryError): http.request( "GET", f"{self.http_url}/redirect", fields={"target": cross_protocol_location}, retries=0, ) > r = http.request( "GET", f"{self.http_url}/redirect", fields={"target": f"{self.https_url}/echo?a=b"}, retries=1, ) test/with_dummyserver/test_proxy_poolmanager.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:503: in urlopen return self.urlopen(method, redirect_location, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 303, b'', [(b'content-type', b'text/html; charset=utf-8'), (b'content-length', b'0'), (b'location', b'https://localhost:44047/echo?a=b'), (b'date', b'Sun, 30 Aug 2026 18:44:37 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:34239/redirect?target=https%3A%2F%2Flocalhost%3A44047%2Fecho%3Fa%3Db "HTTP/1.1 303 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 303, b'', [(b'content-type', b'text/html; charset=utf-8'), (b'content-length', b'0'), (b'location', b'https://localhost:44047/echo?a=b'), (b'date', b'Sun, 30 Aug 2026 18:44:38 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:34239/redirect?target=https%3A%2F%2Flocalhost%3A44047%2Fecho%3Fa%3Db "HTTP/1.1 303 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete INFO urllib3.poolmanager:poolmanager.py:500 Redirecting http://localhost:34239/redirect?target=https%3A%2F%2Flocalhost%3A44047%2Fecho%3Fa%3Db -> https://localhost:44047/echo?a=b ______________________ TestHTTPProxyManager.test_headers _______________________ self = def test_headers(self) -> None: with proxy_from_url( self.proxy_url, headers={"Foo": "bar"}, proxy_headers={"Hickory": "dickory"}, ca_certs=DEFAULT_CA, ) as http: r = http.request_encode_url("GET", f"{self.http_url}/headers") returned_headers = r.json() assert returned_headers.get("Foo") == "bar" assert returned_headers.get("Hickory") == "dickory" assert returned_headers.get("Host") == f"{self.http_host}:{self.http_port}" r = http.request_encode_url("GET", f"{self.http_url_alt}/headers") returned_headers = r.json() assert returned_headers.get("Foo") == "bar" assert returned_headers.get("Hickory") == "dickory" assert ( returned_headers.get("Host") == f"{self.http_host_alt}:{self.http_port}" ) > r = http.request_encode_url("GET", f"{self.https_url}/headers") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:417: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'content-type', b'application/json'), (b'content-length', b'185'), (b'date', b'Sun, 30 Aug 2026 18:44:40 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:34239/headers "HTTP/1.1 200 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='127.0.0.1' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'content-type', b'application/json'), (b'content-length', b'191'), (b'date', b'Sun, 30 Aug 2026 18:44:40 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://127.0.0.1:34239/headers "HTTP/1.1 200 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete ___________________ TestHTTPProxyManager.test_https_headers ____________________ self = def test_https_headers(self) -> None: with proxy_from_url( self.https_proxy_url, headers={"Foo": "bar"}, proxy_headers={"Hickory": "dickory"}, ca_certs=DEFAULT_CA, ) as http: > r = http.request_encode_url("GET", f"{self.http_url}/headers") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:478: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _________ TestHTTPProxyManager.test_https_headers_forwarding_for_https _________ self = def test_https_headers_forwarding_for_https(self) -> None: with proxy_from_url( self.https_proxy_url, headers={"Foo": "bar"}, proxy_headers={"Hickory": "dickory"}, ca_certs=DEFAULT_CA, use_forwarding_for_https=True, ) as http: > r = http.request_encode_url("GET", f"{self.https_url}/headers") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:511: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _ TestHTTPProxyManager.test_forwarding_proxy_request_timeout[https-http-False] _ self = proxy_scheme = 'https', target_scheme = 'http', use_forwarding_for_https = False @requires_network() @pytest.mark.parametrize( ["proxy_scheme", "target_scheme", "use_forwarding_for_https"], [ ("http", "http", False), ("https", "http", False), # 'use_forwarding_for_https' is only valid for HTTPS+HTTPS. ("https", "https", True), ], ) def test_forwarding_proxy_request_timeout( self, proxy_scheme: str, target_scheme: str, use_forwarding_for_https: bool ) -> None: proxy_url = self.https_proxy_url if proxy_scheme == "https" else self.proxy_url target_url = f"{target_scheme}://{TARPIT_HOST}" with proxy_from_url( proxy_url, ca_certs=DEFAULT_CA, use_forwarding_for_https=use_forwarding_for_https, ) as proxy: with pytest.raises(MaxRetryError) as e: timeout = Timeout(connect=LONG_TIMEOUT, read=SHORT_TIMEOUT) > proxy.request("GET", target_url, timeout=timeout) test/with_dummyserver/test_proxy_poolmanager.py:598: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _ TestHTTPProxyManager.test_forwarding_proxy_request_timeout[https-https-True] _ self = proxy_scheme = 'https', target_scheme = 'https', use_forwarding_for_https = True @requires_network() @pytest.mark.parametrize( ["proxy_scheme", "target_scheme", "use_forwarding_for_https"], [ ("http", "http", False), ("https", "http", False), # 'use_forwarding_for_https' is only valid for HTTPS+HTTPS. ("https", "https", True), ], ) def test_forwarding_proxy_request_timeout( self, proxy_scheme: str, target_scheme: str, use_forwarding_for_https: bool ) -> None: proxy_url = self.https_proxy_url if proxy_scheme == "https" else self.proxy_url target_url = f"{target_scheme}://{TARPIT_HOST}" with proxy_from_url( proxy_url, ca_certs=DEFAULT_CA, use_forwarding_for_https=use_forwarding_for_https, ) as proxy: with pytest.raises(MaxRetryError) as e: timeout = Timeout(connect=LONG_TIMEOUT, read=SHORT_TIMEOUT) > proxy.request("GET", target_url, timeout=timeout) test/with_dummyserver/test_proxy_poolmanager.py:598: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ____ TestHTTPProxyManager.test_tunneling_proxy_request_timeout[https-https] ____ self = proxy_scheme = 'https', target_scheme = 'https' @requires_network() @pytest.mark.parametrize( ["proxy_scheme", "target_scheme"], [("http", "https"), ("https", "https")] ) def test_tunneling_proxy_request_timeout( self, proxy_scheme: str, target_scheme: str ) -> None: proxy_url = self.https_proxy_url if proxy_scheme == "https" else self.proxy_url target_url = f"{target_scheme}://{TARPIT_HOST}" with proxy_from_url( proxy_url, ca_certs=DEFAULT_CA, ) as proxy: with pytest.raises(MaxRetryError) as e: timeout = Timeout(connect=LONG_TIMEOUT, read=SHORT_TIMEOUT) > proxy.request("GET", target_url, timeout=timeout) test/with_dummyserver/test_proxy_poolmanager.py:621: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning --------------------------- Captured stderr teardown --------------------------- [2026-08-30 18:44:52 +0000] [1259] [ERROR] Error in ASGI Framework Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions yield File "/usr/lib/python3.14/site-packages/httpx/_transports/default.py", line 394, in handle_async_request resp = await self._pool.handle_async_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpcore/_async/connection_pool.py", line 256, in handle_async_request raise exc from None File "/usr/lib/python3.14/site-packages/httpcore/_async/connection_pool.py", line 236, in handle_async_request response = await connection.handle_async_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pool_request.request ^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/lib/python3.14/site-packages/httpcore/_async/connection.py", line 101, in handle_async_request raise exc File "/usr/lib/python3.14/site-packages/httpcore/_async/connection.py", line 78, in handle_async_request stream = await self._connect(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpcore/_async/connection.py", line 124, in _connect stream = await self._network_backend.connect_tcp(**kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp return await self._backend.connect_tcp( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ File "/usr/lib/python3.14/site-packages/httpcore/_backends/trio.py", line 128, in connect_tcp with map_exceptions(exc_map): ~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/lib/python3.14/contextlib.py", line 162, in __exit__ self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "/usr/lib/python3.14/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions raise to_exc(exc) from exc httpcore.ConnectTimeout The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/trio/task_group.py", line 26, in _handle await app(scope, receive, send, sync_spawn, call_soon) File "/build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/hypercorn/app_wrappers.py", line 33, in __call__ await self.app(scope, receive, send) File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 43, in __call__ await self.absolute_uri(scope, receive, send) File "/build/python-urllib3/src/urllib3-2.7.0/dummyserver/asgi_proxy.py", line 56, in absolute_uri client_response = await client.request( ^^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ File "/usr/lib/python3.14/site-packages/httpx/_client.py", line 1540, in request return await self.send(request, auth=auth, follow_redirects=follow_redirects) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpx/_client.py", line 1629, in send response = await self._send_handling_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... ) ^ File "/usr/lib/python3.14/site-packages/httpx/_client.py", line 1657, in _send_handling_auth response = await self._send_handling_redirects( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/lib/python3.14/site-packages/httpx/_client.py", line 1694, in _send_handling_redirects response = await self._send_single_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpx/_client.py", line 1730, in _send_single_request response = await transport.handle_async_request(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.14/site-packages/httpx/_transports/default.py", line 393, in handle_async_request with map_httpcore_exceptions(): ~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.14/contextlib.py", line 162, in __exit__ self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "/usr/lib/python3.14/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions raise mapped_exc(message) from exc httpx.ConnectTimeout ---------------------------- Captured log teardown ----------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.failed exception=ConnectTimeout(TooSlowError()) ____________ TestHTTPProxyManager.test_scheme_host_case_insensitive ____________ self = def test_scheme_host_case_insensitive(self) -> None: """Assert that upper-case schemes and hosts are normalized.""" with proxy_from_url(self.proxy_url.upper(), ca_certs=DEFAULT_CA) as http: r = http.request("GET", f"{self.http_url.upper()}/") assert r.status == 200 > r = http.request("GET", f"{self.https_url.upper()}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:732: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ------------------------------ Captured log call ------------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=34239 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'content-type', b'text/html; charset=utf-8'), (b'content-length', b'13'), (b'date', b'Sun, 30 Aug 2026 18:44:56 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:34239/ "HTTP/1.1 200 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete ________________ TestIPv6HTTPProxyManager.test_basic_ipv6_proxy ________________ self = def test_basic_ipv6_proxy(self) -> None: with proxy_from_url(self.proxy_url, ca_certs=DEFAULT_CA) as http: r = http.request("GET", f"{self.http_url}/") assert r.status == 200 > r = http.request("GET", f"{self.https_url}/") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:773: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on http://[::1]:45589 (CTRL + C to quit) [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on http://127.0.0.1:45589 (CTRL + C to quit) [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on https://[::1]:37501 (CTRL + C to quit) [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on https://127.0.0.1:37501 (CTRL + C to quit) [2026-08-30 18:45:04 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on http://[::1]:46573 (CTRL + C to quit) [2026-08-30 18:45:04 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:04 +0000] [1259] [INFO] Running on https://[::1]:43529 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on http://[::1]:45589 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on http://127.0.0.1:45589 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://[::1]:37501 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:37501 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on http://[::1]:46573 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:43529 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- DEBUG httpcore.connection:_trace.py:87 connect_tcp.started host='localhost' port=45589 local_address=None timeout=5.0 socket_options=None DEBUG httpcore.connection:_trace.py:87 connect_tcp.complete return_value= DEBUG httpcore.http11:_trace.py:87 send_request_headers.started request= DEBUG httpcore.http11:_trace.py:87 send_request_headers.complete DEBUG httpcore.http11:_trace.py:87 send_request_body.started request= DEBUG httpcore.http11:_trace.py:87 send_request_body.complete DEBUG httpcore.http11:_trace.py:87 receive_response_headers.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_headers.complete return_value=(b'HTTP/1.1', 200, b'', [(b'content-type', b'text/html; charset=utf-8'), (b'content-length', b'13'), (b'date', b'Sun, 30 Aug 2026 18:45:04 GMT'), (b'server', b'hypercorn-h11')]) INFO httpx:_client.py:1740 HTTP Request: GET http://localhost:45589/ "HTTP/1.1 200 " DEBUG httpcore.http11:_trace.py:87 receive_response_body.started request= DEBUG httpcore.http11:_trace.py:87 receive_response_body.complete DEBUG httpcore.http11:_trace.py:87 response_closed.started DEBUG httpcore.http11:_trace.py:87 response_closed.complete DEBUG httpcore.connection:_trace.py:87 close.started DEBUG httpcore.connection:_trace.py:87 close.complete ______ TestHTTPSProxyVerification.test_https_proxy_assert_fingerprint_md5 ______ self = no_san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=33893, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs25/ca.pem...erverConfig(scheme='https', host='localhost', port=34107, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs25/ca.pem')) def test_https_proxy_assert_fingerprint_md5( self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = no_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"https://{server.host}:{server.port}" proxy_ctx = urllib3.util.ssl_.create_urllib3_context(verify_flags=0) proxy_fingerprint = self._get_proxy_fingerprint_md5(proxy.ca_certs) with proxy_from_url( proxy_url, ca_certs=proxy.ca_certs, proxy_ssl_context=proxy_ctx, proxy_assert_fingerprint=proxy_fingerprint, ) as https: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:814: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:975: in _ssl_wrap_socket_and_match_hostname ssl_sock = ssl_wrap_socket( test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:433: in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:474: in _ssl_wrap_socket_impl SSLTransport._validate_ssl_context_for_tls_in_tls(ssl_context) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ssl_context = @staticmethod def _validate_ssl_context_for_tls_in_tls(ssl_context: ssl.SSLContext) -> None: """ Raises a ProxySchemeUnsupported if the provided ssl_context can't be used for TLS in TLS. The only requirement is that the ssl_context provides the 'wrap_bio' methods. """ if not hasattr(ssl_context, "wrap_bio"): > raise ProxySchemeUnsupported( "TLS in TLS requires SSLContext.wrap_bio() which isn't " "available on non-native SSLContext" ) E urllib3.exceptions.ProxySchemeUnsupported: TLS in TLS requires SSLContext.wrap_bio() which isn't available on non-native SSLContext test-env/lib/python3.14/site-packages/urllib3/util/ssltransport.py:44: ProxySchemeUnsupported ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:09 +0000] [1259] [INFO] Running on https://[::1]:34107 (CTRL + C to quit) [2026-08-30 18:45:09 +0000] [1259] [INFO] Running on https://127.0.0.1:34107 (CTRL + C to quit) [2026-08-30 18:45:09 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:09 +0000] [1259] [INFO] Running on https://[::1]:33893 (CTRL + C to quit) [2026-08-30 18:45:09 +0000] [1259] [INFO] Running on https://127.0.0.1:33893 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:34107 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:34107 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:33893 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:33893 (CTRL + C to quit) _ TestHTTPSProxyVerification.test_https_proxy_assert_fingerprint_md5_non_matching _ self = no_san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=45833, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs26/ca.pem...erverConfig(scheme='https', host='localhost', port=46197, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs26/ca.pem')) def test_https_proxy_assert_fingerprint_md5_non_matching( self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = no_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"https://{server.host}:{server.port}" proxy_ctx = urllib3.util.ssl_.create_urllib3_context(verify_flags=0) proxy_fingerprint = self._get_proxy_fingerprint_md5(proxy.ca_certs) new_char = "b" if proxy_fingerprint[5] == "a" else "a" proxy_fingerprint = proxy_fingerprint[:5] + new_char + proxy_fingerprint[6:] with proxy_from_url( proxy_url, ca_certs=proxy.ca_certs, proxy_ssl_context=proxy_ctx, proxy_assert_fingerprint=proxy_fingerprint, ) as https: with pytest.raises(MaxRetryError) as e: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:835: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:872: in urlopen return self.urlopen( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:937: in _ssl_wrap_socket_and_match_hostname context.verify_mode = resolve_cert_reqs(cert_reqs) ^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:452: in verify_mode self._ctx.set_verify(_stdlib_to_openssl_verify[value], _verify_callback) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (3, ), kwargs = {} @wraps(f) def inner(self: Context, *args: Any, **kwargs: Any) -> Any: if self._used: > raise ValueError( "Context has already been used to create a Connection, it " "cannot be mutated again" ) E ValueError: Context has already been used to create a Connection, it cannot be mutated again /usr/lib/python3.14/site-packages/OpenSSL/SSL.py:869: ValueError ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:14 +0000] [1259] [INFO] Running on https://[::1]:46197 (CTRL + C to quit) [2026-08-30 18:45:14 +0000] [1259] [INFO] Running on https://127.0.0.1:46197 (CTRL + C to quit) [2026-08-30 18:45:14 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:14 +0000] [1259] [INFO] Running on https://[::1]:45833 (CTRL + C to quit) [2026-08-30 18:45:14 +0000] [1259] [INFO] Running on https://127.0.0.1:45833 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:46197 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46197 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:45833 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:45833 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError('Fingerprints did not match. Expected "8dbb7adbace75cf402eeffc7048ef0b2", got "8dbb7cdbace75cf402eeffc7048ef0b2"')': / ____ TestHTTPSProxyVerification.test_https_proxy_assert_hostname[localhost] ____ self = san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=46359, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs27/ca.pem...erverConfig(scheme='https', host='localhost', port=37309, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs27/ca.pem')) def test_https_proxy_assert_hostname( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy.host ) as https: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:848: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:16 +0000] [1259] [INFO] Running on https://[::1]:37309 (CTRL + C to quit) [2026-08-30 18:45:16 +0000] [1259] [INFO] Running on https://127.0.0.1:37309 (CTRL + C to quit) [2026-08-30 18:45:16 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:16 +0000] [1259] [INFO] Running on https://[::1]:46359 (CTRL + C to quit) [2026-08-30 18:45:16 +0000] [1259] [INFO] Running on https://127.0.0.1:46359 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:37309 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:37309 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:46359 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46359 (CTRL + C to quit) ____ TestHTTPSProxyVerification.test_https_proxy_assert_hostname[127.0.0.1] ____ self = san_proxy_with_server = (ServerConfig(scheme='https', host='127.0.0.1', port=46629, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs28/ca.pem...erverConfig(scheme='https', host='localhost', port=45483, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs28/ca.pem')) def test_https_proxy_assert_hostname( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy.host ) as https: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:848: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:18 +0000] [1259] [INFO] Running on https://[::1]:45483 (CTRL + C to quit) [2026-08-30 18:45:18 +0000] [1259] [INFO] Running on https://127.0.0.1:45483 (CTRL + C to quit) [2026-08-30 18:45:18 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:18 +0000] [1259] [INFO] Running on https://127.0.0.1:46629 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:45483 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:45483 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46629 (CTRL + C to quit) _______ TestHTTPSProxyVerification.test_https_proxy_assert_hostname[::1] _______ self = san_proxy_with_server = (ServerConfig(scheme='https', host='::1', port=41907, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs29/ca.pem'), ServerConfig(scheme='https', host='localhost', port=45249, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs29/ca.pem')) def test_https_proxy_assert_hostname( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy.host ) as https: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:848: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:20 +0000] [1259] [INFO] Running on https://[::1]:45249 (CTRL + C to quit) [2026-08-30 18:45:20 +0000] [1259] [INFO] Running on https://127.0.0.1:45249 (CTRL + C to quit) [2026-08-30 18:45:20 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:20 +0000] [1259] [INFO] Running on https://[::1]:41907 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:45249 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:45249 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:41907 (CTRL + C to quit) _ TestHTTPSProxyVerification.test_https_proxy_assert_hostname_non_matching[localhost] _ self = san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=45589, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs30/ca.pem...erverConfig(scheme='https', host='localhost', port=42093, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs30/ca.pem')) def test_https_proxy_assert_hostname_non_matching( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" proxy_hostname = "example.com" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy_hostname, ) as https: with pytest.raises(MaxRetryError) as e: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:22 +0000] [1259] [INFO] Running on https://[::1]:42093 (CTRL + C to quit) [2026-08-30 18:45:22 +0000] [1259] [INFO] Running on https://127.0.0.1:42093 (CTRL + C to quit) [2026-08-30 18:45:22 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:22 +0000] [1259] [INFO] Running on https://[::1]:45589 (CTRL + C to quit) [2026-08-30 18:45:22 +0000] [1259] [INFO] Running on https://127.0.0.1:45589 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:42093 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:42093 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:45589 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:45589 (CTRL + C to quit) _ TestHTTPSProxyVerification.test_https_proxy_assert_hostname_non_matching[127.0.0.1] _ self = san_proxy_with_server = (ServerConfig(scheme='https', host='127.0.0.1', port=33079, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs31/ca.pem...erverConfig(scheme='https', host='localhost', port=46117, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs31/ca.pem')) def test_https_proxy_assert_hostname_non_matching( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" proxy_hostname = "example.com" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy_hostname, ) as https: with pytest.raises(MaxRetryError) as e: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:24 +0000] [1259] [INFO] Running on https://[::1]:46117 (CTRL + C to quit) [2026-08-30 18:45:24 +0000] [1259] [INFO] Running on https://127.0.0.1:46117 (CTRL + C to quit) [2026-08-30 18:45:24 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:24 +0000] [1259] [INFO] Running on https://127.0.0.1:33079 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:46117 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46117 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:33079 (CTRL + C to quit) _ TestHTTPSProxyVerification.test_https_proxy_assert_hostname_non_matching[::1] _ self = san_proxy_with_server = (ServerConfig(scheme='https', host='::1', port=38705, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs32/ca.pem'), ServerConfig(scheme='https', host='localhost', port=44505, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs32/ca.pem')) def test_https_proxy_assert_hostname_non_matching( self, san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = san_proxy_with_server destination_url = f"https://{server.host}:{server.port}" proxy_hostname = "example.com" with proxy_from_url( proxy.base_url, ca_certs=proxy.ca_certs, proxy_assert_hostname=proxy_hostname, ) as https: with pytest.raises(MaxRetryError) as e: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:863: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:26 +0000] [1259] [INFO] Running on https://[::1]:44505 (CTRL + C to quit) [2026-08-30 18:45:26 +0000] [1259] [INFO] Running on https://127.0.0.1:44505 (CTRL + C to quit) [2026-08-30 18:45:26 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:26 +0000] [1259] [INFO] Running on https://[::1]:38705 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:44505 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:44505 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:38705 (CTRL + C to quit) ______ TestHTTPSProxyVerification.test_https_proxy_hostname_verification _______ self = no_localhost_san_server = ServerConfig(scheme='https', host='localhost', port=33307, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs33/ca.pem') def test_https_proxy_hostname_verification( self, no_localhost_san_server: ServerConfig ) -> None: bad_server = no_localhost_san_server bad_proxy_url = f"https://{bad_server.host}:{bad_server.port}" # An exception will be raised before we contact the destination domain. test_url = "testing.com" with proxy_from_url(bad_proxy_url, ca_certs=bad_server.ca_certs) as https: with pytest.raises(MaxRetryError) as e: > https.request("GET", "http://%s/" % test_url) test/with_dummyserver/test_proxy_poolmanager.py:879: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:455: in urlopen response = conn.urlopen(method, url, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:27 +0000] [1259] [INFO] Running on https://[::1]:33307 (CTRL + C to quit) [2026-08-30 18:45:27 +0000] [1259] [INFO] Running on https://127.0.0.1:33307 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:33307 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:33307 (CTRL + C to quit) _____________ TestHTTPSProxyVerification.test_https_proxy_ipv4_san _____________ self = ipv4_san_proxy_with_server = (ServerConfig(scheme='https', host='127.0.0.1', port=37609, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs34/ca.pem...erverConfig(scheme='https', host='localhost', port=33285, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs34/ca.pem')) def test_https_proxy_ipv4_san( self, ipv4_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = ipv4_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"https://{server.host}:{server.port}" with proxy_from_url(proxy_url, ca_certs=proxy.ca_certs) as https: > r = https.request("GET", destination_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:905: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:29 +0000] [1259] [INFO] Running on https://[::1]:33285 (CTRL + C to quit) [2026-08-30 18:45:29 +0000] [1259] [INFO] Running on https://127.0.0.1:33285 (CTRL + C to quit) [2026-08-30 18:45:29 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:29 +0000] [1259] [INFO] Running on https://127.0.0.1:37609 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:33285 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:33285 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:37609 (CTRL + C to quit) _____________ TestHTTPSProxyVerification.test_https_proxy_ipv6_san _____________ self = ipv6_san_proxy_with_server = (ServerConfig(scheme='https', host='::1', port=36611, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs35/ca.pem'), ServerConfig(scheme='https', host='localhost', port=39825, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs35/ca.pem')) def test_https_proxy_ipv6_san( self, ipv6_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = ipv6_san_proxy_with_server proxy_url = f"https://[{proxy.host}]:{proxy.port}" destination_url = f"https://{server.host}:{server.port}" with proxy_from_url(proxy_url, ca_certs=proxy.ca_certs) as https: > r = https.request("GET", destination_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_proxy_poolmanager.py:915: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:31 +0000] [1259] [INFO] Running on https://[::1]:39825 (CTRL + C to quit) [2026-08-30 18:45:31 +0000] [1259] [INFO] Running on https://127.0.0.1:39825 (CTRL + C to quit) [2026-08-30 18:45:31 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:31 +0000] [1259] [INFO] Running on https://[::1]:36611 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:39825 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:39825 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:36611 (CTRL + C to quit) ___________ TestHTTPSProxyVerification.test_https_proxy_no_san[http] ___________ self = no_san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=40121, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs36/ca.pem...erverConfig(scheme='https', host='localhost', port=38417, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs36/ca.pem')) target_scheme = 'http' @pytest.mark.parametrize("target_scheme", ["http", "https"]) def test_https_proxy_no_san( self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig], target_scheme: str, ) -> None: proxy, server = no_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"{target_scheme}://{server.host}:{server.port}" with proxy_from_url(proxy_url, ca_certs=proxy.ca_certs) as https: with pytest.raises(MaxRetryError) as e: https.request("GET", destination_url) assert isinstance(e.value.reason, ProxyError) ssl_error = e.value.reason.original_error assert isinstance(ssl_error, SSLError) > assert ( "no appropriate subjectAltName fields were found" in str(ssl_error) or "Hostname mismatch, certificate is not valid for 'localhost'" in str(ssl_error) or "Empty Subject Alternative Name extension" in str(ssl_error) ) E assert ('no appropriate subjectAltName fields were found' in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' or "Hostname mismatch, certificate is not valid for 'localhost'" in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' or 'Empty Subject Alternative Name extension' in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)') E + where '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) E + and '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) E + and '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) test/with_dummyserver/test_proxy_poolmanager.py:935: AssertionError ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:33 +0000] [1259] [INFO] Running on https://[::1]:38417 (CTRL + C to quit) [2026-08-30 18:45:33 +0000] [1259] [INFO] Running on https://127.0.0.1:38417 (CTRL + C to quit) [2026-08-30 18:45:33 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:33 +0000] [1259] [INFO] Running on https://[::1]:40121 (CTRL + C to quit) [2026-08-30 18:45:33 +0000] [1259] [INFO] Running on https://127.0.0.1:40121 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:38417 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:38417 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:40121 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:40121 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Unable to connect to proxy', SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")))': http://localhost:38417 WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Unable to connect to proxy', SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")))': http://localhost:38417 WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Unable to connect to proxy', SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")))': http://localhost:38417 __________ TestHTTPSProxyVerification.test_https_proxy_no_san[https] ___________ self = no_san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=45459, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs37/ca.pem...erverConfig(scheme='https', host='localhost', port=39925, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs37/ca.pem')) target_scheme = 'https' @pytest.mark.parametrize("target_scheme", ["http", "https"]) def test_https_proxy_no_san( self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig], target_scheme: str, ) -> None: proxy, server = no_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"{target_scheme}://{server.host}:{server.port}" with proxy_from_url(proxy_url, ca_certs=proxy.ca_certs) as https: with pytest.raises(MaxRetryError) as e: https.request("GET", destination_url) assert isinstance(e.value.reason, ProxyError) ssl_error = e.value.reason.original_error assert isinstance(ssl_error, SSLError) > assert ( "no appropriate subjectAltName fields were found" in str(ssl_error) or "Hostname mismatch, certificate is not valid for 'localhost'" in str(ssl_error) or "Empty Subject Alternative Name extension" in str(ssl_error) ) E assert ('no appropriate subjectAltName fields were found' in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' or "Hostname mismatch, certificate is not valid for 'localhost'" in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' or 'Empty Subject Alternative Name extension' in '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)') E + where '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) E + and '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) E + and '("bad handshake: Error([(\'SSL routines\', \'\', \'certificate verify failed\')])",)' = str(SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])"))) test/with_dummyserver/test_proxy_poolmanager.py:935: AssertionError ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://[::1]:39925 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://127.0.0.1:39925 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://[::1]:45459 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://127.0.0.1:45459 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:39925 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:39925 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:45459 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:45459 (CTRL + C to quit) ------------------------------ Captured log call ------------------------------- WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")': / WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")': / WARNING urllib3.connectionpool:connectionpool.py:869 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")': / _ TestHTTPSProxyVerification.test_https_proxy_no_san_hostname_checks_common_name _ self = no_san_proxy_with_server = (ServerConfig(scheme='https', host='localhost', port=34431, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs38/ca.pem...erverConfig(scheme='https', host='localhost', port=46117, ca_certs='/tmp/pytest-of-builduser/pytest-0/certs38/ca.pem')) def test_https_proxy_no_san_hostname_checks_common_name( self, no_san_proxy_with_server: tuple[ServerConfig, ServerConfig] ) -> None: proxy, server = no_san_proxy_with_server proxy_url = f"https://{proxy.host}:{proxy.port}" destination_url = f"https://{server.host}:{server.port}" proxy_ctx = urllib3.util.ssl_.create_urllib3_context(verify_flags=0) try: proxy_ctx.hostname_checks_common_name = True # PyPy doesn't like us setting 'hostname_checks_common_name' # but also has it enabled by default so we need to handle that. except AttributeError: pass if getattr(proxy_ctx, "hostname_checks_common_name", False) is not True: pytest.skip("Test requires 'SSLContext.hostname_checks_common_name=True'") with proxy_from_url( proxy_url, ca_certs=proxy.ca_certs, proxy_ssl_context=proxy_ctx ) as https: > https.request("GET", destination_url) test/with_dummyserver/test_proxy_poolmanager.py:962: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:649: in urlopen return super().urlopen(method, url, redirect=redirect, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/poolmanager.py:457: in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:768: in connect self.sock = sock = self._connect_tls_proxy(self.host, sock) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connection.py:868: in _connect_tls_proxy sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ---------------------------- Captured stderr setup ----------------------------- [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://[::1]:46117 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://127.0.0.1:46117 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [WARNING] ASGI Framework Lifespan error, continuing without Lifespan support [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://[::1]:34431 (CTRL + C to quit) [2026-08-30 18:45:34 +0000] [1259] [INFO] Running on https://127.0.0.1:34431 (CTRL + C to quit) ------------------------------ Captured log setup ------------------------------ INFO hypercorn.error:logging.py:106 Running on https://[::1]:46117 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:46117 (CTRL + C to quit) WARNING hypercorn.error:logging.py:102 ASGI Framework Lifespan error, continuing without Lifespan support INFO hypercorn.error:logging.py:106 Running on https://[::1]:34431 (CTRL + C to quit) INFO hypercorn.error:logging.py:106 Running on https://127.0.0.1:34431 (CTRL + C to quit) _________________ TestClientCerts.test_client_certs_two_files __________________ self = def test_client_certs_two_files(self) -> None: """ Having a client cert in a separate file to its associated key works properly. """ done_receiving = Event() client_certs = [] def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] sock = self._wrap_in_ssl(sock) client_certs.append(sock.getpeercert()) data = b"" while not data.endswith(b"\r\n\r\n"): data += sock.recv(8192) sock.sendall( b"HTTP/1.1 200 OK\r\n" b"Server: testsocket\r\n" b"Connection: close\r\n" b"Content-Length: 6\r\n" b"\r\n" b"Valid!" ) done_receiving.wait(5) sock.close() self._start_server(socket_handler) with HTTPSConnectionPool( self.host, self.port, cert_file=self.cert_path, key_file=self.key_path, cert_reqs="REQUIRED", ca_certs=self.ca_path, ) as pool: > pool.request("GET", "/", retries=0) test/with_dummyserver/test_socketlevel.py:256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ____________ TestClientCerts.test_missing_client_certs_raises_error ____________ self = def test_missing_client_certs_raises_error(self) -> None: """ Having client certs not be present causes an error. """ done_receiving = Event() def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] try: self._wrap_in_ssl(sock) except ssl.SSLError: pass done_receiving.wait(5) sock.close() self._start_server(socket_handler) with HTTPSConnectionPool( self.host, self.port, cert_reqs="REQUIRED", ca_certs=self.ca_path ) as pool: with pytest.raises(MaxRetryError): > pool.request("GET", "/", retries=0) test/with_dummyserver/test_socketlevel.py:326: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ____________ TestClientCerts.test_client_cert_with_string_password _____________ self = def test_client_cert_with_string_password(self) -> None: > self.run_client_cert_with_password_test("letmein") test/with_dummyserver/test_socketlevel.py:331: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/with_dummyserver/test_socketlevel.py:368: in run_client_cert_with_password_test ssl_context.load_cert_chain( test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9d62fab0>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _____________ TestClientCerts.test_client_cert_with_bytes_password _____________ self = def test_client_cert_with_bytes_password(self) -> None: > self.run_client_cert_with_password_test(b"letmein") test/with_dummyserver/test_socketlevel.py:334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test/with_dummyserver/test_socketlevel.py:368: in run_client_cert_with_password_test ssl_context.load_cert_chain( test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9c3857a0>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ___________ TestClientCerts.test_load_keyfile_with_invalid_password ____________ self = def test_load_keyfile_with_invalid_password(self) -> None: assert ssl_.SSLContext is not None context = ssl_.SSLContext(ssl_.PROTOCOL_SSLv23) with pytest.raises(ssl.SSLError): > context.load_cert_chain( certfile=self.cert_path, keyfile=self.password_key_path, password=b"letmei", ) test/with_dummyserver/test_socketlevel.py:388: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:490: in load_cert_chain self._ctx.set_passwd_cb(lambda *_: password) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (, . at 0x3f9c508460>) kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: Context.set_passwd_cb is deprecated. You should decrypt and load your private key yourself, with cryptography's key loading APIs, and then use Context.use_privatekey instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning ______________ TestSocketClosing.test_socket_shutdown_stops_recv _______________ self = def test_socket_shutdown_stops_recv(self) -> None: timed_out, starting_read = Event(), Event() def socket_handler(listener: socket.socket) -> None: sock = listener.accept()[0] ssl_sock = original_ssl_wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) # Consume request buf = b"" while not buf.endswith(b"\r\n\r\n"): buf = ssl_sock.recv(65535) # Send incomplete message (note Content-Length) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 10\r\n" b"\r\n" b"Hi-" ) timed_out.wait(5) ssl_sock.close() self._start_server(socket_handler) class TestClient(threading.Thread): def __init__(self, host: str, port: int) -> None: super().__init__() self.host, self.port = host, port self.response: BaseHTTPResponse | None = None def run(self) -> None: with HTTPSConnectionPool( self.host, self.port, ca_certs=DEFAULT_CA ) as pool: self.response = pool.urlopen( "GET", "/", preload_content=False, retries=0 ) with pytest.raises(ProtocolError, match="Connection broken"): starting_read.set() self.response.read() test_client = TestClient(self.host, self.port) test_client.start() # First, wait to make sure the client is really stuck reading starting_read.wait(5) time.sleep(LONG_TIMEOUT) # Calling shutdown here calls shutdown() on the underlying socket, # so that the remaining read will fail instead of blocking # indefinitely > assert test_client.response is not None E assert None is not None E + where None = .response test/with_dummyserver/test_socketlevel.py:1088: AssertionError _____________________ TestProxyManager.test_connect_reconn _____________________ self = def test_connect_reconn(self) -> None: def proxy_ssl_one(listener: socket.socket) -> None: sock = listener.accept()[0] buf = b"" while not buf.endswith(b"\r\n\r\n"): buf += sock.recv(65536) s = buf.decode("utf-8") if not s.startswith("CONNECT "): sock.send(b"HTTP/1.1 405 Method not allowed\r\nAllow: CONNECT\r\n\r\n") sock.close() return if not s.startswith(f"CONNECT {self.host}:443"): sock.send(b"HTTP/1.1 403 Forbidden\r\n\r\n") sock.close() return sock.send(b"HTTP/1.1 200 Connection Established\r\n\r\n") ssl_sock = original_ssl_wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) buf = b"" while not buf.endswith(b"\r\n\r\n"): buf += ssl_sock.recv(65536) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 2\r\n" b"Connection: close\r\n" b"\r\n" b"Hi" ) ssl_sock.close() def echo_socket_handler(listener: socket.socket) -> None: proxy_ssl_one(listener) proxy_ssl_one(listener) self._start_server(echo_socket_handler) base_url = f"http://{self.host}:{self.port}" with proxy_from_url(base_url, ca_certs=DEFAULT_CA) as proxy: url = f"https://{self.host}" conn = proxy.connection_from_url(url) > r = conn.urlopen("GET", url, retries=0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_socketlevel.py:1288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:774: in urlopen self._prepare_proxy(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1055: in _prepare_proxy conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _________________ TestSSL.test_ssl_failure_midway_through_conn _________________ self = def test_ssl_failure_midway_through_conn(self) -> None: def socket_handler(listener: socket.socket) -> None: with listener.accept()[0] as sock, sock.dup() as sock2: ssl_sock = original_ssl_wrap_socket( sock, server_side=True, keyfile=DEFAULT_CERTS["keyfile"], certfile=DEFAULT_CERTS["certfile"], ca_certs=DEFAULT_CA, ) buf = b"" while not buf.endswith(b"\r\n\r\n"): buf += ssl_sock.recv(65536) # Deliberately send from the non-SSL socket. sock2.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 2\r\n" b"\r\n" b"Hi" ) ssl_sock.close() self._start_server(socket_handler) with HTTPSConnectionPool(self.host, self.port, ca_certs=DEFAULT_CA) as pool: with pytest.raises( SSLError, match=r"(wrong version number|record overflow|record layer failure)", ): > pool.request("GET", "/", retries=False) test/with_dummyserver/test_socketlevel.py:1540: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:135: in request return self.request_encode_url( test-env/lib/python3.14/site-packages/urllib3/_request_methods.py:182: in request_encode_url return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning _________________________ TestSSL.test_retry_ssl_error _________________________ self = def test_retry_ssl_error(self) -> None: def socket_handler(listener: socket.socket) -> None: # first request, trigger an SSLError sock = listener.accept()[0] sock2 = sock.dup() ssl_sock = original_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) # Deliberately send from the non-SSL socket to trigger an SSLError sock2.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 4\r\n" b"\r\n" b"Fail" ) sock2.close() ssl_sock.close() # retried request sock = listener.accept()[0] ssl_sock = original_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) ssl_sock.send( b"HTTP/1.1 200 OK\r\n" b"Content-Type: text/plain\r\n" b"Content-Length: 7\r\n\r\n" b"Success" ) 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=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/with_dummyserver/test_socketlevel.py:1699: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:788: in urlopen response = self._make_request( test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:464: in _make_request self._validate_conn(conn) test-env/lib/python3.14/site-packages/urllib3/connectionpool.py:1106: in _validate_conn conn.connect() test-env/lib/python3.14/site-packages/urllib3/connection.py:796: in connect sock_and_verified = _ssl_wrap_socket_and_match_hostname( test-env/lib/python3.14/site-packages/urllib3/connection.py:998: in _ssl_wrap_socket_and_match_hostname cert: _TYPE_PEER_CERT_RET_DICT = ssl_sock.getpeercert() # type: ignore[assignment] ^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3/contrib/pyopenssl.py:397: in getpeercert "subject": ((("commonName", x509.get_subject().CN),),), # type: ignore[dict-item] ^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ args = (,), kwargs = {} @functools.wraps(arg) def wrapper(*args, **kwargs): > _wm.warn(msg, category=category, stacklevel=stacklevel + 1) E DeprecationWarning: X509.get_subject is deprecated. You should use cryptography's X.509 APIs instead. /usr/lib/python3.14/_py_warnings.py:799: DeprecationWarning =============================== warnings summary =============================== test/contrib/test_pyopenssl.py: 9 warnings test/with_dummyserver/test_socketlevel.py: 11 warnings /build/python-urllib3/src/urllib3-2.7.0/test/with_dummyserver/test_socketlevel.py:159: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = ssl.SSLContext(ssl_version) test/contrib/test_socks.py: 17 warnings /build/python-urllib3/src/urllib3-2.7.0/dummyserver/socketserver.py:125: 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-2.7.0/test/contrib/test_socks.py:745: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated context = better_ssl.SSLContext(ssl.PROTOCOL_SSLv23) # type: ignore[misc] test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs0] test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs1] test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs2] /build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:254: DeprecationWarning: ssl.TLSVersion.TLSv1 is deprecated context.minimum_version = ssl_minimum_version test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs0] test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs1] test/test_ssl.py::TestSSL::test_create_urllib3_context_ssl_version_and_ssl_min_max_version_no_error[kwargs2] /build/python-urllib3/src/urllib3-2.7.0/test-env/lib/python3.14/site-packages/urllib3/util/ssl_.py:259: DeprecationWarning: ssl.TLSVersion.TLSv1 is deprecated context.maximum_version = ssl_maximum_version test/with_dummyserver/test_connectionpool.py::TestConnectionPool::test_source_address /build/python-urllib3/src/urllib3-2.7.0/test/with_dummyserver/test_connectionpool.py:833: NoIPv6Warning: No IPv6 support: skipping. warnings.warn("No IPv6 support: skipping.", NoIPv6Warning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED test/contrib/test_pyopenssl.py::TestHTTPS_IPV4SAN::test_can_validate_ip_san FAILED test/contrib/test_pyopenssl.py::TestHTTPS_IPV6SAN::test_can_validate_ipv6_san[h11-::1] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_IPV6SAN::test_can_validate_ipv6_san[h11-[::1]] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_IPV6SAN::test_can_validate_ipv6_san[h2-::1] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_IPV6SAN::test_can_validate_ipv6_san[h2-[::1]] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_simple[h11] - ... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_simple[h2] - D... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_dotted_fqdn - ... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_client_intermediate FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_client_no_intermediate FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_client_key_password FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_verified - Dep... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_verified_with_context FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_context_combines_with_ca_certs FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ca_dir_verified FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_invalid_common_name FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_assert_specific_hostname FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_server_hostname FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_correct_system_time FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_wrong_system_time FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_set_ssl_version_to_tls_version FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_tls_protocol_name_of_socket FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_version_is_deprecated FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_version_with_protocol_tls_or_client_not_deprecated[None] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_version_with_protocol_tls_or_client_not_deprecated[2] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_ssl_version_with_protocol_tls_or_client_not_deprecated[16] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_no_tls_version_deprecation_with_ssl_context FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_tls_version_maximum_and_minimum FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_sslkeylogfile_empty[None] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_sslkeylogfile_empty[] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_alpn_default[h11] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_alpn_default[h2] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_http2_probe_result_is_cached[h11] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_2::test_http2_probe_result_is_cached[h2] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_simple[h11] - ... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_simple[h2] - D... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_dotted_fqdn - ... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_client_intermediate FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_client_no_intermediate FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_client_key_password FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_verified - Dep... FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_verified_with_context FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_context_combines_with_ca_certs FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ca_dir_verified FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_invalid_common_name FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_assert_specific_hostname FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_server_hostname FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ssl_correct_system_time FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ssl_wrong_system_time FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_set_ssl_version_to_tls_version FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_tls_protocol_name_of_socket FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ssl_version_with_protocol_tls_or_client_not_deprecated[None] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ssl_version_with_protocol_tls_or_client_not_deprecated[2] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_ssl_version_with_protocol_tls_or_client_not_deprecated[16] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_no_tls_version_deprecation_with_ssl_context FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_tls_version_maximum_and_minimum FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_sslkeylogfile_empty[None] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_sslkeylogfile_empty[] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_alpn_default[h11] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_alpn_default[h2] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_http2_probe_result_is_cached[h11] FAILED test/contrib/test_pyopenssl.py::TestHTTPS_TLSv1_3::test_http2_probe_result_is_cached[h2] FAILED test/contrib/test_pyopenssl.py::TestClientCerts::test_client_certs_two_files FAILED test/contrib/test_pyopenssl.py::TestClientCerts::test_missing_client_certs_raises_error FAILED test/contrib/test_pyopenssl.py::TestClientCerts::test_client_cert_with_string_password FAILED test/contrib/test_pyopenssl.py::TestClientCerts::test_client_cert_with_bytes_password FAILED test/contrib/test_pyopenssl.py::TestClientCerts::test_load_keyfile_with_invalid_password FAILED test/contrib/test_pyopenssl.py::TestSocketClosing::test_socket_shutdown_stops_recv FAILED test/contrib/test_pyopenssl.py::TestSocketSSL::test_ssl_read_timeout FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_https_proxy_pyopenssl_not_supported FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_https_proxy_forwarding_for_https FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_oldapi FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_proxy_https_fqdn FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_proxy_verified FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_cross_protocol_redirect FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_headers FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_https_headers FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_https_headers_forwarding_for_https FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_forwarding_proxy_request_timeout[https-http-False] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_forwarding_proxy_request_timeout[https-https-True] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_tunneling_proxy_request_timeout[https-https] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPProxyManager::test_scheme_host_case_insensitive FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestIPv6HTTPProxyManager::test_basic_ipv6_proxy FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_fingerprint_md5 FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_fingerprint_md5_non_matching FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname[localhost] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname[127.0.0.1] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname[::1] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname_non_matching[localhost] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname_non_matching[127.0.0.1] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_assert_hostname_non_matching[::1] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_hostname_verification FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_ipv4_san FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_ipv6_san FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_no_san[http] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_no_san[https] FAILED test/with_dummyserver/test_proxy_poolmanager.py::TestHTTPSProxyVerification::test_https_proxy_no_san_hostname_checks_common_name FAILED test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_certs_two_files FAILED test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_missing_client_certs_raises_error FAILED test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_string_password FAILED test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_bytes_password FAILED test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password FAILED test/with_dummyserver/test_socketlevel.py::TestSocketClosing::test_socket_shutdown_stops_recv FAILED test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_connect_reconn FAILED test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_failure_midway_through_conn FAILED test/with_dummyserver/test_socketlevel.py::TestSSL::test_retry_ssl_error ERROR test/contrib/test_pyopenssl.py::TestClientCerts::test_client_certs_one_file ERROR test/contrib/test_pyopenssl.py::TestClientCerts::test_client_cert_with_string_password ERROR test/contrib/test_pyopenssl.py::TestClientCerts::test_client_cert_with_bytes_password ERROR test/contrib/test_pyopenssl.py::TestClientCerts::test_load_keyfile_with_invalid_password ERROR test/contrib/test_pyopenssl.py::TestClientCerts::test_load_invalid_cert_file ERROR test/contrib/test_pyopenssl.py::TestSocketSSL::test_ssl_failure_midway_through_conn ERROR test/contrib/test_pyopenssl.py::TestSocketSSL::test_retry_ssl_error - p... ERROR test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_certs_one_file ERROR test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_string_password ERROR test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_client_cert_with_bytes_password ERROR test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_keyfile_with_invalid_password ERROR test/with_dummyserver/test_socketlevel.py::TestClientCerts::test_load_invalid_cert_file ERROR test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_simple ERROR test/with_dummyserver/test_socketlevel.py::TestProxyManager::test_connect_ipv6_addr_from_host ERROR test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout ERROR test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_load_default_certs_when_empty = 106 failed, 1850 passed, 304 skipped, 2 deselected, 4 xfailed, 45 warnings, 16 errors in 416.52s (0:06:56) = ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix-0/build receiving incremental file list python-urllib3-2.7.0-1-riscv64-build.log python-urllib3-2.7.0-1-riscv64-check.log sent 62 bytes received 29,161 bytes 11,689.20 bytes/sec total size is 395,996 speedup is 13.55