unstale

pypi / urllib3

urllib3

What changed in urllib3 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

47 breaking11 security15 deprecations24 new APIs and options2 performance8 behavior and defaults2 tooling31 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

urllib3 2140 changes

Breaking changes 47

  • A supported-length fingerprint containing non-hexadecimal characters now raises SSLError instead of binascii.Error.

    2.8.0release notes

  • Forwarding through an HTTPS proxy no longer applies target SNI, assertions, or client credentials to proxy handshakes; the proxy SSL context and identity checks are respected.

    2.8.0release notes

  • PoolManager no longer passes assert_hostname and assert_fingerprint parameters to HTTP connection pools.

    2.8.0release notes

  • Retries of request bodies with tell() but no seek() now raise UnrewindableBodyError instead of ValueError.

    2.8.0release notes

  • HTTP(S) host parsing now strictly enforces RFC 3986 syntax, rejects invalid host input, and normalizes percent-encoded octets according to RFC 3986.

    2.8.0release notes

  • The minimum supported pyOpenSSL version is now 19.0.0.

    2.7.0release notes

  • Support for end-of-life PyPy3.10 has been removed.

    2.7.0release notes

  • Support for end-of-life Python 3.9 has been removed.

    2.7.0release notes

  • Retry-After times greater than 6 hours are treated as 6 hours by default.

    2.6.3release notes

  • Custom decompressors must be updated to respect the changed API.

    2.6.0release notes

  • Removed in favor of HTTPResponse.headers.get(name, default).

    2.6.0release notes

  • Removed in favor of HTTPResponse.headers.

    2.6.0release notes

  • Certificate hostnames are now verified using subjectAltName only; commonName is no longer used.

    2.0.0upgrade guiderelease notes

  • Implementations other than CPython or PyPy3 are no longer supported.

    2.0.0upgrade guide

  • The default is now True, preventing silent data loss when reading streamed responses.

    2.0.0release notes

  • All constructor parameters are now keyword-only except host and port.

    2.0.0release notes

  • Returns an urllib3.HTTPResponse instance instead of an http.client.HTTPResponse.

    2.0.0release notes

  • Updating the timeout before the next request now uses the new timeout rather than reusing the previous response's socket read timeout.

    2.0.0release notes

  • Reads now follow io.BufferedIOBase semantics regardless of compression: only EOF returns empty bytes, reads never exceed the requested size, and calls may issue any number of system calls.

    2.0.0release notes

  • Connecting via HTTPS when the ssl module is unavailable now raises ImportError instead of SSLError.

    2.0.0release notes

  • Header parameter formatting now matches the WHATWG HTML Standard as of 2021-06-10; control characters in filenames are no longer percent encoded.

    2.0.0release notes

  • TLS libraries such as LibreSSL and wolfSSL are no longer supported.

    2.0.0upgrade guiderelease notes

  • OpenSSL versions earlier than 1.1.1 or without SNI support are no longer supported; an ImportError is raised when an incompatible version is detected.

    2.0.0release notes

  • OpenSSL versions older than 1.1.1 are no longer supported.

    2.0.0upgrade guide

  • Support for Python 2.7, 3.5, and 3.6 was removed.

    2.0.0release notes

  • Python 3.10 or later is required; Python 2.7 and Python 3.5–3.9 are no longer supported.

    2.0.0upgrade guide

  • The default request body encoding changed from ISO-8859-1 to UTF-8.

    2.0.0upgrade guide

  • The deprecated DEFAULT_REDIRECT_HEADERS_BLACKLIST option was removed.

    2.0.0release notes

  • The deprecated method_whitelist option was removed.

    2.0.0release notes

  • Renamed from Retry.BACK0FF_MAX.

    2.0.0release notes

  • Sets SSLContext.maximum_version.

    2.0.0release notes

  • Set ssl_minimum_version to a proper value to continue using legacy TLS versions.

    2.0.0upgrade guiderelease notes

  • It now sets the corresponding SSLContext.minimum_version and maximum_version values; SSLContext objects are constructed using ssl.PROTOCOL_TLS_CLIENT regardless of ssl_version.

    2.0.0release notes

  • The default minimum TLS version is now TLSVersion.TLSv1_2.

    2.0.0release notes

  • Remove the strict parameter because it is unneeded with Python 3.

    2.0.0upgrade guide

  • urllib3 no longer supplies a default cipher set and instead uses the ciphers configured by the system.

    2.0.0upgrade guiderelease notes

  • The default minimum TLS version is now TLS 1.2 instead of TLS 1.0.

    2.0.0upgrade guide

  • The secure extra was removed.

    2.0.0upgrade guide

  • Importing VerifiedHTTPSConnection from connectionpool is no longer possible; the class is documented in connection, and its new name is HTTPSConnection.

    2.0.0upgrade guide

  • AppEngineManager and support for Google App Engine Standard Environment were removed.

    2.0.0release notes

  • The urllib3.contrib.ntlmpool module was removed.

    2.0.0upgrade guiderelease notes

  • Support for SSLv3.0 was removed from this module, even when the compiled OpenSSL library supports it.

    2.0.0release notes

  • The urllib3.contrib.securetransport module was removed.

    2.0.0upgrade guide

  • SNIMissingWarning was removed.

    2.0.0release notes

  • The from_httplib method was removed.

    2.0.0release notes

  • The urllib3.request module was removed; RequestMethods is now a private API so importing request from urllib3 resolves to the top-level request() function.

    2.0.0release notes

  • No longer overrides system cipher suites with a default value; the operating system's configured cipher suites are used.

    2.0.0release notes

