Skip to content

Commit 5c10a12

Browse files
authored
Merge branch 'main' into buffered-writer-generic
2 parents 821fcf3 + a3568ac commit 5c10a12

620 files changed

Lines changed: 9499 additions & 4601 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/workflows/daily.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
fail-fast: false
4040

4141
steps:
42-
- uses: actions/checkout@v5
42+
- uses: actions/checkout@v6
4343
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
4444
uses: actions/setup-python@v6
4545
with:
@@ -63,7 +63,7 @@ jobs:
6363
shard-index: [0, 1, 2, 3]
6464
fail-fast: false
6565
steps:
66-
- uses: actions/checkout@v5
66+
- uses: actions/checkout@v6
6767
- uses: actions/setup-python@v6
6868
with:
6969
python-version: "3.13"
@@ -111,19 +111,19 @@ jobs:
111111
runs-on: ubuntu-latest
112112
steps:
113113
- name: Checkout typeshed
114-
uses: actions/checkout@v5
114+
uses: actions/checkout@v6
115115
with:
116116
path: typeshed
117117
- name: Checkout stub_uploader
118-
uses: actions/checkout@v5
118+
uses: actions/checkout@v6
119119
with:
120120
repository: typeshed-internal/stub_uploader
121121
path: stub_uploader
122122
- uses: actions/setup-python@v6
123123
with:
124124
# Keep in sync with stub_uploader's check_scripts.yml workflow.
125125
python-version: "3.13"
126-
- uses: astral-sh/setup-uv@v6
126+
- uses: astral-sh/setup-uv@v7
127127
with:
128128
version-file: "typeshed/requirements-tests.txt"
129129
- name: Run tests

.github/workflows/meta_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
platform: ["linux", "win32"]
3636
fail-fast: false
3737
steps:
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@v6
3939
- uses: actions/setup-python@v6
4040
with:
4141
python-version: "3.13"
42-
- uses: astral-sh/setup-uv@v6
42+
- uses: astral-sh/setup-uv@v7
4343
with:
4444
version-file: "requirements-tests.txt"
4545
- run: uv pip install -r requirements-tests.txt --system
@@ -52,11 +52,11 @@ jobs:
5252
python-platform: ["Linux", "Windows"]
5353
fail-fast: false
5454
steps:
55-
- uses: actions/checkout@v5
55+
- uses: actions/checkout@v6
5656
- uses: actions/setup-python@v6
5757
with:
5858
python-version: "3.13"
59-
- uses: astral-sh/setup-uv@v6
59+
- uses: astral-sh/setup-uv@v7
6060
with:
6161
version-file: "requirements-tests.txt"
6262
- run: uv pip install -r requirements-tests.txt --system
@@ -71,11 +71,11 @@ jobs:
7171
name: Stubsabot dry run
7272
runs-on: ubuntu-latest
7373
steps:
74-
- uses: actions/checkout@v5
74+
- uses: actions/checkout@v6
7575
- uses: actions/setup-python@v6
7676
with:
7777
python-version: "3.13"
78-
- uses: astral-sh/setup-uv@v6
78+
- uses: astral-sh/setup-uv@v7
7979
with:
8080
version-file: "requirements-tests.txt"
8181
- name: Git config

.github/workflows/mypy_primer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
shard-index: [0, 1, 2, 3]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@v5
28+
- uses: actions/checkout@v6
2929
with:
3030
path: typeshed_to_test
3131
fetch-depth: 0
@@ -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@v4
65+
uses: actions/upload-artifact@v6
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@v4
73+
uses: actions/upload-artifact@v6
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@v4
87+
uses: actions/upload-artifact/merge@v6
8888
with:
8989
name: mypy_primer_diffs
9090
pattern: mypy_primer_diffs-*

.github/workflows/stubsabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
if: github.repository == 'python/typeshed'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@v6
2323
with:
2424
# use an ssh key so that checks automatically run on stubsabot PRs
2525
ssh-key: ${{ secrets.STUBSABOT_SSH_PRIVATE_KEY }}
2626
fetch-depth: 0
2727
- uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.13"
30-
- uses: astral-sh/setup-uv@v6
30+
- uses: astral-sh/setup-uv@v7
3131
with:
3232
version-file: "requirements-tests.txt"
3333
- name: git config

