NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #254 most downloaded on PyPI
Typing stubs for requests
Last release 25 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.
requests: set session.headers to MutableMapping
requests: set session.headers to MutableMapping (#9395)
requests: types for auth username and password
requests: types for auth username and password (#9389)
Always use bool and Literal for Python compat code
Always use bool and Literal for Python compat code (#9213)
Annotate known magic-method return types
Annotate known magic-method return types (#9131)
Fix and allow classes with missing metaclasses
Fix and allow classes with missing metaclasses (#9136)
Mark requests stubs as complete
Mark requests stubs as complete (#8858)
Co-authored-by: Kevin Kirsche kevin.kirsche@one.verizon.com
requests: Add regression test for #8762
requests: Add regression test for #8762 (#8835)
The final mypy_primer report for #8762 was an empty diff. Considering the number of issues we've had with our requests stubs over the last year, it feels like it makes sense to add a test case to make sure that it doesn't regress.
This allows to pass an Iterable[bytes] for streaming request data.
requests: improve _Data type (#8762)
requests: improve _Data type
This allows to pass an Iterable[bytes] for streaming request data.
Add infrastructure allowing for test cases for third-party stubs
Add infrastructure allowing for test cases for third-party stubs (#8700)
tests/mypy_test.py to a separate script, tests/regr_test.py.tests/mypy_test.py and tests/regr_test.py into tests/colors.py, and rename tests/colors.py to tests/utils.py.tests/check_consistent.py, to enforce the use of # pyright: reportUnnecessaryTypeIgnoreComment=true comments in third-party test cases. These are essential if we want to have our tests against false-negatives work with pyright.tests.yml GitHub workflow, to run the new test in CI.requests, as a regression test for #7998.Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com Co-authored-by: Sebastian Rittau srittau@rittau.biz
Support extras in stubtest_third_party.py
Support extras in stubtest_third_party.py (#8467)
requests.adapters: use re-exports rather than assignments
requests.adapters: use re-exports rather than assignments (#8485)
Add requests.help submodule (#8486)
Add requests.__version__; improve requests.__init__ (#8484)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
requests: fix stubtest
requests: fix stubtest (#8463)
Remove or move several TypeAlias declarations
Remove or move several TypeAlias declarations (#8444)
requests: add type hints to requests.utils
requests: add type hints to requests.utils (#8395)
Co-authored-by: Shantanu 12621235+hauntsaninja@users.noreply.github.com
Add missing re-exports and vars to requests.compat
Add missing re-exports and vars to requests.compat (#8396)
requests: add annotation for parse_header_links
requests: add annotation for parse_header_links (#8349)
In the requests package the function utils.parse_header_links()
takes a str as input and returns a list of dictionaries.
This can be seen in the unit tests that are used: https://github.com/psf/requests/blob/786255613bd92f87c9c8f066c4271aab1b9eeaad/tests/test_utils.py#L644-L664
requests: Annotate Session.merge_environment_settings
requests: Annotate Session.merge_environment_settings (#8313)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com
Turn requests.requests.packages into a module
Turn requests.requests.packages into a module (#8281)
Remove obsolete class VendorAlias
[stubsabot] Bump requests to 2.28.*
[stubsabot] Bump requests to 2.28.* (#8152)
Co-authored-by: hauntsaninja <>
requests, regex: use re-exports instead of assignments in a few places
requests, regex: use re-exports instead of assignments in a few places (#8127)
requests: expand types for files
requests: expand types for files (#7999)
Third-party stubs: fix several fictitious type aliases
Third-party stubs: fix several fictitious type aliases (#7958)
requests: allow immutable headers
requests: allow immutable headers (#7932)
Mutating hooks, as in session.hooks['response'] = ..., should work. Reassigning it like session.hooks = ... is probably a bad idea, so it will always
Fix requests.Session().hooks (#7871)
Fixes #7776
Mutating hooks, as in session.hooks['response'] = ..., should work. Reassigning it like session.hooks = ... is probably a bad idea, so it will always be a dict.
requests: Fix type of request headers
requests: Fix type of request headers (#7773)
Allow bytes values. In Session methods, None can be used to ignore the session's headers.
Delete python 2 branches from third-party stubs
Delete python 2 branches from third-party stubs (#7741)
Since #7703, we no longer have third-party stubs that support Python 2, so code like if sys.version_info >= (3, 0) can be simplified.
requests: allow non-mutable Mapping for files/hooks parameters
requests: allow non-mutable Mapping for files/hooks parameters (#7732)
requests: allow str and bytes for fileobj in files parameter
requests: allow str and bytes for fileobj in files parameter (#7728)
requests: allow str and bytes for fileobj in files parameter
requests: Use SupportsRead instead of IO for files
requests: Add None to a type alias
requests: Add None to a type alias (#7721)
Fixes #7720
Add more typing hints for requests
Add more typing hints for requests (#7696)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com Co-authored-by: Akuli akuviljanen17@gmail.com
Use TypeAlias for type aliases where possible, part II
Use TypeAlias for type aliases where possible, part II (#7667)
Third-party stubs: import from collections.abc where possible
Third-party stubs: import from collections.abc where possible (#7637)
Use imports instead of TypeAliases in a couple places
Use imports instead of TypeAliases in a couple places (#7634)
Fixes #7632
Use TypeAlias where possible for type aliases
Third-party stubs: Improve several __exit__ methods
Third-party stubs: Improve several __exit__ methods (#7575)
A string / bytes which is a path to a certfile
requests: Update adapters.pyi (#7544)
The cert can be
The tuple could be anything indexable, but there are strict requirement to actualle have two items, don't know if there is something more generic
See https://github.com/psf/requests/blob/main/requests/adapters.py#L242-L248
PEP 604: Remove some more uses of Union/Optional
PEP 604: Remove some more uses of Union/Optional (#7515)
The following patterns still break mypy:
type[] at top level failstuple[T1, T2] at top level fails (but tuple[T1, ...] is fine)T1 | Callable[..., T2 | T3] fails, but only <=3.9This PR cleans up usage of Union and Optional outside these patterns.
Use PEP 604 syntax wherever possible
Use PEP 604 syntax wherever possible (#7493)
requests stubs are not Python 2-compatible
requests stubs are not Python 2-compatible (#7483)
Correct several positional-only differences in third-party stubs
Correct several positional-only differences in third-party stubs (#7352)
Remove unused allowlist entries in babel and requests
Remove unused allowlist entries in babel and requests (#7233)
Added missing import for JSONDecodeError
Added missing import for JSONDecodeError (#7171)
Co-authored-by: DataGhost git@dataghost.com
requests.Session: Accept hooks and lists of hooks
requests.Session: Accept hooks and lists of hooks (#7094)
requests: remove an unused allowlist entry
requests: remove an unused allowlist entry (#6911)
requests: Remove an unused allowlist entry
requests: Remove an unused allowlist entry (#6897)
Always use _typeshed.Self, where applicable
Always use _typeshed.Self, where applicable (#6880)
Always use _typeshed.Self, where applicable
Revert changes to google-cloud-ndb (ambiguous)
Remove empty line added by script
Revert changes to stubs/python-dateutil/dateutil/relativedelta.pyi
Manually add a few more that the script missed
Improve filelock annotation
Source code here: https://github.com/tox-dev/py-filelock/blob/79ec7b2826e33b982fe83b057f359448b9d966ba/src/filelock/_api.py#L207
opentracing/scope annotationSource code here: https://github.com/opentracing/opentracing-python/blob/3e1d357a348269ef54d67f761302fab93dbfc0f7/opentracing/scope.py#L71
redis/client stubSource code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/client.py#L1217
redis/lock annotationSource code here: https://github.com/redis/redis-py/blob/15f315a496c3267c8cbcc6d6d9c6005ea4d4a4d5/redis/lock.py#L155
requests/models annotationSource code here: https://github.com/psf/requests/blob/d718e753834b84018014a23d663369ac27d1ab9c/requests/models.py#L653
Remove unused requests allowlist entry
Remove unused requests allowlist entry (#6882)
Use lowercase type everywhere (#6853) Use types-urllib3 for requests
Update pyright
Update pyright (#6840)
Nothing published for this version
requests: Add JSONDecodeError
requests: Add JSONDecodeError (#6838)
Use PEP 585 syntax wherever possible
Use PEP 585 syntax wherever possible (#6717)
Co-authored-by: Alex Waygood Co-authored-by: Jelle Zijlstra Co-authored-by: Sebastian Rittau Co-authored-by: Akuli
Use stubtest 0.920 (#6589)
Co-authored-by: Alex Waygood Alex.Waygood@Gmail.com Co-authored-by: Jelle Zijlstra jelle.zijlstra@gmail.com Co-authored-by: Sebastian Rittau srittau@rittau.biz Co-authored-by: Akuli akuviljanen17@gmail.com
Add mypy error codes to '# type: ignore' comments
Add mypy error codes to '# type: ignore' comments (#6379)
Add some kwonly arguments to Session.send()
Add some kwonly arguments to Session.send() (#6266)
Bump version to 2.26
Remove BaseAdapter from requests.sessions
Remove BaseAdapter from requests.sessions (#6264)
Use lowercase tuple where possible
Use lowercase tuple where possible (#6170)
Add star to all non-0.1 versions
Add star to all non-0.1 versions (#6146)
requests: Response.encoding can be None
requests: Response.encoding can be None (#6067)
The type of the encoding attribute was previously typed as str, even though it can be None at runtime.
Update Session.prepare_request, .get_adapter
Update Session.prepare_request, .get_adapter (#6058)
Your coding agent can read these notes before it upgrades. Set up the MCP server →