NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #313 most downloaded on PyPI
Typing stubs for requests
Last release 28 days ago
06 Sep 2026
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
142 releases · first in 2021
One column per quarter.
Type module constants and Response.links
Response.links (#16266)Structured obsolete_since fields
Structured obsolete_since fields (#15682)
Avoid class-scope name collisions in stubs (#15994)
Class members such as list, type, cursor, Model, and datetime shadow the builtins, classes, or modules referenced by nearby annotations. ty then resolves those annotations to Unknown, which can hide invalid calls in APIs including docker, sqlite3, psycopg2, Markdown, and requests.
Qualify shadowed builtins and use private aliases for colliding imports and classes. This removes 15 stdlib and 120 third-party collision diagnostics under ty 0.0.58, restores the affected public types, and fixes four existing psycopg2 type assertions.
Upgrade black to 26.5.0
Upgrade black to 26.5.0 (#15801)
[requests] Improve type annotations for several HTTPAdapter methods
Import some items from typing instead of typing_extensions
Import some items from typing instead of typing_extensions (#15711)
Part of #13782
[requests] Specify that adapters.HTTPAdapter.close() returns None
[requests] Specify that adapters.HTTPAdapter.close() returns None (#15684)
Use dashes instead of underscores for METADATA.toml field names
Use dashes instead of underscores for METADATA.toml field names (#15614)
Rename requires to dependencies in METADATA files
[stubsabot] Bump requests to ~=2.33.0
[stubsabot] Bump requests to ~=2.33.0 (#15556)
[requests] Add requests.compat.JSONDecodeError
[requests] Add requests.compat.JSONDecodeError (#15545)
Also add a comment that JSONDecodeError may be imported from
simplejson if that is installed.
[requests] requests.exceptions.JSONDecodeError inherits from json.JSONDecodeError
[requests] requests.exceptions.JSONDecodeError inherits from json.JSONDecodeError (#15168)
[requests] Allow "connect" timeout to be None in timeout configuration tuple
[requests] Allow "connect" timeout to be None in timeout configuration tuple (#14700)
Mark stub-only private symbols as @type_check_only in third-party stubs
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
[requests] Update to 2.32.4
[requests] Update to 2.32.4 (#14254)
Co-authored-by: Sebastian Rittau Co-authored-by: Alex Waygood
Update mypy to 1.16.0 (#14194)
Co-authored-by: Sebastian Rittau srittau@rittau.biz Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
[requests] Add a _JSON type alias
[requests] Add a _JSON type alias (#14064)
[requests] Remove Session.redirect_cache
[requests] Remove Session.redirect_cache (#13723)
Update tools versions in stubtest workflow
Update tools versions in stubtest workflow (#13582)
Fix conflicting imports
Fix conflicting imports (#13561)
remove unneeded Iterable base class from CookieJar
remove unneeded Iterable base class from CookieJar (#12812)
Correct requests cookies argument
Correct requests cookies argument (#12654)
requests: Session.adapters is a mapping of Adapters
requests: Session.adapters is a mapping of Adapters (#12473)
Signed-off-by: Stephen Finucane stephen@that.guru
Add hint for requests.models.Response.raw
Add hint for requests.models.Response.raw (#12616)
requests: Add connection property (type HTTPAdapter) to the Response class
requests: Add connection property (type HTTPAdapter) to the Response class (#12279)
The Response instance is built by HTTPAdapter. When built, a property called connection is added to the Response that points back to the HTTPAdapter that created it. For example, this is used in the requests library's HTTPDigestAuth class to remake requests with credentials after authorization is requested by a server.
requests: Fix Response.content return type to include None
requests: Fix Response.content return type to include None (#12180)
[requests] Update to 2.32.3
[requests] Update to 2.32.3 (#12060)
Also replace some Any annotations with Incomplete and use Final in requests.__version__.
[requests] Update to 2.32.2 (#12000)
Also replace some Any annotations with Incomplete and use Final in requests.__version__.
[stubsabot] Bump requests to 2.32.*
[stubsabot] Bump requests to 2.32.* (#11991)
Release: https://pypi.org/pypi/requests/2.32.1 Homepage: https://requests.readthedocs.io Repository: https://github.com/psf/requests Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/requests Diff: https://github.com/psf/requests/compare/v2.31.0...v2.32.1
Stubsabot analysis of the diff between the two releases:
requests: export packages and utils
requests: export packages and utils (#11723)
requests: remove a type: ignore
requests: remove a type: ignore (#11704)
requests: annotate RequestsCookieJar
requests: annotate RequestsCookieJar (#11656)
Use PEP 570 syntax in third party stubs
Use PEP 570 syntax in third party stubs (#11554)
Bump mypy to 1.9, add to json.encoder, small fixups
Bump mypy to 1.9, add to json.encoder, small fixups (#11549)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
requests: Allow passing None header values
requests: Allow passing None header values (#11370)
https://github.com/python/typeshed/pull/7773 changed
requests.session.Session methods to accept None for header values, but
didn't do quite the same for the functions in requests.api. I think
this was a mistake. The functions in requests.api just pass through
the headers argument without doing anything in particular to it.
Furthermore, it's useful to be able to pass None as a header value:
because requests.utils.default_headers sets an Accept-Encoding
header by default, the easiest way to send a request with no
Accept-Encoding header is something like requests.get(url, headers={"Accept-Encoding": None}). It's annoying to have to construct
a Session just to pass type-checking.
It's a little confusing for the type alias to be called
_HeadersUpdateMapping in requests.sessions but _HeadersMapping in
requests.api; this is because the latter name was already used in
other type stubs (tensorflow.keras.callbacks), so it seemed best to
avoid breaking API.
Add parameter type to PreparedRequest.prepare_content_length
Add parameter type to PreparedRequest.prepare_content_length (#11304)
Update typing_extensions imports in third-party stubs
Update typing_extensions imports in third-party stubs (#11245)
requests: Use the Any trick in HTTPError
requests: Use the Any trick in HTTPError (#11207)
requests: annotate utils.get_encoding_from_headers()
requests: annotate utils.get_encoding_from_headers() (#10901)
[requests] Allow HTTPError.response to be None
[requests] Allow HTTPError.response to be None (#10875)
This aligns with the definition in requests, but means that user code might
need additional assertions to ensure that HTTPError.response is not None.
types-requests, types-influxdb-client: add note to the PyPI readme about the urllib3 pin
types-requests, types-influxdb-client: add note to the PyPI readme about the urllib3 pin (#10839)
Both types-requests and types-influxdb-client now depend on urllib3>=2 instead of types-urllib3. That in turn means that types-caldav, types-slumber a
Remove stubs for urllib3 (#10812)
Both types-requests and types-influxdb-client now depend on urllib3>=2 instead of types-urllib3. That in turn means that types-caldav, types-slumber and types-requests-oauthlib all depend indirectly on urllib3>=2, since all three stubs packages depend on types-requests.
[requests] loosen HTTPError constructor
[requests] loosen HTTPError constructor (#10776)
[requests] Allow PreparedRequest for RequestException(request=...)
[requests] Allow PreparedRequest for RequestException(request=...) (#10767)
[requests] Improve exception class constructors
[requests] Improve exception class constructors (#10740)
requests: type RequestException members (not Any)
requests: type RequestException members (not Any) (#8989)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
Add an upstream_repository field to METADATA.toml
Add an upstream_repository field to METADATA.toml (#10487)
Closes: #10478
Allowlist requests.compat.bytes.__buffer__
Allowlist requests.compat.bytes.buffer (#10231)
[stubsabot] Bump requests to 2.31.*
[stubsabot] Bump requests to 2.31.* (#10199)
Release: https://pypi.org/pypi/requests/2.31.0 Homepage: https://requests.readthedocs.io Diff: https://github.com/psf/requests/compare/v2.30.0...v2.31.0
Stubsabot analysis of the diff between the two releases:
requests/__version__.py, requests/sessions.py.[requests] Update stubs to 2.30
[requests] Update stubs to 2.30 (#10141)
Update requests for v2.29
Update requests for v2.29 (#10097)
Add defaults for third-party stubs Q-T
Add defaults for third-party stubs Q-T (#9959)
Add type to requests.models.RequestEncodingMixin.path_url
Add type to requests.models.RequestEncodingMixin.path_url (#9923)
We can see at https://github.com/psf/requests/blob/7f694b79e114c06fac5ec06019cada5a61e5570f/requests/models.py#L104 that this always returns a string.
Improve many __(a)exit__ annotations
Improve many __(a)exit__ annotations (#9696)
Stubtest settings: change ignore_missing_stub default to false
Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
Use typing_extensions.Self instead of _typeshed.Self
Use typing_extensions.Self instead of _typeshed.Self (#9702)
Improve pyright verification of third-party test cases in CI
Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam samuel.06@hotmail.com
Enable flake8-pyi's Y037
Enable flake8-pyi's Y037 (#9686)
Bump mypy to 1.0
Bump mypy to 1.0 (#9684)
Use OSError instead of IOError
Use OSError instead of IOError (#9683)
Replace Any with Incomplete in many places
Replace Any with Incomplete in many places (#9558)
Your coding agent can read these notes before it upgrades. Set up the MCP server →