.github/workflows/stubtest_stdlib.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
fail-fast: false
3636

3737
steps:
38-
- uses: actions/checkout@v5
38+
- uses: actions/checkout@v6
3939
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
4040
uses: actions/setup-python@v6
4141
with:

.github/workflows/stubtest_third_party.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
fail-fast: false
3737

3838
steps:
39-
- uses: actions/checkout@v5
39+
- uses: actions/checkout@v6
4040
with:
4141
fetch-depth: 0
4242
- uses: actions/setup-python@v6

.github/workflows/tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ jobs:
2626
name: Check typeshed structure
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v5
29+
- uses: actions/checkout@v6
3030
- uses: actions/setup-python@v6
3131
with:
3232
python-version: "3.13"
33-
- uses: astral-sh/setup-uv@v6
33+
- uses: astral-sh/setup-uv@v7
3434
with:
3535
version-file: "requirements-tests.txt"
3636
- run: uv pip install -r requirements-tests.txt --system
@@ -45,12 +45,12 @@ jobs:
4545
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4646
fail-fast: false
4747
steps:
48-
- uses: actions/checkout@v5
48+
- uses: actions/checkout@v6
4949
- uses: actions/setup-python@v6
5050
with:
5151
python-version: ${{ matrix.python-version }}
5252
allow-prereleases: true
53-
- uses: astral-sh/setup-uv@v6
53+
- uses: astral-sh/setup-uv@v7
5454
with:
5555
version-file: "requirements-tests.txt"
5656
- run: uv pip install -r requirements-tests.txt --system
@@ -68,11 +68,11 @@ jobs:
6868
name: "mypy: Run test cases"
6969
runs-on: ubuntu-latest
7070
steps:
71-
- uses: actions/checkout@v5
71+
- uses: actions/checkout@v6
7272
- uses: actions/setup-python@v6
7373
with:
7474
python-version: "3.14"
75-
- uses: astral-sh/setup-uv@v6
75+
- uses: astral-sh/setup-uv@v7
7676
with:
7777
version-file: "requirements-tests.txt"
7878
- run: uv pip install -r requirements-tests.txt --system
@@ -87,11 +87,11 @@ jobs:
8787
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
8888
fail-fast: false
8989
steps:
90-
- uses: actions/checkout@v5
90+
- uses: actions/checkout@v6
9191
- uses: actions/setup-python@v6
9292
with:
9393
python-version: "3.13"
94-
- uses: astral-sh/setup-uv@v6
94+
- uses: astral-sh/setup-uv@v7
9595
with:
9696
version-file: "requirements-tests.txt"
9797
- name: Install typeshed test-suite requirements
@@ -146,19 +146,19 @@ jobs:
146146
runs-on: ubuntu-latest
147147
steps:
148148
- name: Checkout typeshed
149-
uses: actions/checkout@v5
149+
uses: actions/checkout@v6
150150
with:
151151
path: typeshed
152152
- name: Checkout stub_uploader
153-
uses: actions/checkout@v5
153+
uses: actions/checkout@v6
154154
with:
155155
repository: typeshed-internal/stub_uploader
156156
path: stub_uploader
157157
- uses: actions/setup-python@v6
158158
with:
159159
# Keep in sync with stub_uploader's check_scripts.yml workflow.
160160
python-version: "3.13"
161-
- uses: astral-sh/setup-uv@v6
161+
- uses: astral-sh/setup-uv@v7
162162
with:
163163
version-file: "typeshed/requirements-tests.txt"
164164
- name: Run tests

.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.13.3 # must match requirements-tests.txt
14+
rev: v0.14.10 # 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.9.0
30+
rev: 25.12.0
3131
hooks:
3232
- id: black
3333
- repo: https://github.com/pycqa/flake8

