Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
750bc3b
[aiofiles] `.name` on `NamedTempFile` is always a `str`
sobolevn Mar 12, 2025
40ce4a5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 12, 2025
060f471
[stubsabot] Bump tensorflow to ~=2.20.0
Aug 14, 2025
fa4f677
[stubsabot] Bump cachetools to 6.2.*
Aug 26, 2025
40aa5c2
[stubsabot] Bump cffi to 2.0.*
Sep 9, 2025
263694c
[stubsabot] Bump pyluach to 2.3.*
Sep 10, 2025
c69d757
[stubsabot] Bump auth0-python to 4.13.*
Sep 18, 2025
f3a9a20
[stubsabot] Bump gevent to 25.9.*
Sep 18, 2025
541d54f
[stubsabot] Bump pycurl to 7.45.7
Sep 25, 2025
8fa665a
[stubsabot] Bump pyperclip to 1.11.*
Sep 27, 2025
e380c28
[stubsabot] Bump aiofiles to 25.1.*
Oct 10, 2025
9a88cbc
[stubsabot] Bump fpdf2 to 2.8.5
Oct 30, 2025
60a08f8
[stubsabot] Bump Deprecated to ~=1.3.1
Oct 31, 2025
fc72b3d
[stubsabot] Bump protobuf to ~=6.33.2
Dec 7, 2025
17e53d6
[stubsabot] Bump ibm-db to 3.2.8
Dec 8, 2025
b6937a3
[stubsabot] Bump hdbcli to 2.27.*
Dec 17, 2025
50bc87e
[stubsabot] Bump docutils to 0.22.4
Dec 19, 2025
42652eb
[stubsabot] Bump geopandas to 1.1.2
Dec 23, 2025
3f4871a
[reportlab] Fix `__all__` in `rltempfile`
sobolevn Dec 24, 2025
95f59ac
[stubsabot] Bump Send2Trash to 2.0.*
Jan 1, 2026
ab93144
Update dependency mypy to v1.19.1
renovate[bot] Jan 1, 2026
7fbe683
debug
hauntsaninja Jan 1, 2026
b4bc449
more debug
hauntsaninja Jan 1, 2026
540ffc0
fixed Markdown
gmtestandreview Jan 1, 2026
35ef5ab
Merge branch 'main' of https://github.com/python/typeshed
gmtestandreview Jan 1, 2026
ef07aa6
typeshed: Update MAINTAINERS.md
gmtestandreview Jan 1, 2026
12c525c
Merge remote-tracking branch 'fork/issue-13551' into merge/all-branches
gmtestandreview Jan 1, 2026
12ee589
Merge remote-tracking branch 'fork/renovate/most-testlint-dependencie…
gmtestandreview Jan 1, 2026
134a11a
Merge remote-tracking branch 'fork/sobolevn-patch-1' into merge/all-b…
gmtestandreview Jan 1, 2026
8da0733
Merge remote-tracking branch 'fork/stubsabot/aiofiles' into merge/all…
gmtestandreview Jan 1, 2026
2eaab72
Merge remote-tracking branch 'fork/stubsabot/auth0-python' into merge…
gmtestandreview Jan 1, 2026
0f3c62c
Merge remote-tracking branch 'fork/stubsabot/cachetools' into merge/a…
gmtestandreview Jan 1, 2026
f3353dd
Merge remote-tracking branch 'fork/stubsabot/cffi' into merge/all-bra…
gmtestandreview Jan 1, 2026
205afa2
Merge remote-tracking branch 'fork/stubsabot/deprecated' into merge/a…
gmtestandreview Jan 1, 2026
e074270
Merge remote-tracking branch 'fork/stubsabot/docutils' into merge/all…
gmtestandreview Jan 1, 2026
c8bcbad
Merge remote-tracking branch 'fork/stubsabot/fpdf2' into merge/all-br…
gmtestandreview Jan 1, 2026
69970bd
Merge remote-tracking branch 'fork/stubsabot/geopandas' into merge/al…
gmtestandreview Jan 1, 2026
65c49d5
Merge remote-tracking branch 'fork/stubsabot/gevent' into merge/all-b…
gmtestandreview Jan 1, 2026
66e3388
Merge remote-tracking branch 'fork/stubsabot/hdbcli' into merge/all-b…
gmtestandreview Jan 1, 2026
7497b8a
Merge remote-tracking branch 'fork/stubsabot/ibm-db' into merge/all-b…
gmtestandreview Jan 1, 2026
82d2e2f
Merge remote-tracking branch 'fork/stubsabot/protobuf' into merge/all…
gmtestandreview Jan 1, 2026
69c44f3
Merge remote-tracking branch 'fork/stubsabot/pycurl' into merge/all-b…
gmtestandreview Jan 1, 2026
b079587
Merge remote-tracking branch 'fork/stubsabot/pyluach' into merge/all-…
gmtestandreview Jan 1, 2026
b4865f8
Merge remote-tracking branch 'fork/stubsabot/pyperclip' into merge/al…
gmtestandreview Jan 1, 2026
ca2ff38
Merge remote-tracking branch 'fork/stubsabot/send2trash' into merge/a…
gmtestandreview Jan 1, 2026
5008263
Merge remote-tracking branch 'fork/stubsabot/tensorflow' into merge/a…
gmtestandreview Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 79 additions & 82 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ it takes a bit longer. For more details, read below.

