Skip to content

Commit 379fb74

Browse files
Merge branch 'main' into mapping_get_overloads
2 parents f759594 + 6e3b4fa commit 379fb74

1,312 files changed

Lines changed: 10472 additions & 9267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/renovate.json5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"suppressNotifications": ["prEditedNotification"],
55
"extends": ["config:recommended"],
66
"labels": ["bot: dependencies"],
7+
"rebaseLabel": ["bot: rebase"],
78
"semanticCommits": "disabled",
89
"separateMajorMinor": false,
910
"prHourlyLimit": 10,

.github/workflows/daily.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ jobs:
3535
strategy:
3636
matrix:
3737
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
38+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
39+
exclude:
40+
# https://github.com/python/typeshed/issues/15694
41+
- os: "windows-latest"
42+
python-version: "3.10"
3943
fail-fast: false
4044

4145
steps:

.github/workflows/meta_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
version-file: "requirements-tests.txt"
6262
- run: uv pip install -r requirements-tests.txt --system
6363
- name: Run pyright on typeshed
64-
uses: jakebailey/pyright-action@v2
64+
uses: jakebailey/pyright-action@v3
6565
with:
6666
version: PATH
6767
python-platform: ${{ matrix.python-platform }}

.github/workflows/mypy_primer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ jobs:
6262
run: |
6363
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
6464
- name: Upload mypy_primer diff + PR number
65-
uses: actions/upload-artifact@v6
65+
uses: actions/upload-artifact@v7
6666
if: ${{ matrix.shard-index == 0 }}
6767
with:
6868
name: mypy_primer_diffs-${{ matrix.shard-index }}
6969
path: |
7070
diff_${{ matrix.shard-index }}.txt
7171
pr_number.txt
7272
- name: Upload mypy_primer diff
73-
uses: actions/upload-artifact@v6
73+
uses: actions/upload-artifact@v7
7474
if: ${{ matrix.shard-index != 0 }}
7575
with:
7676
name: mypy_primer_diffs-${{ matrix.shard-index }}
@@ -84,7 +84,7 @@ jobs:
8484
contents: read
8585
steps:
8686
- name: Merge artifacts
87-
uses: actions/upload-artifact/merge@v6
87+
uses: actions/upload-artifact/merge@v7
8888
with:
8989
name: mypy_primer_diffs
9090
pattern: mypy_primer_diffs-*

.github/workflows/stubtest_stdlib.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
34-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
34+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
35+
exclude:
36+
# https://github.com/python/typeshed/issues/15694
37+
- os: "windows-latest"
38+
python-version: "3.10"
3539
fail-fast: false
3640

3741
steps:

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
matrix:
4444
platform: ["linux", "win32", "darwin"]
45-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
45+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
4646
fail-fast: false
4747
steps:
4848
- uses: actions/checkout@v6
@@ -83,6 +83,8 @@ jobs:
8383
runs-on: ubuntu-latest
8484
strategy:
8585
matrix:
86+
# TODO: Add 3.15 once pyright CI can avoid installing third-party
87+
# runtime dependency stacks that do not support Python 3.15 yet.
8688
python-platform: ["Linux", "Windows", "Darwin"]
8789
python-version: ["3.11", "3.12", "3.13", "3.14"]
8890
fail-fast: false
@@ -118,22 +120,22 @@ jobs:
118120
- name: List 3rd-party stub dependencies installed
119121
run: uv pip freeze
120122
- name: Run pyright with basic settings on all the stubs
121-
uses: jakebailey/pyright-action@v2
123+
uses: jakebailey/pyright-action@v3
122124
with:
123125
version: PATH
124126
python-platform: ${{ matrix.python-platform }}
125127
python-version: ${{ matrix.python-version }}
126128
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
127129
- name: Run pyright with stricter settings on some of the stubs
128-
uses: jakebailey/pyright-action@v2
130+
uses: jakebailey/pyright-action@v3
129131
with:
130132
version: PATH
131133
python-platform: ${{ matrix.python-platform }}
132134
python-version: ${{ matrix.python-version }}
133135
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
134136
project: ./pyrightconfig.stricter.json
135137
- name: Run pyright on the test cases
136-
uses: jakebailey/pyright-action@v2
138+
uses: jakebailey/pyright-action@v3
137139
with:
138140
version: PATH
139141
python-platform: ${{ matrix.python-platform }}

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
args: [--fix=lf]
1212
- id: check-case-conflict
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.14.10 # must match requirements-tests.txt
14+
rev: v0.15.9 # must match requirements-tests.txt
1515
hooks:
1616
- id: ruff
1717
name: Run ruff on stubs, tests and scripts
@@ -27,7 +27,7 @@ repos:
2727
- "--unsafe-fixes"
2828
files: '.*test_cases/.+\.py$'
2929
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 25.12.0
30+
rev: 26.3.1
3131
hooks:
3232
- id: black
3333
- repo: https://github.com/pycqa/flake8
@@ -36,7 +36,7 @@ repos:
3636
- id: flake8
3737
language: python
3838
additional_dependencies:
39-
- "flake8-pyi==25.5.0"
39+
- "flake8-pyi==26.5.0"
4040
types: [file]
4141
types_or: [python, pyi]
4242
- repo: meta