CONTRIBUTING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ are important to the project's success.
1414
but [contact us](README.md#discussion) before starting significant work.
1515
* Create your stubs, considering [what to include](#what-to-include) and
1616
conforming to the [coding style](https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#style-guide).
17-
4. Optionally [format and check your stubs](#code-formatting).
17+
4. Optionally [format and check your stubs](#stub-content-and-style).
1818
5. Optionally [run the tests](tests/README.md).
1919
6. [Submit your changes](#submitting-changes) by opening a pull request.
2020
7. Make sure that all tests in CI are passing.
@@ -344,20 +344,20 @@ the latest mypy (`pip install -r requirements-tests.txt`) before running the scr
344344

345345
### Supported type system features
346346

347-
Since PEP 484 was accepted, there have been many other PEPs that added
348-
new features to the Python type system. In general, new features can
349-
be used in typeshed as soon as the PEP has been accepted and implemented
350-
and most type checkers support the new feature.
347+
Since [PEP 484](https://peps.python.org/pep-0484/) was accepted, there have been
348+
many other PEPs that added new features to the Python type system. In general,
349+
new features can be used in typeshed as soon as the PEP has been accepted and
350+
implemented and most type checkers support the new feature.
351351

352352
Supported features include:
353-
- [PEP 544](https://peps.python.org/pep-0544/) (Protocol)
353+
- [PEP 544](https://peps.python.org/pep-0544/) (`Protocol`)
354354
- [PEP 585](https://peps.python.org/pep-0585/) (builtin generics)
355-
- [PEP 586](https://peps.python.org/pep-0586/) (Literal)
356-
- [PEP 591](https://peps.python.org/pep-0591/) (Final/@final)
357-
- [PEP 589](https://peps.python.org/pep-0589/) (TypedDict)
355+
- [PEP 586](https://peps.python.org/pep-0586/) (`Literal`)
356+
- [PEP 591](https://peps.python.org/pep-0591/) (`Final`/`@final`)
357+
- [PEP 589](https://peps.python.org/pep-0589/) (`TypedDict`)
358358
- [PEP 604](https://peps.python.org/pep-0604/) (`Foo | Bar` union syntax)
359-
- [PEP 612](https://peps.python.org/pep-0612/) (ParamSpec)
360-
- [PEP 647](https://peps.python.org/pep-0647/) (TypeGuard):
359+
- [PEP 612](https://peps.python.org/pep-0612/) (`ParamSpec`)
360+
- [PEP 647](https://peps.python.org/pep-0647/) (`TypeGuard`):
361361
see [#5406](https://github.com/python/typeshed/issues/5406)
362362
- [PEP 655](https://peps.python.org/pep-0655/) (`Required` and `NotRequired`)
363363
- [PEP 673](https://peps.python.org/pep-0673/) (`Self`)

MAINTAINERS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,12 @@ When rejecting a PR for a change for a future Python version, use a message
8888
like:
8989

9090
Thanks for contributing! Unfortunately, [as outlined in our CONTRIBUTING document](https://github.com/python/typeshed/blob/main/CONTRIBUTING.md#standard-library-stubs) we only accept pull requests to the standard library for future Python versions after the first beta version has been released. This is in part to prevent churn in the stubs, and in part because the testing infrastructure for the future version is not yet in place. Please feel free to open a new PR when the first beta version has been released. Alternatively, if this PR is still relevant, you can leave a comment here to reopen it.
91+
92+
### Closing requests for third-party stubs
93+
94+
We don't keep requests for third-party library stubs open. Close those
95+
requests as "not planned" with an explanation like this:
96+
97+
We gladly accept type stub contributions for third-party libraries that are published on PyPI in typeshed. To contribute a new library, please follow the steps outlined in [CONTRIBUTING.md](/python/typeshed/blob/main/CONTRIBUTING.md). The `create_baseline_stubs.py` script can be useful to create an initial version, suitable for inclusion in typeshed.
98+
99+
That said, we don't keep requests for third-party library stubs open, unless there are issues that need to be addressed before a PR can be opened. Therefore, I'm closing this issue.

0 commit comments

Comments
 (0)