Security 11

  • is_ipaddress() now detects non-standard IPv4 forms accepted by socket.connect, ensuring SSL certificate verification uses the correct mode for those addresses.

    2.8.0release notes

  • HTTPS proxy TLS settings are no longer ignored or overridden by destination TLS settings. Configure proxy CA certificates and client certificates in proxy_ssl_context.

    2.8.0release notessecurity advisory

  • Safeguards prevent potential security issues when proxy tunneling handles invalid characters in the proxy host and HTTP headers.

    2.8.0release notes

  • urllib3: Chunked Deflate streaming can enter an infinite loop

    2.8.0security advisory

  • urllib3: HTTPResponse.stream()/read_chunked() buffers an unbounded chunk-size line into memory

    2.8.0security advisory

  • Fixed streaming API cases that bypassed decompression-bomb safeguards after partial reads or when using the official Brotli library.

    2.7.0release notessecurity advisory

  • ProxyManager pools now strip sensitive headers specified in this setting when redirecting to a different host.

    2.7.0release notessecurity advisory

  • Fixed a security issue that bypassed streaming API decompression-bomb safeguards when following HTTP redirects.

    2.6.3release notessecurity advisory

  • Chained encodings are limited to 5 to prevent denial-of-service attacks that exhaust resources during decoding.

    2.6.0release notessecurity advisory

  • Reading small chunks of highly compressed content is safer and more efficient, preventing excessive resource consumption when only a small amount of data is requested.

    2.6.0release notessecurity advisory

  • TLS handshakes now use SSLContext.check_hostname when possible.

    2.0.0release notes

Deprecations 15

  • Using an empty collection for Retry.allowed_methods to retry any verb is deprecated.

    2.8.0release notes

  • Removal of deprecated features has been rescheduled to version 3.0.

    2.7.0release notes

  • Existing deprecation notices now use FutureWarning instead of DeprecationWarning for better visibility.

    2.7.0release notes

  • Use format_multipart_header_param instead.

    2.0.0release notes

  • Pass chunked=True to HTTPConnection.request() instead; request_chunked() will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • Use HTTPResponse.headers.get(name, default) instead; getheader() will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • Use HTTPResponse.headers instead; getheaders() will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • Pass parameters to the HTTPSConnection constructor instead.

    2.0.0release notes

  • The header_formatter parameter is deprecated and will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • The ssl_version option is deprecated and will be removed in urllib3 v3.0; use ssl_minimum_version instead.

    2.0.0upgrade guide

  • Use ssl_minimum_version instead; ssl_version will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • The strict parameter is deprecated because it is no longer needed in Python 3.x and will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • The pyopenssl module is deprecated and will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • The securetransport module is deprecated and will be removed in urllib3 v2.1.0.

    2.0.0release notes

  • URLs without a scheme are deprecated and will raise an error in a future urllib3 version.

    2.0.0upgrade guide