## Preparing the environment

### Code away!
### Code away
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the heading marker makes this line inconsistent with standard Markdown formatting. The original "##" indicates this is a second-level heading, which is the correct structure for documentation.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot open a new pull request to apply changes based on this feedback


Typeshed runs continuous integration (CI) on all pull requests. This means that
if you file a pull request (PR), our full test suite
Expand All @@ -36,6 +36,16 @@ This frees you up to ignore all local setup on your side, focus on the
code and rely on the CI to fix everything, or point you to the places that
need fixing.

### Code formatting

Typeshed uses `Black`, `Ruff`, and `Flake8` (with `flake8-pyi`) to enforce
formatting and style. CI will automatically apply many formatting fixes for
you, but you can run the same checks locally via `pre-commit`:

```bash
(.venv)$ pre-commit run --all-files
```

### ... Or create a local development environment

If you prefer to run the tests and formatting locally, it's
Expand All @@ -50,56 +60,39 @@ please refer to this

Note that some tests require extra setup steps to install the required dependencies.

<table>
<tr>
<td>Linux / macOS / WSL</td>
<td>

On Linux and macOS, you will be able to run the full test suite on Python
3.9-3.12.
To install the necessary requirements, run the following commands from a
terminal window:

```bash
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv)$ pip install -U pip
(.venv)$ pip install -r requirements-tests.txt
```

</td>
</tr>
<tr><!-- disables zebra striping --></tr>
<tr>
<td>Windows</td>
<td>

Run the following commands from a Windows terminal to install all requirements:

```powershell
> py -m venv .venv
> .venv\Scripts\activate
(.venv) > python -m pip install -U pip
(.venv) > pip install -r requirements-tests.txt
```

</td>
</tr>
<tr><!-- disables zebra striping --></tr>
<tr>
<td>Using uv</td>
<td>

If you already have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed, you can simply replace the commands above with:

```shell
uv venv
uv pip install -r requirements-tests.txt
```

</td>
</tr>
</table>
### Linux / macOS / WSL

On Linux and macOS, you will be able to run the full test suite on Python
3.9-3.12.
To install the necessary requirements, run the following commands from a
terminal window:

```bash
$ python3 -m venv .venv
$ source .venv/bin/activate
(.venv)$ pip install -U pip
(.venv)$ pip install -r requirements-tests.txt
```

### Windows

Run the following commands from a Windows terminal to install all requirements:

```powershell
> py -m venv .venv
> .venv\Scripts\activate
(.venv) > python -m pip install -U pip
(.venv) > pip install -r requirements-tests.txt
```

### Using uv

If you already have [uv](https://docs.astral.sh/uv/getting-started/installation/) installed, you can simply replace the commands above with:

```shell
uv venv
uv pip install -r requirements-tests.txt
```

## Where to make changes

Expand All @@ -121,6 +114,7 @@ to use syntax and typing features not supported by that version.
### Third-party library stubs

We accept stubs for third-party packages into typeshed as long as:

* the package is publicly available on the [Python Package Index](https://pypi.org/);
* the package supports any Python version supported by typeshed; and
* the package does not ship with its own stubs or type annotations.
Expand All @@ -129,6 +123,7 @@ The fastest way to generate new stubs is to use `scripts/create_baseline_stubs.p

Stubs for third-party packages go into the `stubs` directory. Each subdirectory
there represents a PyPI distribution, and contains the following:

* `METADATA.toml`, describing the package. See below for details.
* Stubs (i.e. `*.pyi` files) for packages and modules that are shipped in the
source distribution.
Expand All @@ -155,9 +150,9 @@ supported:

* `version`: The versions of the library that the stubs support. Two
formats are supported:
- A concrete version. This is especially suited for libraries that
* A concrete version. This is especially suited for libraries that
use [Calendar Versioning](https://calver.org/).
- A version range ending in `.*`. This is suited for libraries that
* A version range ending in `.*`. This is suited for libraries that
reflect API changes in the version number only, where the API-independent
part is represented by the asterisk. In the case
of [Semantic Versioning](https://semver.org/), this version could look
Expand Down Expand Up @@ -197,6 +192,7 @@ supported:

In addition, we specify configuration for stubtest in the `tool.stubtest` table.
This has the following keys:

* `skip` (default: `false`): Whether stubtest should be run against this
package. Please avoid setting this to `true`, and add a comment if you have
to.
Expand Down Expand Up @@ -235,7 +231,6 @@ distribution.
The format of all `METADATA.toml` files can be checked by running
`python3 ./tests/check_typeshed_structure.py`.


## Making Changes

### Before you begin
Expand Down Expand Up @@ -279,8 +274,9 @@ constants, etc.) of the module they cover, but it is not always
clear exactly what is part of the interface.

The following should always be included:
- All objects listed in the module's documentation.
- All objects included in ``__all__`` (if present).

* All objects listed in the module's documentation.
* All objects included in ``__all__`` (if present).

Other objects may be included if they are being used in practice
or if they are not prefixed with an underscore. This means
Expand Down Expand Up @@ -350,35 +346,36 @@ be used in typeshed as soon as the PEP has been accepted and implemented
and most type checkers support the new feature.

Supported features include:
- [PEP 544](https://peps.python.org/pep-0544/) (Protocol)
- [PEP 585](https://peps.python.org/pep-0585/) (builtin generics)
- [PEP 586](https://peps.python.org/pep-0586/) (Literal)
- [PEP 591](https://peps.python.org/pep-0591/) (Final/@final)
- [PEP 589](https://peps.python.org/pep-0589/) (TypedDict)
- [PEP 604](https://peps.python.org/pep-0604/) (`Foo | Bar` union syntax)
- [PEP 612](https://peps.python.org/pep-0612/) (ParamSpec)
- [PEP 647](https://peps.python.org/pep-0647/) (TypeGuard):

* [PEP 544](https://peps.python.org/pep-0544/) (Protocol)
* [PEP 585](https://peps.python.org/pep-0585/) (builtin generics)
* [PEP 586](https://peps.python.org/pep-0586/) (Literal)
* [PEP 591](https://peps.python.org/pep-0591/) (Final/@final)
* [PEP 589](https://peps.python.org/pep-0589/) (TypedDict)
* [PEP 604](https://peps.python.org/pep-0604/) (`Foo | Bar` union syntax)
* [PEP 612](https://peps.python.org/pep-0612/) (ParamSpec)
* [PEP 647](https://peps.python.org/pep-0647/) (TypeGuard):
see [#5406](https://github.com/python/typeshed/issues/5406)
- [PEP 655](https://peps.python.org/pep-0655/) (`Required` and `NotRequired`)
- [PEP 673](https://peps.python.org/pep-0673/) (`Self`)
- [PEP 675](https://peps.python.org/pep-0675/) (`LiteralString`)
- [PEP 702](https://peps.python.org/pep-0702/) (`@deprecated()`)
* [PEP 655](https://peps.python.org/pep-0655/) (`Required` and `NotRequired`)
* [PEP 673](https://peps.python.org/pep-0673/) (`Self`)
* [PEP 675](https://peps.python.org/pep-0675/) (`LiteralString`)
* [PEP 702](https://peps.python.org/pep-0702/) (`@deprecated()`)

Features from the `typing` module that are not present in all
supported Python versions must be imported from `typing_extensions`
instead in typeshed stubs. This currently affects:

- `TypeAlias` (new in Python 3.10)
- `Concatenate` (new in Python 3.10)
- `ParamSpec` (new in Python 3.10)
- `TypeGuard` (new in Python 3.10)
- `Self` (new in Python 3.11)
- `Never` (new in Python 3.11)
- `LiteralString` (new in Python 3.11)
- `TypeVarTuple` and `Unpack` (new in Python 3.11)
- `Required` and `NotRequired` (new in Python 3.11)
- `Buffer` (new in Python 3.12; in the `collections.abc` module)
- `@deprecated` (new in Python 3.13; in the `warnings` module)
* `TypeAlias` (new in Python 3.10)
* `Concatenate` (new in Python 3.10)
* `ParamSpec` (new in Python 3.10)
* `TypeGuard` (new in Python 3.10)
* `Self` (new in Python 3.11)
* `Never` (new in Python 3.11)
* `LiteralString` (new in Python 3.11)
* `TypeVarTuple` and `Unpack` (new in Python 3.11)
* `Required` and `NotRequired` (new in Python 3.11)
* `Buffer` (new in Python 3.12; in the `collections.abc` module)
* `@deprecated` (new in Python 3.13; in the `warnings` module)

Some type checkers implicitly promote the `bytearray` and
`memoryview` types to `bytes`.
Expand Down Expand Up @@ -462,10 +459,10 @@ We sometimes use the ["status: deferred" label](https://github.com/python/typesh
to mark PRs and issues that we'd like to accept, but that are blocked by some
external factor. Blockers can include:

- An unambiguous bug in a type checker (i.e., a case where the
* An unambiguous bug in a type checker (i.e., a case where the
type checker is not implementing [the typing spec](https://typing.readthedocs.io/en/latest/spec/index.html)).
- A dependency on a typing PEP that is still under consideration.
- A pending change in a related project, such as stub-uploader.
* A dependency on a typing PEP that is still under consideration.
* A pending change in a related project, such as stub-uploader.

### Closing stale PRs

Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
At present the active maintainers are (alphabetically):
# At present the active maintainers are (alphabetically)

* Rebecca Chen (@rchen152)
* Jukka Lehtosalo (@JukkaL)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ it before submitting pull requests; do not report issues with annotations to
the project the stubs are for, but instead report them here to typeshed.**

Further documentation on stub files, typeshed, and Python's typing system in
general, can also be found at https://typing.readthedocs.io/en/latest/.
general, can also be found at <https://typing.readthedocs.io/en/latest/>.

Typeshed supports Python versions 3.9 to 3.14.

Expand All @@ -35,7 +35,7 @@ be installed from PyPI. For example, if you are using `html5lib` and `requests`,
you can install the type stubs using

```bash
$ pip install types-html5lib types-requests
pip install types-html5lib types-requests
```

These PyPI packages follow [PEP 561](http://www.python.org/dev/peps/pep-0561/)
Expand Down
2 changes: 1 addition & 1 deletion requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Type checkers that we test our stubs against. These should always
# be pinned to a specific version to make failure reproducible.
mypy==1.18.2
mypy==1.19.1
pyright==1.1.407

# Libraries used by our various scripts.
Expand Down
2 changes: 1 addition & 1 deletion stubs/Send2Trash/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "1.8.*"
version = "2.0.*"
upstream_repository = "https://github.com/arsenetar/send2trash"
3 changes: 1 addition & 2 deletions stubs/aiofiles/aiofiles/threadpool/text.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from _typeshed import FileDescriptorOrPath
from collections.abc import Iterable
from typing import BinaryIO, type_check_only

Expand Down Expand Up @@ -35,7 +34,7 @@ class _UnknownAsyncTextIO(AsyncBase[str]):
@property
def newlines(self) -> str | tuple[str, ...] | None: ...
@property
def name(self) -> FileDescriptorOrPath: ...
def name(self) -> str: ...
@property
def mode(self) -> str: ...

Expand Down
2 changes: 1 addition & 1 deletion stubs/auth0-python/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "4.10.*"
version = "4.13.*"
upstream_repository = "https://github.com/auth0/auth0-python"
requires = ["cryptography", "types-requests"]
2 changes: 1 addition & 1 deletion stubs/cffi/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.17.*"
version = "2.0.*"
upstream_repository = "https://github.com/python-cffi/cffi/"
requires = ["types-setuptools"]

Expand Down
2 changes: 1 addition & 1 deletion stubs/docutils/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "0.22.3"
version = "0.22.4"
upstream_repository = "https://sourceforge.net/p/docutils/code"
2 changes: 1 addition & 1 deletion stubs/fpdf2/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.8.4"
version = "2.8.5"
upstream_repository = "https://github.com/PyFPDF/fpdf2"
requires = ["Pillow>=10.3.0"]

Expand Down
2 changes: 1 addition & 1 deletion stubs/hdbcli/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "2.25.*"
version = "2.27.*"
# upstream_repository = closed-source
2 changes: 1 addition & 1 deletion stubs/ibm-db/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version = "3.2.6"
version = "3.2.8"
upstream_repository = "https://github.com/ibmdb/python-ibmdb"
2 changes: 1 addition & 1 deletion stubs/protobuf/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using an exact number in the specifier for scripts/sync_protobuf/google_protobuf.py
# When updating, also re-run the script
version = "~=6.32.1"
version = "~=6.33.2"
upstream_repository = "https://github.com/protocolbuffers/protobuf"
extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 31.1 on [protobuf v32.1](https://github.com/protocolbuffers/protobuf/releases/tag/v32.1) (python `protobuf==6.32.1`)."
partial_stub = true
Expand Down
2 changes: 1 addition & 1 deletion stubs/pyperclip/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.9.*"
version = "1.11.*"
upstream_repository = "https://github.com/asweigart/pyperclip"

[tool.stubtest]
Expand Down
2 changes: 1 addition & 1 deletion stubs/reportlab/reportlab/lib/rltempfile.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def get_rl_tempdir(*subdirs: str) -> str: ...
def get_rl_tempfile(fn: str | None = None) -> str: ...

__all__ = ("get_rl_tempdir", "get_rl_tempdir")
__all__ = ("get_rl_tempdir", "get_rl_tempfile")
2 changes: 1 addition & 1 deletion stubs/tensorflow/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using an exact number in the specifier for scripts/sync_protobuf/tensorflow.py
# When updating, also re-run the script
version = "~=2.18.0"
version = "~=2.20.0"
upstream_repository = "https://github.com/tensorflow/tensorflow"
# requires a version of numpy with a `py.typed` file
requires = ["numpy>=1.20", "types-protobuf", "types-requests"]
Expand Down
Loading
Loading