Requests

Latest version: v2.31.0

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

Scan your dependencies

Page 9 of 26

2.10.0

Not secure
-------------------

**New Features**

- SOCKS Proxy Support! (requires PySocks;
`$ pip install requests[socks]`)

**Miscellaneous**

- Updated bundled urllib3 to 1.15.1.

2.9.2

Not secure
------------------

**Improvements**

- Change built-in CaseInsensitiveDict (used for headers) to use
OrderedDict as its underlying datastore.

**Bugfixes**

- Don't use redirect\_cache if allow\_redirects=False
- When passed objects that throw exceptions from `tell()`, send them
via chunked transfer encoding instead of failing.
- Raise a ProxyError for proxy related connection issues.

2.9.1

Not secure
------------------

**Bugfixes**

- Resolve regression introduced in 2.9.0 that made it impossible to
send binary strings as bodies in Python 3.
- Fixed errors when calculating cookie expiration dates in certain
locales.

**Miscellaneous**

- Updated bundled urllib3 to 1.13.1.

2.9.0

Not secure
------------------

**Minor Improvements** (Backwards compatible)

- The `verify` keyword argument now supports being passed a path to a
directory of CA certificates, not just a single-file bundle.
- Warnings are now emitted when sending files opened in text mode.
- Added the 511 Network Authentication Required status code to the
status code registry.

**Bugfixes**

- For file-like objects that are not sought to the very beginning, we
now send the content length for the number of bytes we will actually
read, rather than the total size of the file, allowing partial file
uploads.
- When uploading file-like objects, if they are empty or have no
obvious content length we set `Transfer-Encoding: chunked` rather
than `Content-Length: 0`.
- We correctly receive the response in buffered mode when uploading
chunked bodies.
- We now handle being passed a query string as a bytestring on Python
3, by decoding it as UTF-8.
- Sessions are now closed in all cases (exceptional and not) when
using the functional API rather than leaking and waiting for the
garbage collector to clean them up.
- Correctly handle digest auth headers with a malformed `qop`
directive that contains no token, by treating it the same as if no
`qop` directive was provided at all.
- Minor performance improvements when removing specific cookies by
name.

**Miscellaneous**

- Updated urllib3 to 1.13.

2.8.1

Not secure
------------------

**Bugfixes**

- Update certificate bundle to match `certifi` 2015.9.6.2's weak
certificate bundle.
- Fix a bug in 2.8.0 where requests would raise `ConnectTimeout`
instead of `ConnectionError`
- When using the PreparedRequest flow, requests will now correctly
respect the `json` parameter. Broken in 2.8.0.
- When using the PreparedRequest flow, requests will now correctly
handle a Unicode-string method name on Python 2. Broken in 2.8.0.

2.8.0

Not secure
------------------

**Minor Improvements** (Backwards Compatible)

- Requests now supports per-host proxies. This allows the `proxies`
dictionary to have entries of the form
`{'<scheme>://<hostname>': '<proxy>'}`. Host-specific proxies will
be used in preference to the previously-supported scheme-specific
ones, but the previous syntax will continue to work.
- `Response.raise_for_status` now prints the URL that failed as part
of the exception message.
- `requests.utils.get_netrc_auth` now takes an `raise_errors` kwarg,
defaulting to `False`. When `True`, errors parsing `.netrc` files
cause exceptions to be thrown.
- Change to bundled projects import logic to make it easier to
unbundle requests downstream.
- Changed the default User-Agent string to avoid leaking data on
Linux: now contains only the requests version.

**Bugfixes**

- The `json` parameter to `post()` and friends will now only be used
if neither `data` nor `files` are present, consistent with the
documentation.
- We now ignore empty fields in the `NO_PROXY` environment variable.
- Fixed problem where `httplib.BadStatusLine` would get raised if
combining `stream=True` with `contextlib.closing`.
- Prevented bugs where we would attempt to return the same connection
back to the connection pool twice when sending a Chunked body.
- Miscellaneous minor internal changes.
- Digest Auth support is now thread safe.

**Updates**

- Updated urllib3 to 1.12.

Page 9 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.