Skip to content

Commit e67d7f0

Browse files
authored
Merge branch 'main' into mailbox-improvements
2 parents 9022c78 + aaefc85 commit e67d7f0

File tree

616 files changed

+3985
-3036
lines changed

Some content is hidden

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

616 files changed

+3985
-3036
lines changed

.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/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/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,22 @@ jobs:
118118
- name: List 3rd-party stub dependencies installed
119119
run: uv pip freeze
120120
- name: Run pyright with basic settings on all the stubs
121-
uses: jakebailey/pyright-action@v2
121+
uses: jakebailey/pyright-action@v3
122122
with:
123123
version: PATH
124124
python-platform: ${{ matrix.python-platform }}
125125
python-version: ${{ matrix.python-version }}
126126
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
127127
- name: Run pyright with stricter settings on some of the stubs
128-
uses: jakebailey/pyright-action@v2
128+
uses: jakebailey/pyright-action@v3
129129
with:
130130
version: PATH
131131
python-platform: ${{ matrix.python-platform }}
132132
python-version: ${{ matrix.python-version }}
133133
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
134134
project: ./pyrightconfig.stricter.json
135135
- name: Run pyright on the test cases
136-
uses: jakebailey/pyright-action@v2
136+
uses: jakebailey/pyright-action@v3
137137
with:
138138
version: PATH
139139
python-platform: ${{ matrix.python-platform }}

.pre-commit-config.yaml

Lines changed: 2 additions & 2 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

CONTRIBUTING.md

Lines changed: 25 additions & 25 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
@@ -436,7 +436,7 @@ following criteria is met:
436436

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

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

@@ -446,7 +446,7 @@ these steps:
446446
1. Open an issue explaining why the stubs should be removed.
447447
2. A maintainer will add the
448448
["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`
449+
3. Open a PR that sets the `no-longer-updated` field in the `METADATA.toml`
450450
file to `true`.
451451
4. When a new version of the package was automatically uploaded to PyPI (which
452452
can take up to a day), make sure **stubsabot** open a PR to remove the stubs.

0 commit comments

Comments
 (0)