Skip to content

Commit cdccffa

Browse files
Merge branch 'master' into abide-by-new
2 parents 59a5aee + ec00fb8 commit cdccffa

File tree

815 files changed

+47288
-20239
lines changed

Some content is hidden

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

815 files changed

+47288
-20239
lines changed

.github/ISSUE_TEMPLATE/feature.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ labels: "feature"
66

77
**Feature**
88

9-
(A clear and concise description of your feature proposal.)
9+
<!-- Enter a clear and concise description of your feature proposal here. -->
1010

1111
**Pitch**
1212

13-
(Please explain why this feature should be implemented and how it would be used. Add examples, if applicable.)
13+
<!-- Please explain why this feature should be implemented and how it would be used. Add examples, if applicable. -->

.github/workflows/build_wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
if: github.repository == 'python/mypy'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: actions/setup-python@v4
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.11'
2020
- name: Trigger script

.github/workflows/docs.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
pull_request:
99
paths:
1010
- 'docs/**'
11+
# We now have a docs check that fails if any error codes don't have documentation,
12+
# so it's important to do the docs build on all PRs touching mypy/errorcodes.py
13+
# in case somebody's adding a new error code without any docs
14+
- 'mypy/errorcodes.py'
1115
- 'mypyc/doc/**'
1216
- '**/*.rst'
1317
- '**/*.md'
@@ -29,8 +33,8 @@ jobs:
2933
TOX_SKIP_MISSING_INTERPRETERS: False
3034
VERIFY_MYPY_ERROR_CODES: 1
3135
steps:
32-
- uses: actions/checkout@v3
33-
- uses: actions/setup-python@v4
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-python@v5
3438
with:
3539
python-version: '3.8'
3640
- name: Install tox

.github/workflows/mypy_primer.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
shard-index: [0, 1, 2, 3, 4]
3434
fail-fast: false
3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
with:
3838
path: mypy_to_test
3939
fetch-depth: 0
40-
- uses: actions/setup-python@v4
40+
- uses: actions/setup-python@v5
4141
with:
42-
python-version: "3.10"
42+
python-version: "3.12"
4343
- name: Install dependencies
4444
run: |
4545
python -m pip install -U pip

.github/workflows/mypy_primer_comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Post comment
4646
id: post-comment
47-
uses: actions/github-script@v6
47+
uses: actions/github-script@v7
4848
with:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
5050
script: |

.github/workflows/sync_typeshed.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
if: github.repository == 'python/mypy'
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
# TODO: use whatever solution ends up working for
2222
# https://github.com/python/typeshed/issues/8434
23-
- uses: actions/setup-python@v4
23+
- uses: actions/setup-python@v5
2424
with:
2525
python-version: "3.10"
2626
- name: git config

.github/workflows/test.yml

+22-19
Original file line numberDiff line numberDiff line change
@@ -36,53 +36,54 @@ jobs:
3636
arch: x64
3737
os: ubuntu-latest
3838
toxenv: py
39-
tox_extra_args: "-n 2"
39+
tox_extra_args: "-n 4"
4040
test_mypyc: true
4141
- name: Test suite with py38-windows-64
4242
python: '3.8'
4343
arch: x64
4444
os: windows-latest
4545
toxenv: py38
46-
tox_extra_args: "-n 2"
46+
tox_extra_args: "-n 4"
4747
- name: Test suite with py39-ubuntu
4848
python: '3.9'
4949
arch: x64
5050
os: ubuntu-latest
5151
toxenv: py
52-
tox_extra_args: "-n 2"
52+
tox_extra_args: "-n 4"
5353
- name: Test suite with py310-ubuntu
5454
python: '3.10'
5555
arch: x64
5656
os: ubuntu-latest
5757
toxenv: py
58-
tox_extra_args: "-n 2"
58+
tox_extra_args: "-n 4"
5959
- name: Test suite with py311-ubuntu, mypyc-compiled
6060
python: '3.11'
6161
arch: x64
6262
os: ubuntu-latest
6363
toxenv: py
64-
tox_extra_args: "-n 2"
64+
tox_extra_args: "-n 4"
6565
test_mypyc: true
6666
- name: Test suite with py312-ubuntu, mypyc-compiled
67-
python: '3.12-dev'
67+
python: '3.12'
6868
arch: x64
6969
os: ubuntu-latest
7070
toxenv: py
71-
tox_extra_args: "-n 2"
71+
tox_extra_args: "-n 4"
7272
test_mypyc: true
7373

