Skip to content

Commit 24c8264

Browse files
authored
Merge branch 'main' into functools-cache
2 parents 3e050e9 + 7f2d948 commit 24c8264

File tree

186 files changed

+1671
-847
lines changed

Some content is hidden

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

186 files changed

+1671
-847
lines changed

.github/workflows/daily.yml

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

4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
44-
uses: actions/setup-python@v5
44+
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747
cache: pip
@@ -50,9 +50,6 @@ jobs:
5050
check-latest: true
5151
- name: Install dependencies
5252
run: pip install -r requirements-tests.txt
53-
# Temporary to get @disjoint_base support; can remove once mypy 1.18 is released
54-
- name: Install mypy from git
55-
run: pip install git+https://github.com/python/mypy.git@116b92bae7b5dbf5e6bd36fd9b0c6804973e5554
5653
- name: Run stubtest
5754
run: python tests/stubtest_stdlib.py
5855

@@ -66,8 +63,8 @@ jobs:
6663
shard-index: [0, 1, 2, 3]
6764
fail-fast: false
6865
steps:
69-
- uses: actions/checkout@v4
70-
- uses: actions/setup-python@v5
66+
- uses: actions/checkout@v5
67+
- uses: actions/setup-python@v6
7168
with:
7269
python-version: "3.13"
7370
cache: pip
@@ -114,15 +111,15 @@ jobs:
114111
runs-on: ubuntu-latest
115112
steps:
116113
- name: Checkout typeshed
117-
uses: actions/checkout@v4
114+
uses: actions/checkout@v5
118115
with:
119116
path: typeshed
120117
- name: Checkout stub_uploader
121-
uses: actions/checkout@v4
118+
uses: actions/checkout@v5
122119
with:
123120
repository: typeshed-internal/stub_uploader
124121
path: stub_uploader
125-
- uses: actions/setup-python@v5
122+
- uses: actions/setup-python@v6
126123
with:
127124
# Keep in sync with stub_uploader's check_scripts.yml workflow.
128125
python-version: "3.13"
@@ -144,7 +141,7 @@ jobs:
144141
permissions:
145142
issues: write
146143
steps:
147-
- uses: actions/github-script@v7
144+
- uses: actions/github-script@v8
148145
with:
149146
github-token: ${{ secrets.GITHUB_TOKEN }}
150147
script: |

.github/workflows/meta_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
platform: ["linux", "win32"]
3636
fail-fast: false
3737
steps:
38-
- uses: actions/checkout@v4
39-
- uses: actions/setup-python@v5
38+
- uses: actions/checkout@v5
39+
- uses: actions/setup-python@v6
4040
with:
4141
python-version: "3.13"
4242
- uses: astral-sh/setup-uv@v6
@@ -52,8 +52,8 @@ jobs:
5252
python-platform: ["Linux", "Windows"]
5353
fail-fast: false
5454
steps:
55-
- uses: actions/checkout@v4
56-
- uses: actions/setup-python@v5
55+
- uses: actions/checkout@v5
56+
- uses: actions/setup-python@v6
5757
with:
5858
python-version: "3.13"
5959
- uses: astral-sh/setup-uv@v6
@@ -71,8 +71,8 @@ jobs:
7171
name: Stubsabot dry run
7272
runs-on: ubuntu-latest
7373
steps:
74-
- uses: actions/checkout@v4
75-
- uses: actions/setup-python@v5
74+
- uses: actions/checkout@v5
75+
- uses: actions/setup-python@v6
7676
with:
7777
python-version: "3.13"
7878
- uses: astral-sh/setup-uv@v6

.github/workflows/mypy_primer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
shard-index: [0, 1, 2, 3]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
path: typeshed_to_test
3131
fetch-depth: 0
32-
- uses: actions/setup-python@v5
32+
- uses: actions/setup-python@v6
3333
with:
3434
python-version: "3.13"
3535
- name: Install dependencies

.github/workflows/mypy_primer_comment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1919
steps:
2020
- name: Download diffs
21-
uses: actions/github-script@v7
21+
uses: actions/github-script@v8
2222
with:
2323
script: |
2424
const fs = require('fs');
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Post comment
4646
id: post-comment
47-
uses: actions/github-script@v7
47+
uses: actions/github-script@v8
4848
with:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
5050
script: |

.github/workflows/stubsabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919
if: github.repository == 'python/typeshed'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
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
27-
- uses: actions/setup-python@v5
27+
- uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.13"
3030
- uses: astral-sh/setup-uv@v6
@@ -46,7 +46,7 @@ jobs:
4646
needs: [stubsabot]
4747
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubsabot.result == 'failure') }}
4848
steps:
49-
- uses: actions/github-script@v7
49+
- uses: actions/github-script@v8
5050
with:
5151
github-token: ${{ secrets.GITHUB_TOKEN }}
5252
script: |

.github/workflows/stubtest_stdlib.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ jobs:
3535
fail-fast: false
3636

3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v5
3939
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343
cache: pip
@@ -46,8 +46,5 @@ jobs:
4646
check-latest: true
4747
- name: Install dependencies
4848
run: pip install -r requirements-tests.txt
49-
# Temporary to get @disjoint_base support; can remove once mypy 1.18 is released
50-
- name: Install mypy from git
51-
run: pip install git+https://github.com/python/mypy.git@116b92bae7b5dbf5e6bd36fd9b0c6804973e5554
5249
- name: Run stubtest
5350
run: python tests/stubtest_stdlib.py

