Skip to content

Commit d6ded65

Browse files
Merge branch 'master' into stubtest-dunder-posonly
2 parents 8cb404f + 6d30d75 commit d6ded65

File tree

809 files changed

+63045
-14241
lines changed

Some content is hidden

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

809 files changed

+63045
-14241
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
# so it's important to do the docs build on all PRs touching mypy/errorcodes.py
1313
# in case somebody's adding a new error code without any docs
1414
- 'mypy/errorcodes.py'
15+
# Part of the documentation is automatically generated from the options
16+
# definitions in mypy/main.py
17+
- 'mypy/main.py'
1518
- 'mypyc/doc/**'
1619
- '**/*.rst'
1720
- '**/*.md'

.github/workflows/mypy_primer.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
persist-credentials: false
4040
- uses: actions/setup-python@v5
4141
with:
42-
python-version: "3.13"
42+
python-version: "3.14"
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install -U pip
@@ -67,6 +67,7 @@ jobs:
6767
--debug \
6868
--additional-flags="--debug-serialize" \
6969
--output concise \
70+
--mypy-install-librt \
7071
| tee diff_${{ matrix.shard-index }}.txt
7172
) || [ $? -eq 1 ]
7273
- if: ${{ matrix.shard-index == 0 }}

.github/workflows/test.yml

Lines changed: 74 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31,70 +31,99 @@ jobs:
3131
include:
3232
# Make sure to run mypyc compiled unit tests for both
3333
# the oldest and newest supported Python versions
34-
- name: Test suite with py39-ubuntu, mypyc-compiled
35-
python: '3.9'
36-
os: ubuntu-24.04-arm
37-
toxenv: py
38-
tox_extra_args: "-n 4"
39-
test_mypyc: true
40-
- name: Test suite with py310-ubuntu
34+
- name: Test suite with py310-ubuntu, mypyc-compiled
4135
python: '3.10'
4236
os: ubuntu-24.04-arm
4337
toxenv: py
4438
tox_extra_args: "-n 4"
39+
test_mypyc: true
4540
- name: Test suite with py311-ubuntu
4641
python: '3.11'
4742
os: ubuntu-24.04-arm
4843
toxenv: py
4944
tox_extra_args: "-n 4"
50-
- name: Test suite with py312-ubuntu, mypyc-compiled
45+
- name: Test suite with py312-ubuntu
5146
python: '3.12'
5247
os: ubuntu-24.04-arm
5348
toxenv: py
5449
tox_extra_args: "-n 4"
55-
test_mypyc: true
5650
- name: Test suite with py313-ubuntu, mypyc-compiled
5751
python: '3.13'
5852
os: ubuntu-24.04-arm
5953
toxenv: py
6054
tox_extra_args: "-n 4"
6155
test_mypyc: true
62-
- name: Test suite with py313-windows-64
63-
python: '3.13'
64-
os: windows-latest
56+
- name: Test suite with py314-ubuntu, mypyc-compiled
57+
python: '3.14'
58+
os: ubuntu-24.04-arm
6559
toxenv: py
6660
tox_extra_args: "-n 4"
67-
68-
- name: Test suite with py314-dev-ubuntu
69-
python: '3.14-dev'
61+
test_mypyc: true
62+
- name: Test suite with py314t-ubuntu, mypyc-compiled
63+
python: '3.14t'
7064
os: ubuntu-24.04-arm
7165
toxenv: py
7266
tox_extra_args: "-n 4"
73-
# allow_failure: true
7467
test_mypyc: true
68+
- name: Test suite with py314-windows-64
69+
python: '3.14'
70+
os: windows-latest
71+
toxenv: py
72+
tox_extra_args: "-n 4"
73+
74+
# - name: Test suite with py315-dev-ubuntu
75+
# python: '3.15-dev'
76+
# os: ubuntu-24.04-arm
77+
# toxenv: py
78+
# tox_extra_args: "-n 4"
79+
# # allow_failure: true
80+
# test_mypyc: true
81+
82+
- name: mypyc runtime tests with py313-macos
83+
python: '3.13'
84+
os: macos-latest
85+
toxenv: py
86+
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
7587

76-
- name: mypyc runtime tests with py39-macos
77-
python: '3.9.21'
78-
# TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
79-
os: macos-13
88+
- name: mypyc runtime tests with py310-ubuntu
89+
python: '3.10'
90+
os: ubuntu-latest
8091
toxenv: py
8192
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
93+
8294
# This is broken. See
8395
# - https://github.com/python/mypy/issues/17819
8496
# - https://github.com/python/mypy/pull/17822
85-
# - name: mypyc runtime tests with py38-debug-build-ubuntu
86-
# python: '3.9.21'
97+
# - name: mypyc runtime tests with py310-debug-build-ubuntu
98+
# python: '3.10'
8799
# os: ubuntu-latest
88100
# toxenv: py
89101
# tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
90102
# debug_build: true
91103

