Skip to content

Releases

0.2.1

Choose a tag to compare

@kennethreitz kennethreitz released this 09 Nov 14:49
0a2231f

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 |.
  • Headers equality ignores name case and keeps repeated values.
  • Assigning s.auth is 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 ValueError before a request is logged.
  • A single gzip or x-gzip coding is decoded, including a trailing comma. A list such as gzip, identity is left unchanged.