New APIs and options 24

  • urllib3.util.make_headers() now accepts a basic_auth_encoding parameter.

    2.8.0release notes

  • urllib3.util.make_headers() now accepts a proxy_basic_auth_encoding parameter.

    2.8.0release notes

  • The result of parse_url() now has an auth_decoded convenience property.

    2.8.0release notes

  • The result of parse_url() now has an auth_decoded_joined convenience property.

    2.8.0release notes

  • A public API interface is available for subclassing connections using supported APIs.

    2.0.0upgrade guide

  • A public API interface is available for subclassing responses using supported APIs.

    2.0.0upgrade guiderelease notes

  • Raised when PoolManager(block=True) and a connection is returned to a full pool.

    2.0.0release notes

  • Added the has_connected_to_proxy property.

    2.0.0release notes

  • Added the is_closed property.

    2.0.0release notes

  • Added the is_connected property.

    2.0.0release notes

  • The scheme parameter configures the scheme of the origin being tunnelled to.

    2.0.0release notes

  • When combine=True, a new header value is merged with an existing value into a comma-separated list; otherwise duplicate values are repeated.

    2.0.0release notes

  • HTTPHeaderDict is available in the top-level urllib3 namespace.

    2.0.0release notes

  • Responses can be deserialized from JSON into Python objects with HTTPResponse.json().

    2.0.0upgrade guiderelease notes

  • A new exception is raised when a DNS error occurs.

    2.0.0release notes

  • Added the proxy_assert_fingerprint keyword argument.

    2.0.0release notes

  • Added the proxy_assert_hostname keyword argument.

    2.0.0release notes

  • The new json= parameter sends a JSON request body and adds Content-Type: application/json by default.

    2.0.0upgrade guiderelease notes

  • Added an optional backoff_jitter parameter.

    2.0.0release notes

  • A configurable backoff_max parameter replaces Retry.DEFAULT_BACKOFF_MAX when provided.

    2.0.0release notes

  • Set this to True to enable verifying the hostname against commonName.

    2.0.0release notes

  • The authority property follows RFC 3986 section 3.2 and can replace netloc when including the URI userinfo component.

    2.0.0release notes

  • A top-level request function sends requests using a global pool manager, avoiding the need to configure a PoolManager for simple use cases.

    2.0.0upgrade guiderelease notes

  • Zstandard support is available when zstandard 1.18.0 or later is installed; the zstd extra installs the package.

    2.0.0release notes

Performance 2

  • Streamed response decoding is faster.

    2.8.0release notes

  • Content decoding is faster due to an optimization to BytesQueueBuffer.

    2.6.0release notes

Behavior and default changes 8

  • The default pool queue class is resolved from the queue module after ConnectionPool instantiation, allowing late monkey-patching such as by gevent.

    2.8.0release notes

  • String representations now include host and port information.

    2.6.0release notes

  • Bytes keys can now be used to retrieve, delete, and test membership in HTTPHeaderDict.

    2.6.0release notes

  • Support for Python 3.14 free-threading builds is now explicit.

    2.6.0release notes

  • The default blocksize is now 16KB to match OpenSSL's default read amounts.

    2.0.0release notes

  • Certificate verification now relies on Python’s certificate verification instead of urllib3’s handling, which should speed verification and expose Python or OpenSSL improvements.

    2.0.0upgrade guide

  • Fixed its default value to match HTTPConnection.socket_options.

    2.0.0release notes

  • Now wraps any connection error, including timeout, TLS, and DNS errors, that occurs when connecting to the proxy.

    2.0.0release notes