92-
- name: Type check our own code (py39-ubuntu)
93-
python: '3.9'
104+
- name: Parallel tests with py314-ubuntu, interpreted
105+
python: '3.14'
106+
os: ubuntu-24.04-arm
107+
toxenv: py
108+
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
109+
- name: Parallel tests with py314-ubuntu, mypyc-compiled
110+
python: '3.14'
111+
os: ubuntu-24.04-arm
112+
toxenv: py
113+
tox_extra_args: "-n 4 --mypy-num-workers=4 mypy/test/testcheck.py"
114+
test_mypyc: true
115+
- name: Parallel tests with py314-windows-64, interpreted
116+
python: '3.14'
117+
os: windows-latest
118+
toxenv: py
119+
tox_extra_args: "-n 2 --mypy-num-workers=2 mypy/test/testcheck.py -k 'incremental or modules or classes'"
120+
121+
- name: Type check our own code (py310-ubuntu)
122+
python: '3.10'
94123
os: ubuntu-latest
95124
toxenv: type
96-
- name: Type check our own code (py39-windows-64)
97-
python: '3.9'
125+
- name: Type check our own code (py310-windows-64)
126+
python: '3.10'
98127
os: windows-latest
99128
toxenv: type
100129

@@ -128,24 +157,15 @@ jobs:
128157
with:
129158
persist-credentials: false
130159

131-
- name: Debug build
132-
if: ${{ matrix.debug_build }}
133-
run: |
134-
PYTHONVERSION=${{ matrix.python }}
135-
PYTHONDIR=~/python-debug/python-$PYTHONVERSION
136-
VENV=$PYTHONDIR/env
137-
./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
138-
# TODO: does this do anything? env vars aren't passed to the next step right
139-
source $VENV/bin/activate
140160
- name: Latest dev build
141161
if: ${{ endsWith(matrix.python, '-dev') }}
142162
run: |
143163
git clone --depth 1 https://github.com/python/cpython.git /tmp/cpython --branch $( echo ${{ matrix.python }} | sed 's/-dev//' )
144164
cd /tmp/cpython
145165
echo git rev-parse HEAD; git rev-parse HEAD
146166
git show --no-patch
147-
sudo apt-get update
148-
sudo apt-get install -y --no-install-recommends \
167+
sudo apt-get update -q
168+
sudo apt-get install -q -y --no-install-recommends \
149169
build-essential gdb lcov libbz2-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev \
150170
libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev
151171
./configure --prefix=/opt/pythondev
@@ -154,6 +174,23 @@ jobs:
154174
sudo ln -s /opt/pythondev/bin/python3 /opt/pythondev/bin/python
155175
sudo ln -s /opt/pythondev/bin/pip3 /opt/pythondev/bin/pip
156176
echo "/opt/pythondev/bin" >> $GITHUB_PATH
177+
- name: Debug build
178+
if: ${{ matrix.debug_build }}
179+
run: |
180+
git clone --depth 1 https://github.com/python/cpython.git /tmp/cpython --branch ${{ matrix.python }}
181+
cd /tmp/cpython
182+
echo git rev-parse HEAD; git rev-parse HEAD
183+
git show --no-patch
184+
sudo apt-get update -q
185+
sudo apt-get install -q -y --no-install-recommends \
186+
build-essential gdb lcov libbz2-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev \
187+
libreadline6-dev libsqlite3-dev libssl-dev lzma lzma-dev tk-dev uuid-dev zlib1g-dev
188+
./configure CFLAGS="-DPy_DEBUG -DPy_TRACE_REFS -DPYMALLOC_DEBUG" --with-pydebug -with-trace-refs --prefix=/opt/pythondev
189+
make -j$(nproc)
190+
sudo make install
191+
sudo ln -s /opt/pythondev/bin/python3 /opt/pythondev/bin/python
192+
sudo ln -s /opt/pythondev/bin/pip3 /opt/pythondev/bin/pip
193+
echo "/opt/pythondev/bin" >> $GITHUB_PATH
157194
- uses: actions/setup-python@v5
158195
if: ${{ !(matrix.debug_build || endsWith(matrix.python, '-dev')) }}
159196
with:

.github/workflows/test_stubgenc.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- 'mypy/stubgenc.py'
1212
- 'mypy/stubdoc.py'
1313
- 'mypy/stubutil.py'
14-
- 'test-data/stubgen/**'
14+
- 'test-data/pybind11_fixtures/**'
1515

1616
permissions:
1717
contents: read
@@ -32,10 +32,10 @@ jobs:
3232
with:
3333
persist-credentials: false
3434

35-
- name: Setup 🐍 3.9
35+
- name: Setup 🐍 3.10
3636
uses: actions/setup-python@v5
3737
with:
38-
python-version: 3.9
38+
python-version: '3.10'
3939

4040
- name: Test stubgenc
4141
run: misc/test-stubgenc.sh

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ repos:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 25.1.0
9+
rev: 26.1.0
1010
hooks:
1111
- id: black
1212
exclude: '^(test-data/)'
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.11.4
14+
rev: v0.14.3
1515
hooks:
16-
- id: ruff
16+
- id: ruff-check
1717
args: [--exit-non-zero-on-fix]
1818
- repo: https://github.com/python-jsonschema/check-jsonschema
1919
rev: 0.32.1
@@ -41,7 +41,7 @@ repos:
4141
# actionlint has a shellcheck integration which extracts shell scripts in `run:` steps from GitHub Actions
4242
# and checks these with shellcheck. This is arguably its most useful feature,
4343
# but the integration only works if shellcheck is installed
44-
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.10.0"
44+
- "github.com/wasilibs/go-shellcheck/cmd/shellcheck@v0.11.1"
4545
- repo: https://github.com/woodruffw/zizmor-pre-commit
4646
rev: v1.5.2
4747
hooks:

0 commit comments

Comments
 (0)