==>(B Building on shinx(B ==>(B Checking for remote environment...(B ==>(B Syncing package to remote host...(B sending incremental file list ./ .SRCINFO 700B 48% 0B/s 0:00:00 1,435B 100% 735KB/s 0:00:00 (xfr#1, to-chk=9/11) .nvchecker.toml 64B 100% 64.0KB/s 0:00:00 64B 100% 64.0KB/s 0:00:00 (xfr#2, to-chk=8/11) LICENSE 646B 100% 646KB/s 0:00:00 646B 100% 646KB/s 0:00:00 (xfr#3, to-chk=7/11) PKGBUILD 700B 34% 700KB/s 0:00:00 2,027B 100% 2.03MB/s 0:00:00 (xfr#4, to-chk=6/11) REUSE.toml 588B 100% 588KB/s 0:00:00 588B 100% 588KB/s 0:00:00 (xfr#5, to-chk=5/11) python-socks-v3.patch 700B 8% 700KB/s 0:00:00 8,068B 100% 8.07MB/s 0:00:00 (xfr#6, to-chk=4/11) python-urllib3-future-2.25.906-1.log 700B 73% 700KB/s 0:00:00 954B 100% 954KB/s 0:00:00 (xfr#7, to-chk=3/11) LICENSES/ LICENSES/MIT.txt 700B 64% 700KB/s 0:00:00 1,078B 100% 1.08MB/s 0:00:00 (xfr#8, to-chk=0/11) sent 1,348 bytes received 338 bytes 3,372.00 bytes/sec total size is 14,120 speedup is 8.37 ==>(B Applying RISC-V patches...(B sending incremental file list ./ sent 137 bytes received 19 bytes 312.00 bytes/sec total size is 5,345 speedup is 34.26 patching file PKGBUILD ==>(B Running pkgctl build --arch riscv64 on remote host...(B ==> WARNING:(B invalid architecture: riscv64(B ==>(B Updating pacman database cache(B [?25l:: Synchronizing package databases... core downloading... extra downloading... multilib downloading... [?25h==>(B Building python-urllib3-future(B  ->(B repo: extra(B  ->(B arch: riscv64(B  ->(B worker: felix-7(B ==>(B Building python-urllib3-future for [extra] (riscv64)(B ]3008;start=bcdb9634fd3742a6ba41513b48528f48;user=felix;hostname=shinx.felixc.at;machineid=49ee0d8bc12d4691a2e31342e4159c5a;bootid=e363a897003743c483d7ae10c0110348;pid=209787;pidfdid=8566872;comm=sudo;targetuser=root;type=session\Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file. ]3008;start=161d9c73c6c44b7d9f28ec15f3ad1eda;user=root;hostname=shinx.felixc.at;machineid=49ee0d8bc12d4691a2e31342e4159c5a;bootid=e363a897003743c483d7ae10c0110348;pid=209835;pidfdid=8560311;comm=systemd-nspawn;container=arch-nspawn-209835;type=container\]11;?\]2;🔵 Container arch-nspawn-209835 on shinx.felixc.at\[?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h[!p]104\[?7h]3008;end=161d9c73c6c44b7d9f28ec15f3ad1eda\==>(B Building in chroot for [extra] (riscv64)...(B ==>(B Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix-7]...(Bdone(B ]3008;start=faf1debb70d94ab6987f149b6b8b0f89;user=root;hostname=shinx.felixc.at;machineid=49ee0d8bc12d4691a2e31342e4159c5a;bootid=e363a897003743c483d7ae10c0110348;pid=210310;pidfdid=8588305;comm=sudo;targetuser=felix;type=session\==>(B Making package: python-urllib3-future 2.25.906-1 (Thu Nov 12 17:18:17 2026)(B ==>(B Retrieving sources...(B  ->(B Updating urllib3.future git repo...(B  ->(B Found python-socks-v3.patch(B  ->(B Found async-large-response-reuse.patch(B  ->(B Found content-framing.patch(B ==>(B Validating source files with sha256sums...(B urllib3.future ... Passed python-socks-v3.patch ... Passed async-large-response-reuse.patch ... Passed content-framing.patch ... Passed ]3008;end=faf1debb70d94ab6987f149b6b8b0f89\Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file. ]3008;start=e25c9e9e256a409fb893dda16130d947;user=root;hostname=shinx.felixc.at;machineid=49ee0d8bc12d4691a2e31342e4159c5a;bootid=e363a897003743c483d7ae10c0110348;pid=211311;pidfdid=8640469;comm=systemd-nspawn;container=makechrootpkg-python-urllib3-future.build.209808;type=container\]11;?\]2;🔵 Container makechrootpkg-python-urllib3-future.build.209808 on shinx.felixc.at\]3008;start=bc5e4a573b7042a8a78a427bbf17993d;user=root;hostname=makechrootpkg-python-urllib3-future.build.209808;machineid=7076b1ea8ed247e4b63231e19834099c;bootid=8b973c4afdd94bb2b1f6000d9dffdec6;pid=34;pidfdid=8601176;comm=sudo;targetuser=builduser;type=session\==>(B Making package: python-urllib3-future 2.25.906-1 (Thu Nov 12 16:18:33 2026)(B ==>(B Checking runtime dependencies...(B ==>(B Installing missing dependencies...(B ]3008;start=10ca2e257cbf431c8efb981229b8ec1c;user=builduser;hostname=makechrootpkg-python-urllib3-future.build.209808;machineid=7076b1ea8ed247e4b63231e19834099c;bootid=8b973c4afdd94bb2b1f6000d9dffdec6;pid=2023;pidfdid=8601457;comm=sudo;targetuser=root;type=session\[?25lresolving dependencies... looking for conflicting packages... Package (3) New Version Net Change extra/python-h11 0.16.0-2 0.29 MiB extra/python-jh2 5.0.15-1 1.96 MiB extra/python-qh3 2.1.0-1 5.57 MiB Total Installed Size: 7.82 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-h11... installing python-jh2... installing python-qh3... :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [?25h]3008;end=10ca2e257cbf431c8efb981229b8ec1c\==>(B Checking buildtime dependencies...(B ==>(B Installing missing dependencies...(B ]3008;start=eaa3edcf559f464c916bf1cc21eb7865;user=builduser;hostname=makechrootpkg-python-urllib3-future.build.209808;machineid=7076b1ea8ed247e4b63231e19834099c;bootid=8b973c4afdd94bb2b1f6000d9dffdec6;pid=2142;pidfdid=8640549;comm=sudo;targetuser=root;type=session\[?25lresolving dependencies... looking for conflicting packages... Package (36) New Version Net Change Download Size extra/perl-error 0.17031-1 0.04 MiB extra/perl-mailtools 2.22-3 0.10 MiB extra/perl-timedate 2.35-1 0.15 MiB extra/python-caio 0.12.10-1 0.35 MiB extra/python-cffi 2.1.1-1 1.41 MiB extra/python-editables 0.6-1 0.04 MiB extra/python-iniconfig 2.3.0-1 0.07 MiB extra/python-packaging 26.3-1 1.58 MiB extra/python-pathspec 1.1.1-1 0.47 MiB extra/python-pluggy 1.7.0-1 0.28 MiB extra/python-pycparser 3.12-1 0.90 MiB 0.14 MiB extra/python-pygments 2.21.0-1 15.59 MiB extra/python-pyopenssl 26.4.0-1 0.72 MiB extra/python-pyproject-hooks 1.3.3-1 0.11 MiB extra/python-tomlkit 0.15.2-1 0.85 MiB extra/python-trove-classifiers 2026.9.21.13-1 0.16 MiB extra/zlib-ng 2.3.3-1 0.23 MiB extra/git 2.56.0-1 32.07 MiB extra/python-aiofile 3.12.3-1 0.18 MiB core/python-brotli 1.2.1-1 0.88 MiB extra/python-build 1.6.1-1 0.33 MiB extra/python-coverage 7.17.2-1 2.31 MiB extra/python-cryptography 50.0.2-2 6.12 MiB extra/python-hatchling 1.32.4-1 1.11 MiB extra/python-idna 3.20-1 0.68 MiB extra/python-installer 1.1.0-1 0.21 MiB extra/python-pytest 1:9.2.0-1 5.21 MiB extra/python-pytest-asyncio 1.4.1-1 0.17 MiB extra/python-pytest-rerunfailures 16.7-1 0.24 MiB extra/python-pytest-timeout 2.5.0-1 0.09 MiB extra/python-python-socks 3.1.1-1 0.47 MiB extra/python-tornado 6.6.1-1 7.32 MiB extra/python-trustme 1.3.0-1 0.10 MiB extra/python-websockets 17.2-1 2.50 MiB extra/python-wsproto 1.3.2-1 0.28 MiB extra/python-zstandard 0.25.0-3 1.45 MiB Total Download Size: 0.14 MiB Total Installed Size: 84.75 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-pycparser-3.12-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing perl-error... installing perl-timedate... installing perl-mailtools... installing zlib-ng... installing git... Optional dependencies for git git-zsh-completion: upstream zsh completion tk: gitk and git gui openssh: ssh transport and crypto man: show help with `git command --help` perl-libwww: git svn perl-term-readkey: git svn and interactive.singlekey setting perl-io-socket-ssl: git send-email TLS support perl-authen-sasl: git send-email TLS support perl-cgi: gitweb (web interface) support python: git svn & git p4 [installed] subversion: git svn org.freedesktop.secrets: keyring credential helper libsecret: libsecret credential helper [installed] less: the default pager for git 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-tomlkit... installing python-trove-classifiers... installing python-hatchling... installing python-installer... installing python-caio... installing python-aiofile... installing python-brotli... installing python-coverage... installing python-pycparser... installing python-cffi... Optional dependencies for python-cffi python-setuptools: "limited api" version checking in cffi.setuptools_ext installing python-cryptography... installing python-idna... installing python-iniconfig... installing python-pygments... installing python-pytest... installing python-pytest-asyncio... installing python-pytest-rerunfailures... Optional dependencies for python-pytest-rerunfailures python-pytest-xdist: for recovering from crashes installing python-pytest-timeout... installing python-python-socks... Optional dependencies for python-python-socks python-anyio: anyio support python-curio: curio support python-trio: trio support installing python-tornado... Optional dependencies for python-tornado python-pycurl: for tornado.curl_httpclient python-twisted: for tornado.platform.twisted installing python-pyopenssl... installing python-trustme... installing python-websockets... Optional dependencies for python-websockets python-trio: trio backend support python-werkzeug: routing support installing python-wsproto... installing python-zstandard... Optional dependencies for python-zstandard python-cffi [installed] :: Running post-transaction hooks... (1/4) Creating system user accounts... Creating group 'git' with GID 969. Creating user 'git' (git daemon user) with UID 969 and GID 969. (2/4) Reloading system manager configuration... Skipped: Current root is not booted. (3/4) Arming ConditionNeedsUpdate... (4/4) Checking for old perl modules... WARNING: '/usr/lib/perl5/5.42' contains data from at least 1 packages which will NOT be used by the installed perl interpreter. -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/5.42' [?25h]3008;end=eaa3edcf559f464c916bf1cc21eb7865\==>(B Retrieving sources...(B  ->(B Found python-socks-v3.patch(B  ->(B Found async-large-response-reuse.patch(B  ->(B Found content-framing.patch(B ==> WARNING:(B Skipping all source file integrity checks.(B ==>(B Extracting sources...(B  ->(B Creating working copy of urllib3.future git repo...(B Cloning into 'urllib3.future'... done. Switched to a new branch 'makepkg' ==>(B Starting prepare()...(B patching file pyproject.toml patching file src/urllib3/contrib/_socks_override.py patching file src/urllib3/contrib/socks.py patching file test/with_dummyserver/asynchronous/test_socketlevel.py patching file test/with_dummyserver/test_socketlevel.py ==>(B Starting build()...(B * Getting build dependencies for wheel... * Building wheel... Successfully built urllib3_future-2.25.906-py3-none-any.whl ==>(B Starting check()...(B ============================= test session starts ============================== platform linux -- Python 3.14.10, pytest-9.2.0, pluggy-1.7.0 rootdir: /build/python-urllib3-future/src/urllib3.future configfile: pyproject.toml plugins: asyncio-1.4.1, rerunfailures-16.7, timeout-2.4.0 asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collected 7350 items ci/test_isolation.py ....... [ 0%] test/asynchronous/test_connection.py ... [ 0%] test/asynchronous/test_connectionpool.py ............................... [ 0%] ........................................................................ [ 1%] ........................................................................ [ 2%] ........................................................... [ 3%] test/asynchronous/test_informational.py .. [ 3%] test/asynchronous/test_poolmanager.py .................................. [ 3%] ........................................................................ [ 4%] ............ssss.. [ 5%] test/asynchronous/test_response.py ..................................... [ 5%] ......................................sss............................... [ 6%] ........................ [ 6%] test/asynchronous/test_retry.py .. [ 6%] test/asynchronous/test_ssl.py .... [ 6%] test/asynchronous/test_traffic_police.py ............................... [ 7%] ....................................................... [ 8%] test/asynchronous/test_util.py .... [ 8%] test/contrib/asynchronous/test_resolver.py ............................. [ 8%] ........................................................................ [ 9%] ........................................................................ [ 10%] ........................................................................ [ 11%] ........................................................................ [ 12%] ........................................................................ [ 13%] ........................................................................ [ 14%] ....................... [ 14%] test/contrib/asynchronous/test_socks.py ................................ [ 15%] .................................................. [ 15%] test/contrib/asynchronous/test_ssa.py .................................. [ 16%] ................................... [ 16%] test/contrib/asynchronous/test_websocket_fragmentation.py .... [ 16%] test/contrib/hface/test_stream_matrix.py ...... [ 16%] test/contrib/test_resolver.py .......................................... [ 17%] ........................................................................ [ 18%] ........................................................................ [ 19%] ........................................................................ [ 20%] ........................................................................ [ 21%] ........................................................................ [ 22%] ........................................................................ [ 23%] .............................. [ 23%] test/contrib/test_socks.py ............................................. [ 24%] ........................................... [ 24%] test/contrib/test_ssa.py ......... [ 25%] test/contrib/test_sse.py .......... [ 25%] test/contrib/test_websocket_fragmentation.py .... [ 25%] test/test_collections.py ............................................ [ 25%] test/test_compatibility.py . [ 25%] test/test_connection.py .......................................... [ 26%] test/test_connectionpool.py ............................................ [ 27%] ........................................................................ [ 28%] ........................................................................ [ 29%] ........................................................................ [ 30%] ............................................... [ 30%] test/test_exceptions.py ................. [ 30%] test/test_fields.py ..................... [ 31%] test/test_filepost.py ......... [ 31%] test/test_grouped_dict.py ........................................... [ 31%] test/test_informational.py .. [ 31%] test/test_no_ssl.py .. [ 31%] test/test_no_zlib.py ... [ 31%] test/test_poolmanager.py ............................................... [ 32%] ...................................................ssss.. [ 33%] test/test_proxymanager.py .............................................. [ 34%] ............... [ 34%] test/test_response.py .................................................. [ 34%] .....................................................sss................ [ 35%] .......................... [ 36%] test/test_retry.py ..................................................... [ 36%] .............. [ 37%] test/test_ssl.py .................ss.................................... [ 37%] ...ss...ss... [ 38%] test/test_ssltransport.py ............... [ 38%] test/test_traffic_police.py ............................................ [ 38%] .................................... [ 39%] test/test_util.py ...................................................... [ 40%] ........................................................................ [ 41%] ........................................................................ [ 42%] ........................................................................ [ 43%] ........................................................................ [ 44%] ........................................................................ [ 44%] ........................................................................ [ 45%] ........................................................................ [ 46%] ........................................................................ [ 47%] ........................................................................ [ 48%] ........................................................................ [ 49%] ........................................................................ [ 50%] ........................................................................ [ 51%] ........................................................................ [ 52%] ........................................................................ [ 53%] ........................................................................ [ 54%] ............................................................sss...sss... [ 55%] ........................................................................ [ 56%] ........................... [ 57%] test/test_wait.py ............. [ 57%] test/with_dummyserver/asynchronous/test_chunked_transfer.py ............ [ 57%] . [ 57%] test/with_dummyserver/asynchronous/test_connection.py .. [ 57%] test/with_dummyserver/asynchronous/test_connectionpool.py .............. [ 57%] ........................................................................ [ 58%] ........................................................................ [ 59%] ........................................................................ [ 60%] ............................ [ 61%] test/with_dummyserver/asynchronous/test_happy_eyeballs.py .............. [ 61%] . [ 61%] test/with_dummyserver/asynchronous/test_https.py ssssssssssssssss.ssssss [ 61%] sss.sss.ssss..ssssssssssssssssssssssssssssssssssssssssssssssssssssssssss [ 62%] sssssssssssssssssssssssssssssssssssssssssssssssss....................... [ 63%] .........................................................s.............. [ 64%] ............................ [ 64%] test/with_dummyserver/asynchronous/test_poolmanager.py ................. [ 65%] .......................................................... [ 65%] test/with_dummyserver/asynchronous/test_protolevel.py .................. [ 66%] ................................................ [ 66%] test/with_dummyserver/asynchronous/test_proxy_poolmanager.py ........... [ 66%] ......................................................... [ 67%] test/with_dummyserver/asynchronous/test_socketlevel.py ................. [ 67%] ........................................................................ [ 68%] ........................................................................ [ 69%] ........... [ 70%] test/with_dummyserver/asynchronous/test_websocket_full_duplex.py ....... [ 70%] ........................................................................ [ 71%] ........................................................................ [ 72%] ...............ss.s.s... [ 72%] test/with_dummyserver/test_chunked_transfer.py ................ [ 72%] test/with_dummyserver/test_connection.py .......... [ 72%] test/with_dummyserver/test_connectionpool.py ........................... [ 73%] ........................................................................ [ 74%] ........................................................................ [ 75%] ........................................................................ [ 76%] ........ [ 76%] test/with_dummyserver/test_happy_eyeballs.py ................... [ 76%] test/with_dummyserver/test_https.py s..ssssssssssssssssss.sssssssss.ssss [ 76%] .ssss..sssssssssss.sssssssssssssssssssssssssssssssssssssssssssssssssssss [ 77%] sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss......... [ 78%] ........................................................................ [ 79%] ..............s................s............................ [ 80%] test/with_dummyserver/test_no_ssl.py .. [ 80%] test/with_dummyserver/test_poolmanager.py .............................. [ 81%] .......................................... [ 81%] test/with_dummyserver/test_protolevel.py ............................... [ 82%] ............................................. [ 82%] test/with_dummyserver/test_proxy_poolmanager.py ........................ [ 83%] ............................................... [ 83%] test/with_dummyserver/test_socketlevel.py .............................. [ 84%] ........................................................................ [ 85%] ...........................................s............................ [ 86%] ..............................................................s.s.s..... [ 87%] ............F........................................................... [ 88%] .. [ 88%] test/with_dummyserver/test_websocket_full_duplex.py .................... [ 88%] ........................................................................ [ 89%] ....................................................................ss.. [ 90%] ....... [ 90%] test/with_traefik/asynchronous/test_conn_info.py sss [ 90%] test/with_traefik/asynchronous/test_connection.py ssssssssssssssssssssss [ 90%] s [ 90%] test/with_traefik/asynchronous/test_connection_multiplexed.py ssss [ 90%] test/with_traefik/asynchronous/test_connectionpool_multiplexed.py ssssss [ 90%] ssssssssssssssssssssssssssssssss [ 91%] test/with_traefik/asynchronous/test_poolmanager_multiplexed.py sssssssss [ 91%] sssssssssssssssssssssssssssssssssssssssssssss [ 92%] test/with_traefik/asynchronous/test_protolevel.py ssssssssssssssssssssss [ 92%] sssssssssssssssssssssssssssssssssssssssssssssss [ 92%] test/with_traefik/asynchronous/test_proxy.py sssssss [ 93%] test/with_traefik/asynchronous/test_send_data.py sssssssssssssssssssssss [ 93%] ssssssssssssssssssssssssssssssss [ 93%] test/with_traefik/asynchronous/test_stream.py ssssssssssssssssssssssssss [ 94%] [ 94%] test/with_traefik/asynchronous/test_svn.py sssssssssssssssssss [ 94%] test/with_traefik/asynchronous/test_webextensions.py sssssssssssssssssss [ 94%] sssssssssssss [ 94%] test/with_traefik/test_conn_info.py ssss [ 94%] test/with_traefik/test_connection.py sssssssssssssssssssssss [ 95%] test/with_traefik/test_connection_multiplexed.py ssss [ 95%] test/with_traefik/test_connectionpool_multiplexed.py sssssssssssssssssss [ 95%] sssssssssssss [ 95%] test/with_traefik/test_poolmanager_multiplexed.py ssssssssssssssssssssss [ 96%] sssssssssssssssssssssssssssssss [ 96%] test/with_traefik/test_protolevel.py sssssssssssssssssssssssssssssssssss [ 96%] sssssssssssssssssssssssssssssssssss [ 97%] test/with_traefik/test_proxy.py sssssss [ 97%] test/with_traefik/test_send_data.py ssssssssssssssssssssssssssssssssssss [ 97%] ssssssssssssssss [ 98%] test/with_traefik/test_stream.py ssssssssssssssssssssssssssssss [ 98%] test/with_traefik/test_svn.py ssssssssssssssssss [ 98%] test/with_traefik/test_thread_safety.py ssssssssssssssssssssssssssssssss [ 99%] ssssssssssssssssssssssssss [ 99%] test/with_traefik/test_webextensions.py sssssssssssssssssssssssssss [100%] =================================== FAILURES =================================== _________ TestContentFraming.test_partial_overrule_bytes_content_type __________ self = , method = 'POST' url = '/', body = '{}' headers = <[TypeError('sequence item 0: expected str instance, bytes found') raised in repr()] HTTPHeaderDict object at 0x7f32c16b8500> retries = Retry(total=False, connect=None, read=None, redirect=0, status=None) redirect = True, assert_same_host = True, timeout = <_TYPE_DEFAULT.token: -1> pool_timeout = None, release_conn = True, chunked = False, body_pos = None preload_content = True, decode_content = True, on_post_connection = None on_upload_body = None, on_early_response = None, extension = None multiplexed = False, response_kw = {} def urlopen( self, method: str, url: str, body: _TYPE_BODY | None = None, headers: typing.Mapping[str, str] | None = None, retries: Retry | bool | int | None = None, redirect: bool = True, assert_same_host: bool = True, timeout: _TYPE_TIMEOUT = _DEFAULT_TIMEOUT, pool_timeout: int | None = None, release_conn: bool | None = None, chunked: bool = False, body_pos: _TYPE_BODY_POSITION | None = None, preload_content: bool = True, decode_content: bool = True, on_post_connection: typing.Callable[[ConnectionInfo], None] | None = None, on_upload_body: typing.Callable[[int, int | None, bool, bool], None] | None = None, on_early_response: typing.Callable[[HTTPResponse], None] | None = None, extension: ExtensionFromHTTP | None = None, multiplexed: bool = False, **response_kw: typing.Any, ) -> HTTPResponse | ResponsePromise: """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method such as :meth:`request`. .. note:: For streaming, use ``preload_content=False`` and consume or close the returned response. Returning connection ownership alone does not discard an unread body. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param url: The URL to perform the request on. :param body: Data to send in the request body, either :class:`str`, :class:`bytes`, an iterable of :class:`str`/:class:`bytes`, or a file-like object. :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to use the pool's default retry configuration. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. An integer sets the total retry budget; allowed methods and other retry rules still apply. Pass zero to disable further attempts. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When ``False``, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: Maximum seconds to wait for connection acquisition. The default, None, has no acquisition deadline. This is separate from connect and read timeouts and can apply with either value of block. Raises EmptyPoolError if no connection becomes available in time. :param bool preload_content: If True, the response's body will be preloaded into memory. :param bool decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param release_conn: Whether to return acquired connection ownership after receiving response headers. If None, defaults to preload_content. Reading the whole body normally releases ownership automatically. Consume, drain, or close an unused response; release_conn() alone does not consume or abort its unread body. :param bool chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param on_post_connection: Callable to be invoked that will inform you of the connection specifications for the request to be sent. See ``urllib3.ConnectionInfo`` class for more. :param on_upload_body: Callable that will be invoked upon body upload in order to be able to track the progress. The values are expressed in bytes. It is possible that the total isn't available, thus set to None. In order, arguments are: (total_sent, total_to_be_sent, completed, any_error) :param on_early_response: Callable that will be invoked upon early responses, can be invoked one or several times. All informational responses except HTTP/101 (Switching Protocol) are concerned here. The callback takes only one positional argument, the fully constructed HTTPResponse. Those responses never have bodies, only headers. :param multiplexed: Defer response retrieval on HTTP/2 or HTTP/3 and return a ResponsePromise for get_response(). Sending the request can still perform blocking I/O. HTTP/1.1 returns an immediate response. """ # Retrying must not decode IPv6 zone identifiers a second time. original_url = url parsed_url = parse_url(url) destination_scheme = parsed_url.scheme if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = True # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = to_str(_encode_target(url)) else: url = to_str(parsed_url._replace(fragment=None).url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] release_this_conn = release_conn http_tunnel_required = connection_requires_http_tunnel( self.proxy, self.proxy_config, destination_scheme ) # Merge the proxy headers. Only done when not using HTTP CONNECT. We # have to copy the headers dict so we can safely change it without those # changes being reflected in anyone else's copy. if not http_tunnel_required: # Mapping implementations need not provide dict.copy(). headers = headers.copy() if hasattr(headers, "copy") else dict(headers) headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) try: conn = self._get_conn(timeout=pool_timeout, heb_timeout=timeout_obj) except TypeError: # Defensive: 3rd party conn hacks conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout # type: ignore[assignment] # Is this a closed/new connection that requires CONNECT tunnelling? if self.proxy is not None and http_tunnel_required and conn.is_closed: try: self._prepare_proxy(conn) except (BaseSSLError, OSError, SocketTimeout) as e: self._raise_timeout( err=e, url=self.proxy.url, timeout_value=conn.timeout ) raise # If we're going to release the connection in ``finally:``, then # the response doesn't need to know about the connection. Otherwise # it will also try to release it and we'll have a double-release # mess. response_conn = conn if not release_conn else None # Make the request on the HTTPConnection object > response = self._make_request( # type: ignore[call-overload,misc] conn, method, url, body=body, headers=headers, retries=retries, timeout=timeout_obj, chunked=chunked, response_conn=response_conn, preload_content=preload_content, decode_content=decode_content, enforce_content_length=True, on_post_connection=on_post_connection, on_upload_body=on_upload_body, on_early_response=on_early_response, multiplexed=multiplexed, extension=extension, ) test-env/lib/python3.14/site-packages/urllib3_future/connectionpool.py:1896: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3_future/connectionpool.py:1465: in _make_request rp = conn.request( test-env/lib/python3.14/site-packages/urllib3_future/connection.py:537: in request self.send(chunk) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = b'{}', eot = False def send( self, data: bytes | bytearray, *, eot: bool = False, ) -> ResponsePromise | None: """We might be receiving a chunk constructed downstream""" if self.sock is None or self._stream_id is None or self._protocol is None: # this is unreachable in normal condition as urllib3 # is strict on his workflow. raise RuntimeError( # Defensive: "Trying to send data from a closed connection" ) if ( self.__remaining_body_length is None and self.__expected_body_length is not None ): self.__remaining_body_length = self.__expected_body_length _has_next_timer = hasattr(self._protocol, "next_timer") def send_pending() -> None: while True: data_out = self._protocol.bytes_to_send() # type: ignore[union-attr] if not data_out: break if self._svn is HttpVersion.h3: sync_send_dgram(self.sock, data_out) # type: ignore[arg-type] else: self.sock.sendall(data_out) # type: ignore[union-attr] protocol, stream_id = self._protocol, self._stream_id def check_early_response() -> None: if protocol.has_pending_event( stream_id=stream_id, excl_event=(EarlyHeadersReceived,) ): if self._start_last_request and self.conn_info: self.conn_info.request_sent_latency = ( datetime.now(tz=timezone.utc) - self._start_last_request ) rp = ResponsePromise(self, stream_id, self.__headers) self._promises[rp.uid] = rp self._promises_per_stream[rp.stream_id] = rp raise EarlyResponse(promise=rp) try: # Check before another body chunk even when no ACK wait is needed. # A FIN-only call can still complete an otherwise finished upload. if data: check_early_response() while ( self._protocol.should_wait_remote_flow_control( self._stream_id, len(data) ) is True ): next_timer = self._protocol.next_timer() if _has_next_timer else None # type: ignore[union-attr] sub = SubTimeout(self.sock, next_timer, send_pending) with sub: if self._dgram_gro_enabled: data_in = sync_recv_gro(self.sock, self.blocksize) else: data_in = self.sock.recv(self.blocksize) if sub.timer_fired: continue # TCP EOF cannot replenish flow-control credit. if not data_in and self._svn is not HttpVersion.h3: self._protocol.connection_lost() raise ProtocolError( "Connection closed while waiting for flow control" ) if not isinstance(data_in, list): self._protocol.bytes_received(data_in) else: for gro_segment in data_in: self._protocol.bytes_received(gro_segment) check_early_response() send_pending() if self.__remaining_body_length: self.__remaining_body_length -= len(data) self._protocol.submit_data( self._stream_id, data, end_stream=eot, ) if _HAS_SYS_AUDIT: sys.audit("http.client.send", self, data) remote_pipe_shutdown: BrokenPipeError | None = None # some protocols may impose regulated frame size # so expect multiple frame per send() try: if self._dgram_gso_enabled: tbs = [] while True: data_out = self._protocol.bytes_to_send() if not data_out: break tbs.append(data_out) if len(tbs) > 1: try: sync_sendmsg_gso(self.sock, tbs) except GenericSegmentOffloadUnsupported: self._dgram_gso_enabled = False for dgram in tbs: sync_send_dgram(self.sock, dgram) elif tbs: sync_send_dgram(self.sock, tbs[0]) else: is_quic = self._svn is HttpVersion.h3 while True: data_out = self._protocol.bytes_to_send() if not data_out: break if is_quic: sync_send_dgram(self.sock, data_out) else: > self.sock.sendall(data_out) E ConnectionResetError: [Errno 104] Connection reset by peer test-env/lib/python3.14/site-packages/urllib3_future/backend/hface.py:2086: ConnectionResetError During handling of the above exception, another exception occurred: self = def test_partial_overrule_bytes_content_type(self) -> None: buffer = bytearray() def socket_handler(listener: socket.socket) -> None: nonlocal buffer sock = listener.accept()[0] sock.settimeout(0) start = time.time() while time.time() - start < (LONG_TIMEOUT / 2): try: buffer += sock.recv(65536) except OSError: continue sock.sendall( b"HTTP/1.1 200 OK\r\nServer: example.com\r\nContent-Length: 0\r\n\r\n" ) sock.close() self._start_server(socket_handler) with HTTPConnectionPool( self.host, self.port, timeout=LONG_TIMEOUT, retries=False ) as pool: > resp = pool.request( "POST", "/", body="{}", headers={"Content-Type": b"application/json"}, # type: ignore[dict-item] ) test/with_dummyserver/test_socketlevel.py:4277: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test-env/lib/python3.14/site-packages/urllib3_future/_request_methods.py:175: in request return self.request_encode_body( # type: ignore[no-any-return] test-env/lib/python3.14/site-packages/urllib3_future/_request_methods.py:330: in request_encode_body return self.urlopen(method, url, **extra_kw) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3_future/connectionpool.py:1977: in urlopen retries = retries.increment( test-env/lib/python3.14/site-packages/urllib3_future/util/retry.py:515: in increment raise reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test-env/lib/python3.14/site-packages/urllib3_future/util/util.py:39: in reraise raise value.with_traceback(tb) test-env/lib/python3.14/site-packages/urllib3_future/connectionpool.py:1896: in urlopen response = self._make_request( # type: ignore[call-overload,misc] test-env/lib/python3.14/site-packages/urllib3_future/connectionpool.py:1465: in _make_request rp = conn.request( test-env/lib/python3.14/site-packages/urllib3_future/connection.py:537: in request self.send(chunk) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = b'{}', eot = False def send( self, data: bytes | bytearray, *, eot: bool = False, ) -> ResponsePromise | None: """We might be receiving a chunk constructed downstream""" if self.sock is None or self._stream_id is None or self._protocol is None: # this is unreachable in normal condition as urllib3 # is strict on his workflow. raise RuntimeError( # Defensive: "Trying to send data from a closed connection" ) if ( self.__remaining_body_length is None and self.__expected_body_length is not None ): self.__remaining_body_length = self.__expected_body_length _has_next_timer = hasattr(self._protocol, "next_timer") def send_pending() -> None: while True: data_out = self._protocol.bytes_to_send() # type: ignore[union-attr] if not data_out: break if self._svn is HttpVersion.h3: sync_send_dgram(self.sock, data_out) # type: ignore[arg-type] else: self.sock.sendall(data_out) # type: ignore[union-attr] protocol, stream_id = self._protocol, self._stream_id def check_early_response() -> None: if protocol.has_pending_event( stream_id=stream_id, excl_event=(EarlyHeadersReceived,) ): if self._start_last_request and self.conn_info: self.conn_info.request_sent_latency = ( datetime.now(tz=timezone.utc) - self._start_last_request ) rp = ResponsePromise(self, stream_id, self.__headers) self._promises[rp.uid] = rp self._promises_per_stream[rp.stream_id] = rp raise EarlyResponse(promise=rp) try: # Check before another body chunk even when no ACK wait is needed. # A FIN-only call can still complete an otherwise finished upload. if data: check_early_response() while ( self._protocol.should_wait_remote_flow_control( self._stream_id, len(data) ) is True ): next_timer = self._protocol.next_timer() if _has_next_timer else None # type: ignore[union-attr] sub = SubTimeout(self.sock, next_timer, send_pending) with sub: if self._dgram_gro_enabled: data_in = sync_recv_gro(self.sock, self.blocksize) else: data_in = self.sock.recv(self.blocksize) if sub.timer_fired: continue # TCP EOF cannot replenish flow-control credit. if not data_in and self._svn is not HttpVersion.h3: self._protocol.connection_lost() raise ProtocolError( "Connection closed while waiting for flow control" ) if not isinstance(data_in, list): self._protocol.bytes_received(data_in) else: for gro_segment in data_in: self._protocol.bytes_received(gro_segment) check_early_response() send_pending() if self.__remaining_body_length: self.__remaining_body_length -= len(data) self._protocol.submit_data( self._stream_id, data, end_stream=eot, ) if _HAS_SYS_AUDIT: sys.audit("http.client.send", self, data) remote_pipe_shutdown: BrokenPipeError | None = None # some protocols may impose regulated frame size # so expect multiple frame per send() try: if self._dgram_gso_enabled: tbs = [] while True: data_out = self._protocol.bytes_to_send() if not data_out: break tbs.append(data_out) if len(tbs) > 1: try: sync_sendmsg_gso(self.sock, tbs) except GenericSegmentOffloadUnsupported: self._dgram_gso_enabled = False for dgram in tbs: sync_send_dgram(self.sock, dgram) elif tbs: sync_send_dgram(self.sock, tbs[0]) else: is_quic = self._svn is HttpVersion.h3 while True: data_out = self._protocol.bytes_to_send() if not data_out: break if is_quic: sync_send_dgram(self.sock, data_out) else: > self.sock.sendall(data_out) E urllib3_future.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) test-env/lib/python3.14/site-packages/urllib3_future/backend/hface.py:2086: ProtocolError ------------------------------ Captured log call ------------------------------- DEBUG urllib3_future.connectionpool:connectionpool.py:518 Starting new HTTP connection (1): localhost:35639 =============================== warnings summary =============================== test/with_dummyserver/test_socketlevel.py::TestInvalidHTTPResponse::test_garbage_header_separator_raises_invalid_header /usr/lib/python3.14/threading.py:604: ResourceWarning: unclosed self._cond = Condition(Lock()) Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED test/with_dummyserver/test_socketlevel.py::TestContentFraming::test_partial_overrule_bytes_content_type =========================== skipped tests by reason ============================ SKIPPED [708] Test requires Traefik server (HTTP/2 over TCP and HTTP/3 over QUIC) SKIPPED [105] Test requires TLSv1 SKIPPED [105] Test requires TLSv1.1 SKIPPED [92] Skipping base test class SKIPPED [8] Test requires rtls/utls for ECH at TCP level SKIPPED [6] third-party `zstandard` decompressobj does not support max_length; bomb-prevention requires stdlib `compression.zstd` SKIPPED [4] only run if a brotli library is absent SKIPPED [4] wsproto assertion contract SKIPPED [3] urllib3 uses Content-Length in this case SKIPPED [2] Requires an alternative TLS backend SKIPPED [2] only run if a python-zstandard library is not installed SKIPPED [2] set ciphers test for TLSv1.2 only SKIPPED [2] direct shutdown belongs to the synchronous socket path SKIPPED [1] rtls is not installed SKIPPED [1] utls is not installed SKIPPED [1] rtls backend is not installed SKIPPED [1] utls backend is not installed SKIPPED [1] ssl.PROTOCOL_TLSv1_3 isn't available SKIPPED [1] Test requires a non-stdlib ssl backend (rtls/utls) ===== 1 failed, 6300 passed, 1049 skipped, 1 warning in 1079.95s (0:17:59) ===== ==> ERROR:(B A failure occurred in check().(B  Aborting...(B ]3008;end=bc5e4a573b7042a8a78a427bbf17993d\[!p]104\[?7h]3008;end=e25c9e9e256a409fb893dda16130d947\==> ERROR:(B Build failed, check /var/lib/archbuild/extra-riscv64/felix-7/build(B [?12l[?25h[?12l[?25h]3008;end=bcdb9634fd3742a6ba41513b48528f48\[?12l[?25hreceiving incremental file list python-urllib3-future-2.25.906-1-riscv64-build.log python-urllib3-future-2.25.906-1-riscv64-check.log python-urllib3-future-2.25.906-1-riscv64-prepare.log sent 81 bytes received 9,294 bytes 18,750.00 bytes/sec total size is 44,053 speedup is 4.70