Tooling 2

  • A test dependency group containing the minimum dependencies needed to run the test suite is available for downstream packagers.

    2.8.0release notes

  • APIs are type-hinted, enabling type-checking and better IDE autocomplete suggestions.

    2.0.0upgrade guide

Fixes and other changes 31

  • Handling of HTTP 303 redirects is fixed for requests with chunked or file-like bodies.

    2.8.0release notes

  • URL fragments are stripped from absolute request targets before HTTPConnectionPool.urlopen() and HTTP proxy forwarding send requests.

    2.8.0release notes

  • An invalid timeout argument on a pool created with block=True now raises ValueError instead of a misleading FullPoolError.

    2.8.0release notes

  • Unread response data is discarded in 64 KiB chunks, matching the default amt used by HTTPResponse.stream(...).

    2.8.0release notes

  • Obsolete folded response header lines are replaced with spaces in accordance with RFC 9112, preventing raw CRLF sequences from appearing in header values such as Set-Cookie.

    2.8.0release notes

  • Explicit :0 values are preserved instead of being replaced with default ports 80 or 443 across URL parsing, pool selection, proxy configuration, connection_from_url(), and HTTP/2 request authority.

    2.8.0release notes

  • proxy_ssl_context now works with ProxyManager when use_forwarding_for_https=True. Passing ssl_context instead emits a FutureWarning and will raise an error in v3.0.

    2.8.0release notes

  • Percent-encoded SOCKS proxy credentials are decoded before authentication with the proxy server.

    2.8.0release notes

  • An AttributeError on Python built with OpenSSL 4+ is fixed when ssl.PROTOCOL_TLSv1 no longer exists.

    2.8.0release notes

  • Certificate subject reading and encrypted private-key loading use cryptography APIs, avoiding DeprecationWarning from pyOpenSSL 26.3.0+.

    2.8.0release notes

  • The type annotation now accepts memoryview as well as bytearray, matching the io.RawIOBase.readinto contract and enabling use with io.BufferedReader without type errors.

    2.7.0release notes

  • Fixed LocationParseError for paths resembling schemeless URIs passed to urlopen().

    2.7.0release notes

  • Calling read with amt=None now includes decompressed data buffered from previous partial reads.

    2.7.0release notes

  • With cache_content=True, read() now caches the complete response after a partial read.

    2.7.0release notes

  • read_chunked() now handles amt=0.

    2.7.0release notes

  • stream() now handles amt=0.

    2.7.0release notes

  • The type alias now includes Iterable[str], matching documented and runtime behavior for chunked request bodies.

    2.7.0release notes

  • Fixed VerifiedHTTPSConnection on Emscripten.

    2.6.3release notes

  • Fixed read_chunked() to properly handle leftover data in the decoder's buffer when reading compressed chunked responses.

    2.6.2release notes

  • Restores the previously removed HTTPResponse.getheader() method.

    2.6.1release notes

  • Restores the previously removed HTTPResponse.getheaders() method.

    2.6.1release notes

  • Fixed use in Emscripten when no explicit port is provided.

    2.6.0release notes

  • Handling of expandable variables is fixed.

    2.6.0release notes

  • The zstd extra installs backports.zstd instead of zstandard on Python 3.13 and earlier.

    2.6.0release notes

  • Redirect handling is fixed when an integer is passed for the retries parameter.

    2.6.0release notes

  • Fixed a socket leak when connect() fails.

    2.0.0release notes

  • Sets the socket timeout from HTTPConnection.timeout before reading data from the socket.

    2.0.0release notes

  • Chunk boundaries are always lowercase when sending requests with Transfer-Encoding: chunked.

    2.0.0release notes

  • Fixed a thread-safety issue that could close connection pools while requests were in progress when accessing many distinct origins.

    2.0.0release notes

  • OpenSSL.SSL.Error is now wrapped with ssl.SSLError.

    2.0.0release notes

  • Fixed a bug where the feature modified the headers object.

    2.0.0release notes