Skip to content

Commit 0cfd5ec

Browse files
authored
Merge branch 'main' into patch-6
2 parents 14d56ef + 61f364b commit 0cfd5ec

619 files changed

Lines changed: 3320 additions & 253 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/mypy_primer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
shard-index: [0, 1, 2, 3]
25+
shard-index: [0, 1, 2, 3, 4, 5]
2626
fail-fast: false
2727
steps:
2828
- uses: actions/checkout@v6
@@ -52,7 +52,7 @@ jobs:
5252
--new v${MYPY_VERSION} --old v${MYPY_VERSION} \
5353
--custom-typeshed-repo typeshed_to_test \
5454
--new-typeshed $GITHUB_SHA --old-typeshed upstream_main \
55-
--num-shards 4 --shard-index ${{ matrix.shard-index }} \
55+
--num-shards 6 --shard-index ${{ matrix.shard-index }} \
5656
--debug \
5757
--output concise \
5858
| tee diff_${{ matrix.shard-index }}.txt

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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: 26.3.1
30+
rev: 26.5.0
3131
hooks:
3232
- id: black
3333
- repo: https://github.com/pycqa/flake8

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ requires-python = ">=3.10" # Minimum version to run tests, used by uv run
99
line-length = 130
1010
target-version = ["py310"]
1111
skip-magic-trailing-comma = true
12+
preview = true
1213

1314
[tool.ruff]
1415
line-length = 130

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Type checkers that we test our stubs against. These should always
22
# be pinned to a specific version to make failure reproducible.
3-
mypy==2.0.0
3+
mypy==2.1.0
44
pyright==1.1.409
55

66
# Libraries used by our various scripts.

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ turtledemo
1717
turtledemo\..+
1818

1919

20-
# ======================================================================
21-
# TODO: Module members that exist at runtime, but are missing from stubs
22-
# ======================================================================
23-
24-
tkinter.Misc.config
25-
26-
2720
# ======================================================================
2821
# Modules that exist at runtime, but are deliberately missing from stubs
2922
# ======================================================================
@@ -464,6 +457,9 @@ unittest.runner._WritelnDecorator.write # Methods that come from __getattr__()
464457
urllib.response.addbase.write # Methods that come from __getattr__() at runtime
465458
urllib.response.addbase.writelines # Methods that come from __getattr__() at runtime
466459

460+
(hashlib.__all__)? # scrypt depends on how OpenSSL was built.
461+
(pydoc.Doc.getdocloc)? # Runtime default is an installation-specific stdlib path.
462+
467463
_?weakref\.CallableProxyType\.__getattr__ # Should have all attributes of proxy
468464
_?weakref\.(ref|ReferenceType)\.__init__ # C implementation has incorrect signature
469465
_?weakref\.(ref|ReferenceType)\.__call__ # C function default annotation is wrong

stdlib/@tests/stubtest_allowlists/darwin-py315.txt

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
# ============================================
2-
# TODO: Allowlist entries that should be fixed
3-
# ============================================
4-
5-
_pyrepl.fancy_termios
6-
_pyrepl.unix_console
7-
_pyrepl.unix_eventqueue
8-
ctypes.c_double_complex._type_
9-
ctypes.c_float_complex._type_
10-
ctypes.c_longdouble_complex._type_
11-
os.NODEV
12-
os.__all__
13-
posix.NODEV
14-
readline.get_pre_input_hook
15-
16-
171
# =============================================================
182
# Allowlist entries that cannot or should not be fixed; >= 3.15
193
# =============================================================
204

5+
# Depends on the ncurses version used to build Python.
6+
(_curses.BUTTON5_CLICKED)?
7+
(_curses.BUTTON5_DOUBLE_CLICKED)?
8+
(_curses.BUTTON5_PRESSED)?
9+
(_curses.BUTTON5_RELEASED)?
10+
(_curses.BUTTON5_TRIPLE_CLICKED)?
11+
12+
# Platform/build availability differs across Darwin builds.
13+
(_socket.SO_BINDTODEVICE)?
14+
(errno.ENOTCAPABLE)?
15+
16+
# Depends on how readline was built.
17+
readline.get_pre_input_hook
18+
2119
# Internal implementation details of the sampling profiler.
2220
profiling.sampling.live_collector
2321
profiling.sampling.live_collector.collector

stdlib/@tests/stubtest_allowlists/linux-py315.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,10 @@
66
# decimal falls back to _pydecimal with different runtime signatures.
77
decimal\..*
88
_decimal
9-
_pyrepl.fancy_termios
10-
_pyrepl.unix_console
11-
_pyrepl.unix_eventqueue
12-
ctypes.c_double_complex._type_
13-
ctypes.c_float_complex._type_
14-
ctypes.c_longdouble_complex._type_
159
os.AT_NO_AUTOMOUNT
1610
os.AT_STATX_DONT_SYNC
1711
os.AT_STATX_FORCE_SYNC
1812
os.AT_STATX_SYNC_AS_STAT
19-
os.NODEV
2013
os.STATX_ATIME
2114
os.STATX_BASIC_STATS
2215
os.STATX_BLOCKS
@@ -41,7 +34,6 @@ posix.AT_NO_AUTOMOUNT
4134
posix.AT_STATX_DONT_SYNC
4235
posix.AT_STATX_FORCE_SYNC
4336
posix.AT_STATX_SYNC_AS_STAT
44-
posix.NODEV
4537
posix.STATX_ATIME
4638
posix.STATX_BASIC_STATS
4739
posix.STATX_BLOCKS
@@ -59,13 +51,15 @@ posix.STATX_SIZE
5951
posix.STATX_TYPE
6052
posix.STATX_UID
6153
posix.statx
62-
readline.get_pre_input_hook
6354

6455

6556
# =============================================================
6657
# Allowlist entries that cannot or should not be fixed; >= 3.15
6758
# =============================================================
6859

60+
# Depends on how readline was built.
61+
readline.get_pre_input_hook
62+
6963
# Internal implementation details of the sampling profiler.
7064
profiling.sampling.live_collector
7165
profiling.sampling.live_collector.collector

0 commit comments

Comments
 (0)