Repository navigation
Releases
Releases · kennethreitz/fetch.py
0.2.1
First tagged release of fetch.py.
Version 0.2.1 is the single-file client on main, including the fixes from #2. Copy fetch.py into a project, or install the attached wheel or sdist. The import name is fetch. There are no runtime dependencies.
- A cached connection the server has already closed is replaced before the next request is written. A failure after that write is still not retried.
- A 303 drops the request body for every method. HEAD stays HEAD. Other methods still become GET. 301 and 302 still rewrite only POST.
- Session header names stay lowercase across item assignment,
update(),setdefault(), and|. Headersequality ignores name case and keeps repeated values.- Assigning
s.authis checked immediately. An invalid pair leaves the previous credentials in place. - Text bodies, query parameters, form fields, and Basic credentials that cannot be encoded raise
ValueErrorbefore a request is logged. - A single
gziporx-gzipcoding is decoded, including a trailing comma. A list such asgzip, identityis left unchanged.