Skip to content

Commit c47279b

Browse files
authored
Merge branch 'main' into pywin32--Add-win32gui._TrackMouseEvent
2 parents 9f28012 + 6d4db2d commit c47279b

File tree

1,327 files changed

+24452
-12451
lines changed

Some content is hidden

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

1,327 files changed

+24452
-12451
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
# Set linguist-language to support comments syntax highlight
55
**/stubtest_allowlist*.txt linguist-language=ini
66
**/stubtest_allowlists/*.txt linguist-language=ini
7-
tests/pytype_exclude_list.txt linguist-language=ini
87
pyrightconfig*.json linguist-language=jsonc
98
.vscode/*.json linguist-language=jsonc

.github/renovate.json5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
{
2525
groupName: "most test/lint dependencies",
2626
matchManagers: ["pip_requirements", "pre-commit"],
27-
matchPackageNames: ["!pytype", "!pyright"],
27+
matchPackageNames: ["!pyright"],
2828
description: "Quarterly update of most test dependencies",
2929
schedule: ["every 3 months on the first day of the month"]
3030
},
3131
{
32-
"groupName": "pytype and pyright",
32+
"groupName": "pyright",
3333
"matchManagers": ["pip_requirements"],
34-
"matchPackageNames": ["pytype", "pyright"],
35-
"description": "Daily update of pyright and pytype",
34+
"matchPackageNames": ["pyright"],
35+
"description": "Daily update of pyright",
3636
"schedule": ["before 4am"]
3737
}
3838
]

.github/workflows/daily.yml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ env:
3030
jobs:
3131
stubtest-stdlib:
3232
name: "stubtest: stdlib"
33-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
33+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
3434
runs-on: ${{ matrix.os }}
3535
strategy:
3636
matrix:
3737
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
38-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
38+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
3939
fail-fast: false
4040

4141
steps:
42-
- uses: actions/checkout@v4
42+
- uses: actions/checkout@v5
4343
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
44-
uses: actions/setup-python@v5
44+
uses: actions/setup-python@v6
4545
with:
4646
python-version: ${{ matrix.python-version }}
4747
cache: pip
@@ -55,16 +55,16 @@ jobs:
5555

5656
stubtest-third-party:
5757
name: "stubtest: third party"
58-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
58+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
5959
runs-on: ${{ matrix.os }}
6060
strategy:
6161
matrix:
6262
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
6363
shard-index: [0, 1, 2, 3]
6464
fail-fast: false
6565
steps:
66-
- uses: actions/checkout@v4
67-
- uses: actions/setup-python@v5
66+
- uses: actions/checkout@v5
67+
- uses: actions/setup-python@v6
6868
with:
6969
python-version: "3.13"
7070
cache: pip
@@ -73,50 +73,59 @@ jobs:
7373
stubs/**/METADATA.toml
7474
- name: Install dependencies
7575
run: pip install -r requirements-tests.txt
76-
- name: Run stubtest
76+
- name: Install required system packages
7777
shell: bash
7878
run: |
7979
PACKAGES=$(python tests/get_stubtest_system_requirements.py)
8080
8181
if [ "${{ runner.os }}" = "Linux" ]; then
8282
if [ -n "$PACKAGES" ]; then
83+
printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8384
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
8485
fi
85-
86-
PYTHON_EXECUTABLE="xvfb-run python"
8786
else
8887
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
88+
printf "Installing Homebrew packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8989
brew install -q $PACKAGES
9090
fi
9191
9292
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
93+
printf "Installing Chocolatey packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
9394
choco install -y $PACKAGES
9495
fi
95-
96+
fi
97+
- name: Run stubtest
98+
shell: bash
99+
run: |
100+
if [ "${{ runner.os }}" = "Linux" ]; then
101+
PYTHON_EXECUTABLE="xvfb-run python"
102+
else
96103
PYTHON_EXECUTABLE="python"
97104
fi
98105
99-
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
106+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci-platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
100107
101108
stub-uploader:
102109
name: stub_uploader tests
103-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
110+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
104111
runs-on: ubuntu-latest
105112
steps:
106113
- name: Checkout typeshed
107-
uses: actions/checkout@v4
114+
uses: actions/checkout@v5
108115
with:
109116
path: typeshed
110117
- name: Checkout stub_uploader
111-
uses: actions/checkout@v4
118+
uses: actions/checkout@v5
112119
with:
113120
repository: typeshed-internal/stub_uploader
114121
path: stub_uploader
115-
- uses: actions/setup-python@v5
122+
- uses: actions/setup-python@v6
116123
with:
117124
# Keep in sync with stub_uploader's check_scripts.yml workflow.
118125
python-version: "3.13"
119126
- uses: astral-sh/setup-uv@v6
127+
with:
128+
version-file: "typeshed/requirements-tests.txt"
120129
- name: Run tests
121130
run: |
122131
cd stub_uploader
@@ -132,7 +141,7 @@ jobs:
132141
permissions:
133142
issues: write
134143
steps:
135-
- uses: actions/github-script@v7
144+
- uses: actions/github-script@v8
136145
with:
137146
github-token: ${{ secrets.GITHUB_TOKEN }}
138147
script: |

.github/workflows/meta_tests.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ jobs:
3535
platform: ["linux", "win32"]
3636
fail-fast: false
3737
steps:
38-
- uses: actions/checkout@v4
39-
- uses: actions/setup-python@v5
38+
- uses: actions/checkout@v5
39+
- uses: actions/setup-python@v6
4040
with:
4141
python-version: "3.13"
42-
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
42+
- uses: astral-sh/setup-uv@v6
43+
with:
44+
version-file: "requirements-tests.txt"
4345
- run: uv pip install -r requirements-tests.txt --system
4446
- run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }}
4547
pyright:
@@ -50,13 +52,13 @@ jobs:
5052
python-platform: ["Linux", "Windows"]
5153
fail-fast: false
5254
steps:
53-
- uses: actions/checkout@v4
54-
- uses: actions/setup-python@v5
55+
- uses: actions/checkout@v5
56+
- uses: actions/setup-python@v6
57+
with:
58+
python-version: "3.13"
59+
- uses: astral-sh/setup-uv@v6
5560
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.
58-
python-version: "3.12"
59-
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
61+
version-file: "requirements-tests.txt"
6062
- run: uv pip install -r requirements-tests.txt --system
6163
- name: Run pyright on typeshed
6264
uses: jakebailey/pyright-action@v2
@@ -69,11 +71,13 @@ jobs:
6971
name: Stubsabot dry run
7072
runs-on: ubuntu-latest
7173
steps:
72-
- uses: actions/checkout@v4
73-
- uses: actions/setup-python@v5
74+
- uses: actions/checkout@v5
75+
- uses: actions/setup-python@v6
7476
with:
7577
python-version: "3.13"
76-
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
78+
- uses: astral-sh/setup-uv@v6
79+
with:
80+
version-file: "requirements-tests.txt"
7781
- name: Git config
7882
run: |
7983
git config --global user.name stubsabot

.github/workflows/mypy_primer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
shard-index: [0, 1, 2, 3]
2626
fail-fast: false
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
path: typeshed_to_test
3131
fetch-depth: 0
32-
- uses: actions/setup-python@v5
32+
- uses: actions/setup-python@v6
3333
with:
3434
python-version: "3.13"
3535
- name: Install dependencies

.github/workflows/mypy_primer_comment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1919
steps:
2020
- name: Download diffs
21-
uses: actions/github-script@v7
21+
uses: actions/github-script@v8
2222
with:
2323
script: |
2424
const fs = require('fs');
@@ -44,7 +44,7 @@ jobs:
4444
4545
- name: Post comment
4646
id: post-comment
47-
uses: actions/github-script@v7
47+
uses: actions/github-script@v8
4848
with:
4949
github-token: ${{ secrets.GITHUB_TOKEN }}
5050
script: |

