Releases: urllib3/urllib3
2.5.0
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Security issues
urllib3 2.5.0 fixes two moderate security issues:
- Pool managers now properly control redirects when
retries
is passed — CVE-2025-50181 reported by @sandumjacob (5.3 Medium, GHSA-pq67-6m6q-mj2v) - Redirects are now controlled by urllib3 in the Node.js runtime — CVE-2025-50182 (5.3 Medium, GHSA-48p4-8xcf-vxj5)
Features
- Added support for the
compression.zstd
module that is new in Python 3.14. See PEP 784 for more information. (#3610) - Added support for version 0.5 of
hatch-vcs
(#3612)
Bugfixes
2.4.0
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Features
- Applied PEP 639 by specifying the license fields in pyproject.toml. (#3522)
- Updated exceptions to save and restore more properties during the pickle/serialization process. (#3567)
- Added
verify_flags
option tocreate_urllib3_context
with a default ofVERIFY_X509_PARTIAL_CHAIN
andVERIFY_X509_STRICT
for Python 3.13+. (#3571)
Bugfixes
- Fixed a bug with partial reads of streaming data in Emscripten. (#3555)
Misc
2.3.0
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Features
- Added
HTTPResponse.shutdown()
to stop any ongoing or future reads for a specific response. It callsshutdown(SHUT_RD)
on the underlying socket. This feature was sponsored by LaunchDarkly. (#2868) - Added support for JavaScript Promise Integration on Emscripten. This enables more efficient WebAssembly requests and streaming, and makes it possible to use in Node.js if you launch it as node
--experimental-wasm-stack-switching
. (#3400) - Added the
proxy_is_tunneling
property toHTTPConnection
andHTTPSConnection
. (#3285) - Added pickling support to
NewConnectionError
andNameResolutionError
. (#3480)
Bugfixes
- Fixed an issue in debug logs where the HTTP version was rendering as "HTTP/11" instead of "HTTP/1.1". (#3489)
Deprecations and Removals
- Removed support for Python 3.8. (#3492)
Full Changelog: 2.2.3...2.3.0
2.2.3
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Features
- Added support for Python 3.13. (#3473)
Bugfixes
- Fixed the default encoding of chunked request bodies to be UTF-8 instead of ISO-8859-1. All other methods of supplying a request body already use UTF-8 starting in urllib3 v2.0. (#3053)
- Fixed ResourceWarning on CONNECT with Python < 3.11.4 by backporting python/cpython#103472. (`#3252)
- Adjust tolerance for floating-point comparison on Windows to avoid flakiness in CI (#3413)
- Fixed a crash where certain standard library hash functions were absent in restricted environments. (#3432)
- Fixed mypy error when adding to
HTTPConnection.default_socket_options
. (#3448)
HTTP/2 (experimental)
HTTP/2 support is still in early development.
- Excluded Transfer-Encoding: chunked from HTTP/2 request body (#3425)
- Added version checking for
h2
(https://pypi.org/project/h2/) usage. Now only accepting supported h2 major version 4.x.x. (#3290) - Added a probing mechanism for determining whether a given target origin supports HTTP/2 via ALPN. (#3301)
- Add support for sending a request body with HTTP/2 (#3302)
Full Changelog: 2.2.2...2.2.3
1.26.20
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
- Fixed a crash where certain standard library hash functions were absent in FIPS-compliant environments. (#3432)
- Replaced deprecated dash-separated setuptools entries in
setup.cfg
. (#3461) - Took into account macOS setting
ECONNRESET
instead ofEPROTOTYPE
in its newer versions. (#3416) - Backported changes to our tests and CI configuration from v2.x to support testing with CPython 3.12 and 3.13. (#3436)
Full Changelog: 1.26.19...1.26.20
2.2.2
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
- Added the
Proxy-Authorization
header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set viaRetry.remove_headers_on_redirect
. - Allowed passing negative integers as
amt
to read methods ofhttp.client.HTTPResponse
as an alternative toNone
. (#3122) - Fixed return types representing copying actions to use
typing.Self
. (#3363)
Full Changelog: 2.2.1...2.2.2
1.26.19
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
- Added the
Proxy-Authorization
header to the list of headers to strip from requests when redirecting to a different host. As before, different headers can be set viaRetry.remove_headers_on_redirect
.
Full Changelog: 1.26.18...1.26.19
Note that due to an issue with our release automation, no multiple.intoto.jsonl
file is available for this release.
2.2.1
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
- Fixed issue where
InsecureRequestWarning
was emitted for HTTPS connections when using Emscripten. (#3331) - Fixed
HTTPConnectionPool.urlopen
to stop automatically casting non-proxy headers toHTTPHeaderDict
. This change was premature as it did not apply to proxy headers andHTTPHeaderDict
does not handle byte header values correctly yet. (#3343) - Changed
ProtocolError
toInvalidChunkLength
when response terminates before the chunk length is sent. (#2860) - Changed
ProtocolError
to be more verbose on incomplete reads with excess content. (#3261)
2.2.0
🖥️ urllib3 now works in the browser
🎉 This release adds experimental support for using urllib3 in the browser with Pyodide! 🎉
Thanks to Joe Marshall (@joemarshall) for contributing this feature. This change was possible thanks to work done in urllib3 v2.0 to detach our API from http.client
. Please report all bugs to the urllib3 issue tracker.
🚀 urllib3 is fundraising for HTTP/2 support
urllib3 is raising ~$40,000 USD to release HTTP/2 support and ensure long-term sustainable maintenance of the project after a sharp decline in financial support for 2023. If your company or organization uses Python and would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and thousands of other projects please consider contributing financially to ensure HTTP/2 support is developed sustainably and maintained for the long-haul.
Thank you for your support.
Changes
- Added support for Emscripten and Pyodide, including streaming support in cross-origin isolated browser environments where threading is enabled. (#2951)
- Added support for
HTTPResponse.read1()
method. (#3186) - Added rudimentary support for HTTP/2. (#3284)
- Fixed issue where requests against urls with trailing dots were failing due to SSL errors
when using proxy. (#2244) - Fixed
HTTPConnection.proxy_is_verified
andHTTPSConnection.proxy_is_verified
to be always set to a boolean after connecting to a proxy. It could beNone
in some cases previously. (#3130) - Fixed an issue where
headers
passed in a request withjson=
would be mutated (#3203) - Fixed
HTTPSConnection.is_verified
to be set toFalse
when connecting from a HTTPS proxy to an HTTP target. It was set toTrue
previously. (#3267) - Fixed handling of new error message from OpenSSL 3.2.0 when configuring an HTTP proxy as HTTPS (#3268)
- Fixed TLS 1.3 post-handshake auth when the server certificate validation is disabled (#3325)
Note for downstream distributors: To run integration tests, you now need to run the tests a second time with the --integration
pytest flag. (#3181)
2.1.0
Read the v2 migration guide for help upgrading to the latest version of urllib3.
Removals
- Removed support for the deprecated urllib3[secure] extra. (#2680)
- Removed support for the deprecated SecureTransport TLS implementation. (#2681)
- Removed support for the end-of-life Python 3.7. (#3143)