Releases: a-feld/pywreck
Releases · a-feld/pywreck
v0.6.0
Breaking Changes
- Drops support for Python 3.9
- close_timeout no longer raises an exception when the timeout is reached. The error is silently suppressed after issuing a TCP RST which closes the connection.
- A close_timeout arg is now exposed on the top-level request methods.
close_timeout update
# The following call will not wait for the connection to gracefully close.
# A TCP RST will be sent to close the connection.
response = await pywreck.head('www.example.com', '/', close_timeout=0.0)Updates
- Adds support for Python 3.14
Full Changelog: v0.5.3...v0.6.0
v0.5.3
What's Changed
- Drops support for Python 3.7 and 3.8
- Adds support for Python 3.12 and 3.13
- non-breaking improvements to type annotations
Full Changelog: v0.5.2...v0.5.3
v0.5.2
v0.5.1
v0.5.0
Breaking Changes
Timeouts now encompass the entire request/response cycle
The timeout API has been simplified to:
- A timeout argument that tracks the entire request/response cycle
- A connection close timeout (if using the Connection API)
request/response API example
# The following call can take at most 1 second to complete
response = await pywreck.head("www.example.com", "/", timeout=1.0)Connection API example
# Upon exiting the "async with" block, wait up to 1 second for the connection
# to close before forcing the connection to close
async with await pywreck.Connection.create(
"www.example.com",
close_timeout=1.0,
) as conn:
# Retrieve the response with a 1 second timeout on the request
response = await conn.request("HEAD", "/", timeout=1.0)v0.4.1
Bug Fixes
Fixed an issue where chunked request bytes were not fully consumed. This bug caused errors when chunked requests were issued prior to other requests on a reused connection object.
Full Changelog: v0.4.0...v0.4.1
v0.4.0
Bug Fix
Prevent concurrent access to the underlying connection when a request is in progress.
Example:
connection = await pywreck.Connection.create("www.example.com")
coros = (connection.request("GET", "/foo"), connection.request("GET", "/bar"))
await asyncio.gather(*coros)Note: this request cannot execute concurrently since the underlying connection can only be used for one HTTP/1 request at a time. The exclusive access to the underlying connection is now enforced.
To execute this request concurrently, 2 separate connections must be opened:
coros = (pywreck.request("GET", "www.example.com", "/foo"), pywreck.request("GET", "www.example.com", "/bar"))
await asyncio.gather(*coros)Full Changelog: v0.3.0...v0.4.0