74-
- name: mypyc runtime tests with py38-macos
75-
python: '3.8.17'
74+
- name: mypyc runtime tests with py39-macos
75+
python: '3.9.18'
7676
arch: x64
77-
os: macos-latest
77+
# TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version
78+
os: macos-13
7879
toxenv: py
79-
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
80+
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
8081
- name: mypyc runtime tests with py38-debug-build-ubuntu
8182
python: '3.8.17'
8283
arch: x64
8384
os: ubuntu-latest
8485
toxenv: py
85-
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
86+
tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
8687
debug_build: true
8788

8889
- name: Type check our own code (py38-ubuntu)
@@ -119,8 +120,8 @@ jobs:
119120
# Pytest
120121
PYTEST_ADDOPTS: --color=yes
121122
steps:
122-
- uses: actions/checkout@v3
123-
- uses: actions/setup-python@v4
123+
- uses: actions/checkout@v4
124+
- uses: actions/setup-python@v5
124125
with:
125126
python-version: ${{ matrix.python }}
126127
architecture: ${{ matrix.arch }}
@@ -133,14 +134,16 @@ jobs:
133134
./misc/build-debug-python.sh $PYTHONVERSION $PYTHONDIR $VENV
134135
source $VENV/bin/activate
135136
- name: Install tox
136-
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
137+
run: pip install setuptools==68.2.2 tox==4.11.0
137138
- name: Compiled with mypyc
138139
if: ${{ matrix.test_mypyc }}
139140
run: |
140141
pip install -r test-requirements.txt
141142
CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .
142143
- name: Setup tox environment
143-
run: tox run -e ${{ matrix.toxenv }} --notest
144+
run: |
145+
tox run -e ${{ matrix.toxenv }} --notest
146+
python -c 'import os; print("os.cpu_count", os.cpu_count(), "os.sched_getaffinity", len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))'
144147
- name: Test
145148
run: tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }}
146149

@@ -162,7 +165,7 @@ jobs:
162165
CXX: i686-linux-gnu-g++
163166
CC: i686-linux-gnu-gcc
164167
steps:
165-
- uses: actions/checkout@v3
168+
- uses: actions/checkout@v4
166169
- name: Install 32-bit build dependencies
167170
run: |
168171
sudo dpkg --add-architecture i386 && \
@@ -185,8 +188,8 @@ jobs:
185188
default: 3.11.1
186189
command: python -c "import platform; print(f'{platform.architecture()=} {platform.machine()=}');"
187190
- name: Install tox
188-
run: pip install --upgrade 'setuptools!=50' tox==4.11.0
191+
run: pip install setuptools==68.2.2 tox==4.11.0
189192
- name: Setup tox environment
190193
run: tox run -e py --notest
191194
- name: Test
192-
run: tox run -e py --skip-pkg-install -- -n 2 mypyc/test/
195+
run: tox run -e py --skip-pkg-install -- -n 4 mypyc/test/

.github/workflows/test_stubgenc.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test stubgenc on pybind11-mypy-demo
1+
name: Test stubgenc on pybind11_fixtures
22

33
on:
44
workflow_dispatch:
@@ -10,6 +10,7 @@ on:
1010
- 'misc/test-stubgenc.sh'
1111
- 'mypy/stubgenc.py'
1212
- 'mypy/stubdoc.py'
13+
- 'mypy/stubutil.py'
1314
- 'test-data/stubgen/**'
1415

1516
permissions:
@@ -26,10 +27,10 @@ jobs:
2627
runs-on: ubuntu-latest
2728
steps:
2829

29-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3031

3132
- name: Setup 🐍 3.8
32-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3334
with:
3435
python-version: 3.8
3536

.pre-commit-config.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
exclude: '^(mypyc/external/)|(mypy/typeshed/)' # Exclude all vendored code from lints
1+
exclude: '^(mypyc/external/)|(mypy/typeshed/)|misc/typeshed_patches' # Exclude all vendored code from lints
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.4.0 # must match test-requirements.txt
4+
rev: v4.5.0 # must match test-requirements.txt
55
hooks:
66
- id: trailing-whitespace
77
- id: end-of-file-fixer
88
- repo: https://github.com/psf/black-pre-commit-mirror
9-
rev: 23.7.0 # must match test-requirements.txt
9+
rev: 24.1.1 # must match test-requirements.txt
1010
hooks:
1111
- id: black
12+
exclude: '^(test-data/)'
1213
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.0.281 # must match test-requirements.txt
14+
rev: v0.2.0 # must match test-requirements.txt
1415
hooks:
1516
- id: ruff
1617
args: [--exit-non-zero-on-fix]

0 commit comments

Comments
 (0)