Pywreck

Latest version: v0.5.2

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.5.2

What's Changed
* Adds support for Python 3.11


**Full Changelog**: https://github.com/a-feld/pywreck/compare/v0.5.1...v0.5.2

0.5.1

Minor Update

Headers used to require a type of `Optional[Dict[str, str]]`. This has been changed to `Optional[Mapping[str, str]]` to support non-dict mapping types.

0.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

python
The following call can take at most 1 second to complete
response = await pywreck.head("www.example.com", "/", timeout=1.0)


Connection API example
python
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)

0.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**: https://github.com/a-feld/pywreck/compare/v0.4.0...v0.4.1

0.4.0

Bug Fix
Prevent concurrent access to the underlying connection when a request is in progress.

Example:
python
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:
python
coros = (pywreck.request("GET", "www.example.com", "/foo"), pywreck.request("GET", "www.example.com", "/bar"))
await asyncio.gather(*coros)


**Full Changelog**: https://github.com/a-feld/pywreck/compare/v0.3.0...v0.4.0

0.3.0

Breaking Changes

Mark Response class as frozen. Assignment to attributes of Response after creation is now disallowed.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.