NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #35 most downloaded on PyPI
A minimal low-level HTTP client.
Last release 1 years ago
24 Apr 2025
Release timing varies
gaps range from 2 weeks to 6 months
Most releases are documented
notes for 53 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
64 releases · first in 2019
Version 1.0.9 (April 24th, 2025)
One column per quarter.
Fix AttributeError when importing on Python 3.14.
AttributeError when importing on Python 3.14. (#1005)Support proxy=… configuration on ConnectionPool().
proxy=… configuration on ConnectionPool(). (#974)Handle trio raising NotImplementedError on unsupported platforms.
trio dependency pinning. (#956)trio raising NotImplementedError on unsupported platforms. (#955)ssl.SSLError to httpcore.ConnectError. (#918)Handle EndOfStream for anyio backend.
EndOfStream for anyio backend. (https://github.com/encode/httpcore/pull/899)0.25.* series in package dependancies. (https://github.com/encode/httpcore/pull/903)EndOfStream exception for anyio backend. (#899)0.25.* series in package dependancies. (#903)Fix support for connection Upgrade and CONNECT when some data in the stream has been read.
Fix support for async cancellations.
Fix float("inf") timeouts in Event.wait function.
float("inf") timeouts in Event.wait function. (#846)Fix pool timeout to account for the total time spent retrying.
From version 1.0 our async support is now optional, as the package has minimal dependencies by default.
From version 1.0 our async support is now optional, as the package has minimal dependencies by default.
For async support use either pip install 'httpcore[asyncio]' or pip install 'httpcore[trio]'.
The project versioning policy is now explicitly governed by SEMVER. See https://semver.org/.
Add support for HTTPS proxies. (#745, # 786)
sni_hostname extension with SOCKS proxy. (#774)Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#762)sni_hostname extension with SOCKS proxy. (#774)Extensions from Mapping[Str, Any] to MutableMapping[Str, Any]. (#762)Support async cancellations, ensuring that the connection pool is left in a clean state when cancellations occur.
trace callback is passed to an asynchronous request or an asynchronous trace callback is passed to a synchronous request. (#717)Add socket_options argument to ConnectionPool and HTTProxy classes.
socket_options argument to ConnectionPool and HTTProxy classes. (#668)sni_hostname request extension. (#696)anyio package. (#692)If 'retries' is set, then allow retries if an SSL handshake error occurs.
Respect HTTP/2 max concurrent streams when settings updates are sent by server.
retries option to SOCKS proxy classes. (#643)Allow ws and wss schemes. Allows us to properly support websocket upgrade connections.
ws and wss schemes. Allows us to properly support websocket upgrade connections. (#625)RuntimeError when closing a connection pool with active connections. Removes some error cases when cancellations are used. (#631)anyio, so that it's no longer a hard dependancy, and isn't imported if unused. (#639)Revert 'Fix async cancellation behaviour', which introduced race conditions.
RuntimeError if attempting to us UNIX domain sockets on Windows. (#619)Fix HTTP/1.1 interim informational responses, such as "100 Continue".
Support HTTP/1.1 informational responses.
h11 0.14. (#579)Ensure HTTP proxy CONNECT requests include timeout configuration.
timeout configuration. (#506)typing.Optional for type hints (#513)trio map OSError exceptions to ConnectError (#543)Requests which raise a PoolTimeout need to be removed from the pool queue.
Fix SOCKS support for http:// URLs.
http:// URLs. (#492)Add proxy_auth argument to HTTPProxy
Support HTTP/2 on HTTPS tunnelling proxies.
Fix race condition when removing closed connections from the pool
Failed connections no longer remain in the pool. (Pull #433)
max_connections becomes optional. (Pull #429)
max_connections becomes optional. (Pull #429)certifi is now included in the install dependancies. (Pull #428)h2 is now strictly optional. (Pull #428)The 0.14 release is a complete reworking of httpcore, comprehensively addressing some underlying issues in the connection pooling, as well as substant
The 0.14 release is a complete reworking of httpcore, comprehensively addressing some underlying issues in the connection pooling, as well as substantially redesigning the API to be more user friendly.
Some of the lower-level API design also makes the components more easily testable in isolation, and the package now has 100% test coverage.
See discussion #419 for a little more background.
There's some other neat bits in there too, such as the "trace" extension, which gives a hook into inspecting the internal events that occur during the request/response cycle. This extension is needed for the HTTPX cli, in order to...
Note that curio support is not currently available in 0.14.0. If you're using httpcore with curio please get in touch, so we can assess if we ought to prioritize it as a feature or not.
Fix broken error messaging when URL scheme is missing, or a non HTTP(S) scheme is used. (Pull #403)
Close sockets when read or write timeouts occur. (Pull #365)
Resolved niggles with AnyIO EOF behaviours. (Pull #358, #362)
Improved error messaging when URL scheme is missing, or a non HTTP(S) scheme is used. (Pull ##354)
anyio as the default backend implementation when running with asyncio. Resolves some awkward TLS timeout issues.Support HTTP/2 prior knowledge, using httpcore.SyncConnectionPool(http1=False). (Pull #333)
httpcore.SyncConnectionPool(http1=False). (Pull #333)select.poll support. (Pull #331)Improve error message for specific case of RemoteProtocolError where server disconnects without sending a response. (Pull #313)
RemoteProtocolError where server disconnects without sending a response. (Pull #313)More resiliant testing for closed connections. (Pull #311)
The 0.13 release updates the core API in order to match the HTTPX Transport API, introduced in HTTPX 0.18 onwards.
The 0.13 release updates the core API in order to match the HTTPX Transport API, introduced in HTTPX 0.18 onwards.
An example of making requests with the new interface is:
with httpcore.SyncConnectionPool() as http:
status_code, headers, stream, extensions = http.handle_request(
method=b'GET',
url=(b'https', b'example.org', 443, b'/'),
headers=[(b'host', b'example.org'), (b'user-agent', b'httpcore')]
stream=httpcore.ByteStream(b''),
extensions={}
)
body = stream.read()
print(status_code, body)
.request() method is now handle_request(). (Pull #296).arequest() method is now .handle_async_request(). (Pull #296)headers argument is no longer optional. (Pull #296)stream argument is no longer optional. (Pull #296)ext argument is now named extensions, and is no longer optional. (Pull #296)"reason" extension keyword is now named "reason_phrase". (Pull #296)"reason_phrase" and "http_version" extensions now use byte strings for their values. (Pull #296)httpcore.PlainByteStream() class becomes httpcore.ByteStream(). (Pull #296).read() interface. (Pull #296)Abort SSL connections on close rather than waiting for remote EOF when using asyncio. (Pull #167)
asyncio. (Pull #167)anyio backend. (Pull #236)Host header precedence for :authority in HTTP/2. (Pull #241, #243)asyncio. (Pull #242, #244)asyncio SSL warning when using proxy tunneling. (Pull #249)Properly wrap connect errors on the asyncio backend. (Pull #235)
ImportError occurring on Python 3.9 when using the HTTP/1.1 sync client in a multithreaded context. (Pull #237)Add connect retries. (Pull #221)
trio. (Pull #225)HTTP header casing is now preserved, rather than always sent in lowercase. (#216 and python-hyper/h11#104)
Add await to async semaphore release() coroutine
The Transport API with 0.11.0 has a couple of significant changes.
The Transport API with 0.11.0 has a couple of significant changes.
Firstly we've moved changed the request interface in order to allow extensions, which will later enable us to support features such as trailing headers, HTTP/2 server push, and CONNECT/Upgrade connections.
The interface changes from:
def request(method, url, headers, stream, timeout):
return (http_version, status_code, reason, headers, stream)
To instead including an optional dictionary of extensions on the request and response:
def request(method, url, headers, stream, ext):
return (status_code, headers, stream, ext)
Having an open-ended extensions point will allow us to add later support for various optional features, that wouldn't otherwise be supported without these API changes.
In particular:
Currently extensions are limited to:
timeout - Optional. Timeout dictionary.http_version - Optional. Include the HTTP version used on the response.reason - Optional. Include the reason phrase used on the response. Only valid with HTTP/1.*.See https://github.com/encode/httpx/issues/1274#issuecomment-694884553 for the history behind this.
Secondly, the async version of request is now namespaced as arequest.
This allows concrete transports to support both sync and async implementations on the same class.
backend="anyio". (Pull #169).request and .arequest so implementations can support both sync and async. (Pull #189)Added Unix Domain Socket support. (Pull #139)
max_keepalive_connections configuration. (Pull #153)Include max_keepalive_connections on AsyncHTTPProxy/SyncHTTPProxy classes.
max_keepalive_connections on AsyncHTTPProxy/SyncHTTPProxy classes.max_keepalive is deprecated in favour of max_keepalive_connections. (Pull #140)
The most notable change in the 0.10.0 release is that HTTP/2 support is now fully optional.
Use either pip install httpcore for HTTP/1.1 support only, or pip install httpcore[http2] for HTTP/1.1 and HTTP/2 support.
local_address=... support. (Pull #100, #134)PlainByteStream, IteratorByteStream, AsyncIteratorByteStream. The AsyncByteSteam and SyncByteStream classes are now pure interface classes. (#133)LocalProtocolError, RemoteProtocolError exceptions. (Pull #129)UnsupportedProtocol exception. (Pull #128).get_connection_info() method. (Pull #102, #137)max_keepalive is deprecated in favour of max_keepalive_connections. (Pull #140)Proper host resolution for sync case, including IPv6 support. (Pull #97)
URL port becomes an Optional[int] instead of int. (Pull #92)
Optional[int] instead of int. (Pull #92)Logging via HTTPCORE_LOG_LEVEL and HTTPX_LOG_LEVEL environment variables and TRACE level logging. (Pull #79)
Include Host and Accept headers on proxy "CONNECT" requests.
Host and Accept headers on proxy "CONNECT" requests.Fix connections using proxy forwarding requests not being added to the connection pool properly. (Pull #70)
Allow inheritance of both httpcore.AsyncByteStream, httpcore.SyncByteStream without type conflicts.
httpcore.AsyncByteStream, httpcore.SyncByteStream without type conflicts.httpcore.AsyncByteStream, httpcore.SyncByteStream without type conflicts.New TimeoutException base class.
TimeoutException base class.- First integration with HTTPX.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →