Skip to content

Commit 7893353

Browse files
authored
Merge branch 'main' into pickle-reducer-override
2 parents 958ca6c + 0125fe2 commit 7893353

File tree

2,417 files changed

+49561
-41983
lines changed

Some content is hidden

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

2,417 files changed

+49561
-41983
lines changed

.flake8

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
[flake8]
2-
# NQA: Ruff won't warn about redundant `# noqa: Y`
32
# Y: Flake8 is only used to run flake8-pyi, everything else is in Ruff
43
# F821: Typeshed is a testing ground for flake8-pyi, which monkeypatches F821
5-
select = NQA, Y, F821
4+
select = Y, F821
65
# Ignore rules normally excluded by default
76
extend-ignore = Y090
87
per-file-ignores =
9-
# We should only need to noqa Y and F821 codes in .pyi files
10-
*.py: NQA
118
# Generated protobuf files:
129
# Y021: Include docstrings
1310
# Y023: Alias typing as typing_extensions
@@ -16,4 +13,3 @@ per-file-ignores =
1613
stubs/*_pb2.pyi: Y021, Y023, Y026, Y053
1714

1815
exclude = .venv*,.git
19-
noqa_require_code = true

.github/renovate.json

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/renovate.json5

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"dependencyDashboard": true,
4+
"suppressNotifications": ["prEditedNotification"],
5+
"extends": ["config:recommended"],
6+
"labels": ["bot: dependencies"],
7+
"semanticCommits": "disabled",
8+
"separateMajorMinor": false,
9+
"prHourlyLimit": 10,
10+
// This package rule disables updates for `actions/setup-python` Python versions:
11+
// it's better to do these manually as there's often a reason why we can't use
12+
// the latest Python version in CI for a specific job
13+
ignoreDeps: ["python"],
14+
"pre-commit": {
15+
"enabled": true
16+
},
17+
"packageRules": [
18+
{
19+
groupName: "GitHub Actions",
20+
matchManagers: ["github-actions"],
21+
description: "Quarterly update of GitHub Action dependencies",
22+
schedule: ["every 3 months on the first day of the month"]
23+
},
24+
{
25+
groupName: "most test/lint dependencies",
26+
matchManagers: ["pip_requirements", "pre-commit"],
27+
matchPackageNames: ["!pytype", "!pyright"],
28+
description: "Quarterly update of most test dependencies",
29+
schedule: ["every 3 months on the first day of the month"]
30+
},
31+
{
32+
"groupName": "pytype and pyright",
33+
"matchManagers": ["pip_requirements"],
34+
"matchPackageNames": ["pytype", "pyright"],
35+
"description": "Daily update of pyright and pytype",
36+
"schedule": ["before 4am"]
37+
}
38+
]
39+
}

.github/workflows/daily.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ env:
2929

3030
jobs:
3131
stubtest-stdlib:
32-
name: Check stdlib with stubtest
32+
name: "stubtest: stdlib"
3333
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
3434
runs-on: ${{ matrix.os }}
3535
strategy:
3636
matrix:
37-
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
38-
# which can can cause problems with os module constants.
39-
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
40-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
37+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
4139
fail-fast: false
4240

4341
steps:
@@ -56,23 +54,19 @@ jobs:
5654
run: python tests/stubtest_stdlib.py
5755

5856
stubtest-third-party:
59-
name: Check third party stubs with stubtest
57+
name: "stubtest: third party"
6058
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
6159
runs-on: ${{ matrix.os }}
6260
strategy:
6361
matrix:
64-
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
65-
# which causes problems when testing gdb.
66-
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
62+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
6763
shard-index: [0, 1, 2, 3]
6864
fail-fast: false
6965
steps:
7066
- uses: actions/checkout@v4
7167
- uses: actions/setup-python@v5
7268
with:
73-
# TODO: Use Python 3.12. As of 2024-03-08, several third-party
74-
# packages fail to install with Python 3.12.
75-
python-version: "3.11"
69+
python-version: "3.13"
7670
cache: pip
7771
cache-dependency-path: |
7872
requirements-tests.txt
@@ -86,7 +80,7 @@ jobs:
8680
8781
if [ "${{ runner.os }}" = "Linux" ]; then
8882
if [ -n "$PACKAGES" ]; then
89-
sudo apt-get update && sudo apt-get install -y $PACKAGES
83+
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
9084
fi
9185
9286
PYTHON_EXECUTABLE="xvfb-run python"
@@ -105,7 +99,7 @@ jobs:
10599
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
106100
107101
stub-uploader:
108-
name: Run the stub_uploader tests
102+
name: stub_uploader tests
109103
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
110104
runs-on: ubuntu-latest
111105
steps:
@@ -120,8 +114,9 @@ jobs:
120114
path: stub_uploader
121115
- uses: actions/setup-python@v5
122116
with:
123-
python-version: "3.12"
124-
- uses: astral-sh/setup-uv@v5
117+
# Keep in sync with stub_uploader's check_scripts.yml workflow.
118+
python-version: "3.13"
119+
- uses: astral-sh/setup-uv@v6
125120
- name: Run tests
126121
run: |
127122
cd stub_uploader
@@ -130,7 +125,7 @@ jobs:
130125
131126
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
132127
create-issue-on-failure:
133-
name: Create an issue if daily tests failed
128+
name: Create issue on failure
134129
runs-on: ubuntu-latest
135130
needs: [stubtest-stdlib, stubtest-third-party, stub-uploader]
136131
if: ${{ github.repository == 'python/typeshed' && always() && github.event_name == 'schedule' && (needs.stubtest-stdlib.result == 'failure' || needs.stubtest-third-party.result == 'failure' || needs.stub-uploader.result == 'failure') }}

.github/workflows/meta_tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ concurrency:
2828

2929
jobs:
3030
mypy:
31-
name: Run mypy against the scripts and tests directories
31+
name: Check scripts and tests with mypy
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
@@ -38,12 +38,12 @@ jobs:
3838
- uses: actions/checkout@v4
3939
- uses: actions/setup-python@v5
4040
with:
41-
python-version: "3.12"
41+
python-version: "3.13"
4242
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
4343
- run: uv pip install -r requirements-tests.txt --system
4444
- run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }}
4545
pyright:
46-
name: Run pyright against the scripts and tests directories
46+
name: Check scripts and tests with pyright
4747
runs-on: ubuntu-latest
4848
strategy:
4949
matrix:
@@ -53,6 +53,8 @@ jobs:
5353
- uses: actions/checkout@v4
5454
- uses: actions/setup-python@v5
5555
with:
56+
# TODO: Since pytype is not available for Python 3.13, and
57+
# pytype_test.py imports pytype, we need to use Python 3.12 for now.
5658
python-version: "3.12"
5759
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
5860
- run: uv pip install -r requirements-tests.txt --system
@@ -70,7 +72,7 @@ jobs:
7072
- uses: actions/checkout@v4
7173
- uses: actions/setup-python@v5
7274
with:
73-
python-version: "3.12"
75+
python-version: "3.13"
7476
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
7577
- name: Git config
7678
run: |

.github/workflows/stubsabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fetch-depth: 0
2727
- uses: actions/setup-python@v5
2828
with:
29-
python-version: "3.12"
29+
python-version: "3.13"
3030
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
3131
- name: git config
3232
run: |
@@ -39,7 +39,7 @@ jobs:
3939

4040
# https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
4141
create-issue-on-failure:
42-
name: Create an issue if stubsabot failed
42+
name: Create issue on failure
4343
runs-on: ubuntu-latest
4444
needs: [stubsabot]
4545
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubsabot.result == 'failure') }}

.github/workflows/stubtest_stdlib.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ concurrency:
2626

2727
jobs:
2828
stubtest-stdlib:
29-
name: Check stdlib with stubtest
29+
name: "stubtest: stdlib"
3030
runs-on: ${{ matrix.os }}
3131
strategy:
3232
matrix:
33-
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
34-
# which can can cause problems with os module constants.
35-
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
36-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
33+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
34+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
3735
fail-fast: false
3836

3937
steps:

.github/workflows/stubtest_third_party.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ concurrency:
2727

2828
jobs:
2929
stubtest-third-party:
30-
name: Check third party stubs with stubtest
30+
name: "stubtest: third party"
3131

3232
runs-on: ${{ matrix.os }}
3333
strategy:
3434
matrix:
35-
# As of 2024-10-18, ubuntu-latest can refer to different Ubuntu versions,
36-
# which causes problems when testing gdb.
37-
os: ["ubuntu-24.04", "windows-latest", "macos-latest"]
35+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
3836
fail-fast: false
3937

4038
steps:
@@ -43,9 +41,7 @@ jobs:
4341
fetch-depth: 0
4442
- uses: actions/setup-python@v5
4543
with:
46-
# TODO: Use Python 3.12. As of 2024-03-08, several third-party
47-
# packages fail to install with Python 3.12.
48-
python-version: "3.11"
44+
python-version: "3.13"
4945
cache: pip
5046
cache-dependency-path: |
5147
requirements-tests.txt
@@ -71,7 +67,7 @@ jobs:
7167
if [ "${{ runner.os }}" = "Linux" ]; then
7268
if [ -n "$PACKAGES" ]; then
7369
echo "Installing apt packages: $PACKAGES"
74-
sudo apt-get update && sudo apt-get install -y $PACKAGES
70+
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
7571
fi
7672
7773
PYTHON_EXECUTABLE="xvfb-run python"

0 commit comments

Comments
 (0)