Skip to content

Commit 992d7de

Browse files
authored
Merge branch 'main' into add-colorize-stubs
2 parents 59703ae + b932d8c commit 992d7de

25 files changed

Lines changed: 94 additions & 67 deletions

File tree

‎.github/workflows/daily.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
fail-fast: false
4444

4545
steps:
46-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4747
with:
4848
persist-credentials: false
4949
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
50-
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
50+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5151
with:
5252
python-version: ${{ matrix.python-version }}
5353
cache: pip
@@ -69,10 +69,10 @@ jobs:
6969
shard-index: [0, 1, 2, 3]
7070
fail-fast: false
7171
steps:
72-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
72+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7373
with:
7474
persist-credentials: false
75-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
75+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
7676
with:
7777
python-version: "3.13"
7878
cache: pip
@@ -124,17 +124,17 @@ jobs:
124124
runs-on: ubuntu-latest
125125
steps:
126126
- name: Checkout typeshed
127-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
127+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
128128
with:
129129
path: typeshed
130130
persist-credentials: false
131131
- name: Checkout stub_uploader
132-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
132+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
133133
with:
134134
repository: typeshed-internal/stub_uploader
135135
path: stub_uploader
136136
persist-credentials: false
137-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
137+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
138138
with:
139139
version-file: "typeshed/requirements-tests.txt"
140140
- name: Run tests

‎.github/workflows/meta_tests.yml‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ jobs:
3535
platform: ["linux", "win32"]
3636
fail-fast: false
3737
steps:
38-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
38+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3939
with:
4040
persist-credentials: false
41-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
41+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
4242
with:
4343
version-file: "requirements-tests.txt"
4444
- name: Run check_typeshed_structure.py
@@ -58,18 +58,18 @@ jobs:
5858
python-platform: ["Linux", "Windows"]
5959
fail-fast: false
6060
steps:
61-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
61+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6262
with:
6363
persist-credentials: false
64-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
64+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
6565
with:
6666
python-version: "3.13"
67-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
67+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
6868
with:
6969
version-file: "requirements-tests.txt"
7070
- run: uv pip install -r requirements-tests.txt --system
7171
- name: Run pyright on typeshed
72-
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3
72+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2
7373
with:
7474
version: PATH
7575
python-platform: ${{ matrix.python-platform }}
@@ -80,10 +80,10 @@ jobs:
8080
name: "stubsabot: dry run"
8181
runs-on: ubuntu-latest
8282
steps:
83-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
83+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8484
with:
8585
persist-credentials: false
86-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
86+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
8787
with:
8888
version-file: "requirements-tests.txt"
8989
- name: Git config

‎.github/workflows/mypy_primer.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
shard-index: [0, 1, 2, 3, 4, 5]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
28+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2929
with:
3030
path: typeshed_to_test
3131
fetch-depth: 0
3232
persist-credentials: false
33-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
33+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
3434
with:
3535
python-version: "3.13"
3636
- name: Install dependencies
@@ -63,15 +63,15 @@ jobs:
6363
run: |
6464
echo ${{ github.event.pull_request.number }} | tee pr_number.txt
6565
- name: Upload mypy_primer diff + PR number
66-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
66+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6767
if: ${{ matrix.shard-index == 0 }}
6868
with:
6969
name: mypy_primer_diffs-${{ matrix.shard-index }}
7070
path: |
7171
diff_${{ matrix.shard-index }}.txt
7272
pr_number.txt
7373
- name: Upload mypy_primer diff
74-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
74+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7575
if: ${{ matrix.shard-index != 0 }}
7676
with:
7777
name: mypy_primer_diffs-${{ matrix.shard-index }}
@@ -85,7 +85,7 @@ jobs:
8585
contents: read
8686
steps:
8787
- name: Merge artifacts
88-
uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
88+
uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8989
with:
9090
name: mypy_primer_diffs
9191
pattern: mypy_primer_diffs-*

‎.github/workflows/stubsabot.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
contents: read
2020
pull-requests: write # Create, update, and label PRs.
2121
steps:
22-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
22+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
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
persist-credentials: true # stubsabot needs the SSH key to push branches.
28-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
28+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
2929
with:
3030
version-file: "requirements-tests.txt"
3131
# A compromised dependency in a test job on main could poison the shared

‎.github/workflows/stubtest_stdlib.yml‎

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

4141
steps:
42-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
42+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4343
with:
4444
persist-credentials: false
4545
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
46-
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
46+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
4747
with:
4848
python-version: ${{ matrix.python-version }}
4949
cache: pip

‎.github/workflows/stubtest_third_party.yml‎

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

3838
steps:
39-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
39+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4040
with:
4141
fetch-depth: 0
4242
persist-credentials: false
43-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
43+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
4444
with:
4545
python-version: "3.13"
4646
cache: pip

