pypi / geventhttpclient
geventhttpclient
What changed in geventhttpclient 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
19 breaking1 security2 deprecations3 new APIs and options3 behavior and defaults2 tooling16 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initgeventhttpclient 246 changes
Breaking changes 19
The requests surface omits headers with a None value and drops a matching session header; HTTPClient and geventhttpclient.httpx raise TypeError instead of sending None as a string.
check_hostname now defaults to True.
The minimum required gevent version is now 25.9, the first release with wheels for Python 3.11–3.14.
Header field names and values are now str instead of bytes.
Headers.iget() has been removed.
Headers.iteroriginal() has been removed.
Multi-value headers now send one field line per element.
The oauth2 extra has been removed.
Redirect behavior was updated for HTTP conformance to RFC 9110, 3986, and 2965.
Retries after a transmission error are now limited to idempotent methods.
Returns
bytesinstead ofbytearray.Returns
bytesinstead ofbytearray; calling it on a released response raisesHTTPConnectionClosed.Calling
readline()on a released response raisesHTTPConnectionClosed.When several file tuples carry a custom boundary, the first one wins instead of the last.
Python 3.11 or later is required.
SSL support is mandatory; environments without the
sslmodule are no longer supported by fallbacks.urllib3is no longer a runtime dependency; it remains available via thebenchmarksextra.This is the last release supporting Python 3.9; the next release will require Python 3.11 or later.
Bodies are encoded automatically when the chunked header is set, and bodies of unknown length use chunked encoding automatically.
Security 1
The vendored parser is updated to v9.4.3, including a fix for HTTP request smuggling via content-length obfuscation.
Deprecations 2
cert_file is deprecated in favour of a custom SSL context.
key_file is deprecated in favour of a custom SSL context.
New APIs and options 3
BasicAuth is now available as a first-class authentication feature.
An httpx-compatible drop-in surface is now available.
Adds CONNECT tunneling with optional Basic authentication for HTTPS targets and absolute-URI forwarding for plain HTTP.
Behavior and default changes 3
Request-head validation was updated as part of HTTP conformance work.
The response surface is now requests-compatible.
Supports 100-continue: sends the body only after an interim response and returns final rejection responses without sending it.
Tooling 2
A non-gevent test mode is available via
NON_GEVENT=1, with a dedicated CI job.Full type annotations are provided for the core modules
url,header,response,connectionpool, andclient.
Fixes and other changes 16
Python 3.15 is explicitly supported, with cp315 wheels built and shipped alongside wheels for Python 3.11–3.14.
Empty responses through the httplib shim are fixed.
Semicolon path parameters are preserved in requests and redirects.
Requests with body=None are now treated as having no body, avoiding chunked transfer and a keep-alive delay caused by a separate terminating write.
An explicitly requested chunked request with an empty body is sent with the request headers in a single sendall(), avoiding a Nagle stall.
Importing
geventhttpclient.urlno longer raises aNameErroron Python <= 3.13.Header fields, header values, and status messages are decoded as latin-1 per RFC 9110, matching
http.clientbehavior.The
bodyparameter is accepted again.Requests inside CONNECT tunnels are sent in origin form rather than absolute-URI form.
Returns the server's early rejection response instead of raising a broken pipe error when a connection breaks while sending a large request body.
Interim 1xx responses are treated as bodyless, and the status parse error is renamed to “Invalid status code”.
Prevents sending Content-Length alongside chunked transfer encoding.
Socket validation uses select() to support stdlib SSL.
Adds connection validation to prevent stale connection reuse.
Explicitly supports Python 3.13 and 3.14.
Fixed Headers.extend.