CONTRIBUTING.md

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -163,33 +163,33 @@ supported:
163163
When the stubs are updated to a newer version
164164
of the library, the version of the stub should be bumped (note that
165165
previous versions are still available on PyPI).
166-
* `requires` (optional): A list of other stub packages or packages with type
166+
* `dependencies` (optional): A list of other stub packages or packages with type
167167
information that are imported by the stubs in this package. Only packages
168168
generated by typeshed or required by the upstream package are allowed to
169169
be listed here, for security reasons. See
170170
[this issue](https://github.com/typeshed-internal/stub_uploader/issues/90)
171171
for more information about what external dependencies are allowed.
172-
* `extra_description` (optional): Can be used to add a custom description to
172+
* `extra-description` (optional): Can be used to add a custom description to
173173
the package's long description. It should be a multi-line string in
174174
Markdown format.
175-
* `stub_distribution` (optional): Distribution name to be uploaded to PyPI.
175+
* `stub-distribution` (optional): Distribution name to be uploaded to PyPI.
176176
This defaults to `types-<distribution>` and should only be set in special
177177
cases.
178-
* `upstream_repository` (recommended): The URL of the upstream repository.
179-
* `obsolete_since` (optional): This field is part of our process for
178+
* `upstream-repository` (recommended): The URL of the upstream repository.
179+
* `obsolete-since` (optional): This field is part of our process for
180180
[removing obsolete third-party libraries](#third-party-library-removal-policy).
181181
It contains the first version of the corresponding library that ships
182182
its own `py.typed` file.
183-
* `no_longer_updated` (optional): This field is set to `true` before removing
183+
* `no-longer-updated` (optional): This field is set to `true` before removing
184184
stubs for other reasons than the upstream library shipping with type
185185
information.
186186
* `upload` (optional): This field is set to `false` to prevent automatic
187187
uploads to PyPI. This should only be used in special cases, e.g. when the stubs
188188
break the upload.
189-
* `partial_stub` (optional): This field marks the type stub package as
189+
* `partial-stub` (optional): This field marks the type stub package as
190190
[partial](https://peps.python.org/pep-0561/#partial-stub-packages). This is for
191191
3rd-party stubs that don't cover the entirety of the package's public API.
192-
* `requires_python` (optional): The minimum version of Python required to install
192+
* `requires-python` (optional): The minimum version of Python required to install
193193
the type stub package. It must be in the form `>=3.*`. If omitted, the oldest
194194
Python version supported by typeshed is used.
195195

@@ -198,36 +198,36 @@ This has the following keys:
198198
* `skip` (default: `false`): Whether stubtest should be run against this
199199
package. Please avoid setting this to `true`, and add a comment if you have
200200
to.
201-
* `ignore_missing_stub`: When set to `true`, this will add the
202-
`--ignore_missing_stub` option to the stubtest call. See
201+
* `ignore-missing-stub`: When set to `true`, this will add the
202+
`--ignore-missing-stub` option to the stubtest call. See
203203
[tests/README.md](./tests/README.md) for more information. In most cases,
204-
this field should be identical to `partial_stub`.
205-
* `stubtest_requirements` (default: `[]`): A list of Python packages that need
204+
this field should be identical to `partial-stub`.
205+
* `stubtest-dependencies` (default: `[]`): A list of Python packages that need
206206
to be installed for stubtest to run successfully. These packages are installed
207-
in addition to the requirements in the `requires` field.
208-
* `apt_dependencies` (default: `[]`): A list of Ubuntu APT packages
207+
in addition to the dependencies in the `dependencies` field.
208+
* `apt-dependencies` (default: `[]`): A list of Ubuntu APT packages
209209
that need to be installed for stubtest to run successfully.
210-
* `brew_dependencies` (default: `[]`): A list of MacOS Homebrew packages
210+
* `brew-dependencies` (default: `[]`): A list of MacOS Homebrew packages
211211
that need to be installed for stubtest to run successfully
212-
* `choco_dependencies` (default: `[]`): A list of Windows Chocolatey packages
212+
* `choco-dependencies` (default: `[]`): A list of Windows Chocolatey packages
213213
that need to be installed for stubtest to run successfully
214-
* `supported_platforms` (default: all platforms): A list of OSes on which
214+
* `supported-platforms` (default: all platforms): A list of OSes on which
215215
stubtest can be run. When a package is not platform-specific, this should
216216
not be set. If the package is platform-specific, this should usually be set
217217
to the supported platforms, unless stubtest is known to fail on a
218218
specific platform.
219-
* `ci_platforms` (default: `["linux"]`): A list of OSes on which to run
219+
* `ci-platforms` (default: `["linux"]`): A list of OSes on which to run
220220
stubtest as part of our continuous integration (CI) tests. Can contain
221221
`win32`, `linux`, and `darwin` values. If not specified, stubtest is run
222222
only on `linux`. Only add extra OSes to the test if there are
223223
platform-specific branches in a stubs package.
224-
* `mypy_plugins` (default: `[]`): A list of Python modules to use as mypy plugins
225-
when running stubtest. For example: `mypy_plugins = ["mypy_django_plugin.main"]`
226-
* `mypy_plugins_config` (default: `{}`): A dictionary mapping plugin names to their
224+
* `mypy-plugins` (default: `[]`): A list of Python modules to use as mypy plugins
225+
when running stubtest. For example: `mypy-plugins = ["mypy_django_plugin.main"]`
226+
* `mypy-plugins-config` (default: `{}`): A dictionary mapping plugin names to their
227227
configuration dictionaries for use by mypy plugins. For example:
228-
`mypy_plugins_config = {"django-stubs" = {"django_settings_module" = "@tests.django_settings"}}`
228+
`mypy-plugins-config = {"django-stubs" = {"django_settings_module" = "@tests.django_settings"}}`
229229

230-
`*_dependencies` are usually packages needed to `pip install` the implementation
230+
`*-dependencies` are usually packages needed to `pip install` the implementation
231231
distribution.
232232

233233
The format of all `METADATA.toml` files can be checked by running
@@ -366,10 +366,6 @@ Features from the `typing` module that are not present in all
366366
supported Python versions must be imported from `typing_extensions`
367367
instead in typeshed stubs. This currently affects:
368368

369-
- `TypeAlias` (new in Python 3.10)
370-
- `Concatenate` (new in Python 3.10)
371-
- `ParamSpec` (new in Python 3.10)
372-
- `TypeGuard` (new in Python 3.10)
373369
- `Self` (new in Python 3.11)
374370
- `Never` (new in Python 3.11)
375371
- `LiteralString` (new in Python 3.11)
@@ -436,7 +432,7 @@ following criteria is met:
436432

437433
Case 1: If a package ships its own `py.typed` file, please follow these steps:
438434

439-
1. Make sure **stubsabot** open a PR that sets the `obsolete_since` field in the
435+
1. Make sure **stubsabot** open a PR that sets the `obsolete-since` field in the
440436
`METADATA.toml` file to the first version of the package that shipped `py.typed`.
441437
2. After at least six months, make sure **stubsabot** open a PR to remove the stubs.
442438

@@ -446,7 +442,7 @@ these steps:
446442
1. Open an issue explaining why the stubs should be removed.
447443
2. A maintainer will add the
448444
["stubs: removal" label](https://github.com/python/typeshed/labels/%22stubs%3A%20removal%22).
449-
3. Open a PR that sets the `no_longer_updated` field in the `METADATA.toml`
445+
3. Open a PR that sets the `no-longer-updated` field in the `METADATA.toml`
450446
file to `true`.
451447
4. When a new version of the package was automatically uploaded to PyPI (which
452448
can take up to a day), make sure **stubsabot** open a PR to remove the stubs.

0 commit comments

Comments
 (0)