.github/workflows/stubsabot.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,17 @@ jobs:
1919
if: github.repository == 'python/typeshed'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v5
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
27-
- uses: actions/setup-python@v5
27+
- uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.13"
30-
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
30+
- uses: astral-sh/setup-uv@v6
31+
with:
32+
version-file: "requirements-tests.txt"
3133
- name: git config
3234
run: |
3335
git config --global user.name stubsabot
@@ -44,7 +46,7 @@ jobs:
4446
needs: [stubsabot]
4547
if: ${{ github.repository == 'python/typeshed' && always() && (needs.stubsabot.result == 'failure') }}
4648
steps:
47-
- uses: actions/github-script@v7
49+
- uses: actions/github-script@v8
4850
with:
4951
github-token: ${{ secrets.GITHUB_TOKEN }}
5052
script: |

.github/workflows/stubtest_stdlib.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
34-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
34+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
3535
fail-fast: false
3636

3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v5
3939
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: ${{ matrix.python-version }}
4343
cache: pip

.github/workflows/stubtest_third_party.yml

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

3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040
with:
4141
fetch-depth: 0
42-
- uses: actions/setup-python@v5
42+
- uses: actions/setup-python@v6
4343
with:
4444
python-version: "3.13"
4545
cache: pip
@@ -48,44 +48,54 @@ jobs:
4848
stubs/**/METADATA.toml
4949
- name: Install dependencies
5050
run: pip install -r requirements-tests.txt
51-
- name: Run stubtest
51+
- name: Determine changed stubs
5252
shell: bash
5353
run: |
5454
# This only runs stubtest on changed stubs, because it is much faster.
5555
# Use the daily.yml workflow to run stubtest on all third party stubs.
5656
function find_stubs {
5757
git diff --name-only origin/${{ github.base_ref }} HEAD | \
5858
egrep ^stubs/ | cut -d "/" -f 2 | sort -u | \
59-
(while read stub; do [ -d "stubs/$stub" ] && echo "$stub" || true; done)
59+
(while read stub; do [ -d "stubs/$stub" ] && echo -n "$stub " || true; done)
6060
}
6161
STUBS=$(find_stubs || echo '')
62-
62+
echo "Changed stubs: $STUBS"
63+
echo "STUBS=$STUBS" >> $GITHUB_ENV
64+
- name: Install required system packages
65+
shell: bash
66+
run: |
6367
if [ -n "$STUBS" ]; then
64-
echo "Testing $STUBS..."
6568
PACKAGES=$(python tests/get_stubtest_system_requirements.py $STUBS)
66-
6769
if [ "${{ runner.os }}" = "Linux" ]; then
6870
if [ -n "$PACKAGES" ]; then
69-
echo "Installing apt packages: $PACKAGES"
71+
printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
7072
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
7173
fi
72-
73-
PYTHON_EXECUTABLE="xvfb-run python"
7474
else
7575
if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
76-
echo "Installing Homebrew packages: $PACKAGES"
76+
printf "Installing Homebrew packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
7777
brew install -q $PACKAGES
7878
fi
7979
8080
if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
81-
echo "Installing Chocolatey packages: $PACKAGES"
81+
printf "Installing Chocolatey packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8282
choco install -y $PACKAGES
8383
fi
84+
fi
85+
fi
86+
- name: Run stubtest
87+
shell: bash
88+
run: |
89+
if [ -n "$STUBS" ]; then
90+
echo "Testing $STUBS..."
8491
92+
if [ "${{ runner.os }}" = "Linux" ]; then
93+
PYTHON_EXECUTABLE="xvfb-run python"
94+
else
8595
PYTHON_EXECUTABLE="python"
8696
fi
8797
88-
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified-platforms-only $STUBS
98+
$PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci-platforms-only $STUBS
8999
else
90100
echo "Nothing to test"
91101
fi

0 commit comments

Comments
 (0)