.github/workflows/stubtest_third_party.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
fail-fast: false
3737

3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040
with:
4141
fetch-depth: 0
42-
- uses: actions/setup-python@v5
42+
- uses: actions/setup-python@v6
4343
with:
4444
python-version: "3.13"
4545
cache: pip

.github/workflows/tests.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
name: Check typeshed structure
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v4
30-
- uses: actions/setup-python@v5
29+
- uses: actions/checkout@v5
30+
- uses: actions/setup-python@v6
3131
with:
3232
python-version: "3.13"
3333
- uses: astral-sh/setup-uv@v6
@@ -45,8 +45,8 @@ 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@v4
49-
- uses: actions/setup-python@v5
48+
- uses: actions/checkout@v5
49+
- uses: actions/setup-python@v6
5050
with:
5151
python-version: ${{ matrix.python-version }}
5252
allow-prereleases: true
@@ -72,8 +72,8 @@ jobs:
7272
name: "mypy: Run test cases"
7373
runs-on: ubuntu-latest
7474
steps:
75-
- uses: actions/checkout@v4
76-
- uses: actions/setup-python@v5
75+
- uses: actions/checkout@v5
76+
- uses: actions/setup-python@v6
7777
with:
7878
# Use py311 for now, as py312 seems to be around 30s slower in CI
7979
# TODO: figure out why that is (#11590)
@@ -93,8 +93,8 @@ jobs:
9393
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
9494
fail-fast: false
9595
steps:
96-
- uses: actions/checkout@v4
97-
- uses: actions/setup-python@v5
96+
- uses: actions/checkout@v5
97+
- uses: actions/setup-python@v6
9898
with:
9999
python-version: "3.13"
100100
- uses: astral-sh/setup-uv@v6
@@ -152,15 +152,15 @@ jobs:
152152
runs-on: ubuntu-latest
153153
steps:
154154
- name: Checkout typeshed
155-
uses: actions/checkout@v4
155+
uses: actions/checkout@v5
156156
with:
157157
path: typeshed
158158
- name: Checkout stub_uploader
159-
uses: actions/checkout@v4
159+
uses: actions/checkout@v5
160160
with:
161161
repository: typeshed-internal/stub_uploader
162162
path: stub_uploader
163-
- uses: actions/setup-python@v5
163+
- uses: actions/setup-python@v6
164164
with:
165165
# Keep in sync with stub_uploader's check_scripts.yml workflow.
166166
python-version: "3.13"

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
@@ -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.12.2 # must match requirements-tests.txt
14+
rev: v0.13.3 # 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.1.0
30+
rev: 25.9.0
3131
hooks:
3232
- id: black
3333
- repo: https://github.com/pycqa/flake8

CONTRIBUTING.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -436,28 +436,24 @@ following criteria is met:
436436
* the upstream package was declared or appears to be unmaintained, and
437437
retaining the stubs causes maintenance issues in typeshed.
438438

439-
If a package ships its own `py.typed` file, please follow these steps:
439+
Case 1: If a package ships its own `py.typed` file, please follow these steps:
440440

441-
1. Open an issue with the earliest month of removal in the subject.
442-
2. A maintainer will add the
443-
["stubs: removal" label](https://github.com/python/typeshed/labels/%22stubs%3A%20removal%22).
444-
3. Open a PR that sets the `obsolete_since` field in the `METADATA.toml`
445-
file to the first version of the package that shipped `py.typed`.
446-
4. After at least six months, open a PR to remove the stubs.
441+
1. Make sure **stubsabot** open a PR that sets the `obsolete_since` field in the
442+
`METADATA.toml` file to the first version of the package that shipped `py.typed`.
443+
2. After at least six months, make sure **stubsabot** open a PR to remove the stubs.
447444

448-
If third-party stubs should be removed for other reasons, please follow these
449-
steps:
445+
Case 2: If third-party stubs should be removed for other reasons, please follow
446+
these steps:
450447

451448
1. Open an issue explaining why the stubs should be removed.
452449
2. A maintainer will add the
453450
["stubs: removal" label](https://github.com/python/typeshed/labels/%22stubs%3A%20removal%22).
454451
3. Open a PR that sets the `no_longer_updated` field in the `METADATA.toml`
455452
file to `true`.
456-
4. When a new version of the package was automatically uploaded to PyPI
457-
(which can take up to a day), open a PR to remove the stubs.
453+
4. When a new version of the package was automatically uploaded to PyPI (which
454+
can take up to a day), make sure **stubsabot** open a PR to remove the stubs.
458455

459-
Don't forget to make sure the library is not in the [`pyrightconfig.stricter.json`](./pyrightconfig.stricter.json)
460-
exclusion list. If feeling kindly, please update [mypy](https://github.com/python/mypy/blob/master/mypy/stubinfo.py)
456+
If feeling kindly, please update [mypy](https://github.com/python/mypy/blob/master/mypy/stubinfo.py)
461457
for any stub obsoletions or removals.
462458

463459
### Marking PRs as "deferred"

0 commit comments

Comments
 (0)