‎.github/workflows/tests.yml‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
name: Check typeshed structure
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
29+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3030
with:
3131
persist-credentials: false
32-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
32+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
3333
with:
3434
version-file: "requirements-tests.txt"
3535
- name: Run check_typeshed_structure.py
@@ -49,14 +49,14 @@ jobs:
4949
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
5050
fail-fast: false
5151
steps:
52-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
52+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5353
with:
5454
persist-credentials: false
55-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
55+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5656
with:
5757
python-version: ${{ matrix.python-version }}
5858
allow-prereleases: true
59-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
59+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
6060
with:
6161
version-file: "requirements-tests.txt"
6262
- run: uv pip install -r requirements-tests.txt --system
@@ -77,10 +77,10 @@ jobs:
7777
name: "mypy: regression tests"
7878
runs-on: ubuntu-latest
7979
steps:
80-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
80+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8181
with:
8282
persist-credentials: false
83-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
83+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
8484
with:
8585
version-file: "requirements-tests.txt"
8686
- name: Run regr_test.py
@@ -103,13 +103,13 @@ jobs:
103103
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
104104
fail-fast: false
105105
steps:
106-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
106+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
107107
with:
108108
persist-credentials: false
109-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
109+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
110110
with:
111111
python-version: "3.14"
112-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
112+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
113113
with:
114114
version-file: "requirements-tests.txt"
115115
- name: Install typeshed test-suite requirements
@@ -142,13 +142,13 @@ jobs:
142142
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
143143
fail-fast: false
144144
steps:
145-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
145+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
146146
with:
147147
persist-credentials: false
148-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
148+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
149149
with:
150150
python-version: "3.14"
151-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
151+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
152152
with:
153153
version-file: "requirements-tests.txt"
154154
- name: Install typeshed test-suite requirements
@@ -182,13 +182,13 @@ jobs:
182182
python-version: ["3.11", "3.12", "3.13", "3.14"]
183183
fail-fast: false
184184
steps:
185-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
185+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
186186
with:
187187
persist-credentials: false
188-
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
188+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
189189
with:
190190
python-version: "3.13"
191-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
191+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
192192
with:
193193
version-file: "requirements-tests.txt"
194194
- name: Install typeshed test-suite requirements
@@ -223,22 +223,22 @@ jobs:
223223
- name: List 3rd-party stub dependencies installed
224224
run: uv pip freeze
225225
- name: Run pyright with basic settings on all the stubs
226-
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3
226+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2
227227
with:
228228
version: PATH
229229
python-platform: ${{ matrix.python-platform }}
230230
python-version: ${{ matrix.python-version }}
231231
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
232232
- name: Run pyright with stricter settings on some of the stubs
233-
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3
233+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2
234234
with:
235235
version: PATH
236236
python-platform: ${{ matrix.python-platform }}
237237
python-version: ${{ matrix.python-version }}
238238
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
239239
project: ./pyrightconfig.stricter.json
240240
- name: Run pyright on the test cases
241-
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3
241+
uses: jakebailey/pyright-action@8ec14b5cfe41f26e5f41686a31eb6012758217ef # v3.0.2
242242
with:
243243
version: PATH
244244
python-platform: ${{ matrix.python-platform }}
@@ -251,17 +251,17 @@ jobs:
251251
runs-on: ubuntu-latest
252252
steps:
253253
- name: Checkout typeshed
254-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
254+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
255255
with:
256256
path: typeshed
257257
persist-credentials: false
258258
- name: Checkout stub_uploader
259-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
259+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
260260
with:
261261
repository: typeshed-internal/stub_uploader
262262
path: stub_uploader
263263
persist-credentials: false
264-
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
264+
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
265265
with:
266266
version-file: "typeshed/requirements-tests.txt"
267267
- name: Run tests

‎stdlib/@tests/stubtest_allowlists/linux.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ curses.COLOR_PAIRS # Initialized after start_color
2323
curses.COLS # Initialized only after initscr call
2424
curses.LINES # Initialized only after initscr call
2525
fcntl.I_[A-Z0-9_]+ # Platform differences that cannot be captured by the type system
26+
(fcntl.F_DUPFD_QUERY)? # Depends on the glibc version Python was built against
2627
multiprocessing.popen_spawn_win32 # exists on Linux but fails to import
2728
select.poll # Actually a function; we have a class so it can be used as a type
2829

‎stdlib/@tests/test_cases/check_tarfile.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import lzma
12
import tarfile
23

34
with tarfile.open("test.tar.xz", "w:xz") as tar:
@@ -8,9 +9,8 @@
89
tarfile.open("test.tar.xz", "w:xz", preset=5)
910
tarfile.open("test.tar.xz", "w:xz", preset=9)
1011

11-
# Test with invalid preset values
12-
tarfile.open("test.tar.xz", "w:xz", preset=-1) # type: ignore
13-
tarfile.open("test.tar.xz", "w:xz", preset=10) # type: ignore
12+
# The preset may be combined with PRESET_EXTREME, as in lzma and TarFile.xzopen
13+
tarfile.open("test.tar.xz", "w:xz", preset=9 | lzma.PRESET_EXTREME)
1414

1515
# Test pipe modes
1616
tarfile.open("test.tar.xz", "r|*")

‎stdlib/csv.pyi‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ if sys.version_info < (3, 13):
5454

5555
_T = TypeVar("_T")
5656

57+
# Note that this is often the wrong class: it is only useful for sub-classing
58+
# (e.g. csv.excel). Dialect objects returned at runtime, such as the return
59+
# value of get_dialect(), are usually _csv.Dialect, which is not a subclass
60+
# of csv.Dialect.
5761
class Dialect:
5862
delimiter: str
5963
quotechar: str | None

0 commit comments

Comments
 (0)