Skip to content

Commit 496d9c3

Browse files
authored
Merge branch 'main' into fix_kyiv
2 parents d12532a + 9ccf054 commit 496d9c3

File tree

318 files changed

+25461
-21341
lines changed

Some content is hidden

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

318 files changed

+25461
-21341
lines changed

.azure-pipelines/ci.yml

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
variables:
2-
coverage: false
3-
4-
trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
1+
trigger: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
52

63
jobs:
74
- job: Prebuild
@@ -14,70 +11,6 @@ jobs:
1411
- template: ./prebuild-checks.yml
1512

1613

17-
- job: macOS_CI_Tests
18-
displayName: macOS CI Tests
19-
dependsOn: Prebuild
20-
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
21-
# bpo-39837: macOS tests on Azure Pipelines are disabled
22-
condition: false
23-
24-
variables:
25-
testRunTitle: '$(build.sourceBranchName)-macos'
26-
testRunPlatform: macos
27-
28-
pool:
29-
vmImage: macos-10.15
30-
31-
steps:
32-
- template: ./macos-steps.yml
33-
34-
35-
- job: Ubuntu_CI_Tests
36-
displayName: Ubuntu CI Tests
37-
dependsOn: Prebuild
38-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
39-
40-
pool:
41-
vmImage: ubuntu-22.04
42-
43-
variables:
44-
testRunTitle: '$(build.sourceBranchName)-linux'
45-
testRunPlatform: linux
46-
openssl_version: 1.1.1u
47-
48-
steps:
49-
- template: ./posix-steps.yml
50-
parameters:
51-
dependencies: apt
52-
53-
54-
- job: Ubuntu_Coverage_CI_Tests
55-
displayName: Ubuntu CI Tests (coverage)
56-
dependsOn: Prebuild
57-
condition: |
58-
and(
59-
and(
60-
succeeded(),
61-
eq(variables['coverage'], 'true')
62-
),
63-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
64-
)
65-
66-
pool:
67-
vmImage: ubuntu-22.04
68-
69-
variables:
70-
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
71-
testRunPlatform: linux-coverage
72-
openssl_version: 1.1.1u
73-
74-
steps:
75-
- template: ./posix-steps.yml
76-
parameters:
77-
dependencies: apt
78-
coverage: true
79-
80-
8114
- job: Windows_CI_Tests
8215
displayName: Windows CI Tests
8316
dependsOn: Prebuild

.azure-pipelines/macos-steps.yml

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

.azure-pipelines/posix-steps.yml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
parameters:
2-
coverage: false
3-
sudo_dependencies: sudo
4-
dependencies: apt
5-
patchcheck: true
6-
xvfb: true
7-
81
steps:
92
- checkout: self
103
clean: true
@@ -14,7 +7,7 @@ steps:
147
- script: sudo setfacl -Rb /home/vsts
158
displayName: 'Workaround ACL issue'
169

17-
- script: ${{ parameters.sudo_dependencies }} ./.azure-pipelines/posix-deps-${{ parameters.dependencies }}.sh $(openssl_version)
10+
- script: sudo ./.azure-pipelines/posix-deps-apt.sh $(openssl_version)
1811
displayName: 'Install dependencies'
1912

2013
- script: ./configure --with-pydebug
@@ -23,61 +16,11 @@ steps:
2316
- script: make -j4
2417
displayName: 'Build CPython'
2518

26-
- ${{ if eq(parameters.coverage, 'true') }}:
27-
- script: ./python -m venv venv && ./venv/bin/python -m pip install -U coverage
28-
displayName: 'Set up virtual environment'
29-
30-
- script: ./venv/bin/python -m test.pythoninfo
31-
displayName: 'Display build info'
32-
33-
- script: |
34-
$COMMAND -m coverage run --pylib -m test \
35-
--fail-env-changed \
36-
-uall,-cpu \
37-
--junit-xml=$(build.binariesDirectory)/test-results.xml \
38-
-x test_multiprocessing_fork \
39-
-x test_multiprocessing_forkserver \
40-
-x test_multiprocessing_spawn \
41-
-x test_concurrent_futures
42-
displayName: 'Tests with coverage'
43-
env:
44-
${{ if eq(parameters.xvfb, 'true') }}:
45-
COMMAND: xvfb-run ./venv/bin/python
46-
${{ if ne(parameters.xvfb, 'true') }}:
47-
COMMAND: ./venv/bin/python
48-
49-
- script: ./venv/bin/python -m coverage xml
50-
displayName: 'Generate coverage.xml'
51-
52-
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
53-
displayName: 'Publish code coverage results'
54-
55-
56-
- ${{ if ne(parameters.coverage, 'true') }}:
57-
- script: make pythoninfo
58-
displayName: 'Display build info'
59-
60-
- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
61-
displayName: 'Tests'
62-
env:
63-
${{ if eq(parameters.xvfb, 'true') }}:
64-
COMMAND: xvfb-run make
65-
${{ if ne(parameters.xvfb, 'true') }}:
66-
COMMAND: make
67-
68-
- ${{ if eq(parameters.patchcheck, 'true') }}:
69-
- script: |
70-
git fetch origin
71-
./python Tools/patchcheck/patchcheck.py --ci true
72-
displayName: 'Run patchcheck.py'
73-
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
74-
19+
- script: make pythoninfo
20+
displayName: 'Display build info'
7521

76-
- task: PublishTestResults@2
77-
displayName: 'Publish Test Results'
78-
inputs:
79-
testResultsFiles: '$(build.binariesDirectory)/test-results.xml'
80-
mergeTestResults: true
81-
testRunTitle: $(testRunTitle)
82-
platform: $(testRunPlatform)
83-
condition: succeededOrFailed()
22+
- script: |
23+
git fetch origin
24+
./python Tools/patchcheck/patchcheck.py --ci true
25+
displayName: 'Run patchcheck.py'
26+
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))

.azure-pipelines/pr.yml

Lines changed: 3 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
variables:
2-
coverage: false
3-
4-
pr: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
1+
pr: ['main', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7']
52

63
jobs:
74
- job: Prebuild
@@ -14,28 +11,8 @@ jobs:
1411
- template: ./prebuild-checks.yml
1512

1613

17-
- job: macOS_PR_Tests
18-
displayName: macOS PR Tests
19-
dependsOn: Prebuild
20-
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
21-
# bpo-39837: macOS tests on Azure Pipelines are disabled
22-
condition: false
23-
24-
variables:
25-
testRunTitle: '$(system.pullRequest.TargetBranch)-macos'
26-
testRunPlatform: macos
27-
28-
pool:
29-
vmImage: macos-10.15
30-
31-
steps:
32-
- template: ./macos-steps.yml
33-
parameters:
34-
targetBranch: $(System.PullRequest.TargetBranch)
35-
36-
37-
- job: Ubuntu_PR_Tests
38-
displayName: Ubuntu PR Tests
14+
- job: Ubuntu_Patchcheck
15+
displayName: Ubuntu patchcheck
3916
dependsOn: Prebuild
4017
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
4118

@@ -49,63 +26,3 @@ jobs:
4926

5027
steps:
5128
- template: ./posix-steps.yml
52-
parameters:
53-
dependencies: apt
54-
55-
56-
- job: Ubuntu_Coverage_PR_Tests
57-
displayName: Ubuntu PR Tests (coverage)
58-
dependsOn: Prebuild
59-
condition: |
60-
and(
61-
and(
62-
succeeded(),
63-
eq(variables['coverage'], 'true')
64-
),
65-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
66-
)
67-
68-
pool:
69-
vmImage: ubuntu-22.04
70-
71-
variables:
72-
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
73-
testRunPlatform: linux-coverage
74-
openssl_version: 1.1.1u
75-
76-
steps:
77-
- template: ./posix-steps.yml
78-
parameters:
79-
dependencies: apt
80-
coverage: true
81-
82-
83-
- job: Windows_PR_Tests
84-
displayName: Windows PR Tests
85-
dependsOn: Prebuild
86-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
87-
88-
pool:
89-
vmImage: windows-2022
90-
91-
strategy:
92-
matrix:
93-
win32:
94-
arch: win32
95-
buildOpt: '-p Win32'
96-
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
97-
testRunPlatform: win32
98-
win64:
99-
arch: amd64
100-
buildOpt: '-p x64'
101-
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
102-
testRunPlatform: win64
103-
winarm64:
104-
arch: arm64
105-
buildOpt: '-p arm64'
106-
maxParallel: 4
107-
108-
steps:
109-
- template: ./windows-steps.yml
110-
parameters:
111-
targetBranch: $(System.PullRequest.TargetBranch)

.cirrus.yml renamed to .cirrus-DISABLED.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# gh-91960: Job disabled since Python is out of free credit (September 2023):
2+
# https://discuss.python.org/t/freebsd-gets-a-new-cirrus-ci-github-action-job-and-a-new-buildbot/33122/26
3+
14
freebsd_task:
25
freebsd_instance:
36
matrix:

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
# pre-commit
1111
.pre-commit-config.yaml @hugovk @AlexWaygood
12+
.ruff.toml @hugovk @AlexWaygood
1213

1314
# Build system
1415
configure* @erlend-aasland @corona10

.github/workflows/build.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
# into the PR branch anyway.
6464
#
6565
# https://github.com/python/core-workflow/issues/373
66-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
66+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc|^\.pre-commit-config\.yaml$|\.ruff\.toml$)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
6767
fi
6868
6969
# Check if we should run hypothesis tests
@@ -118,6 +118,8 @@ jobs:
118118
path: config.cache
119119
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
120120
- uses: actions/setup-python@v4
121+
with:
122+
python-version: '3.x'
121123
- name: Install Dependencies
122124
run: sudo ./.github/workflows/posix-deps-apt.sh
123125
- name: Add ccache to PATH
@@ -201,6 +203,21 @@ jobs:
201203
- name: Tests
202204
run: .\PCbuild\rt.bat -p x64 -d -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0
203205

206+
build_win_arm64:
207+
name: 'Windows (arm64)'
208+
runs-on: windows-latest
209+
timeout-minutes: 60
210+
needs: check_source
211+
if: needs.check_source.outputs.run_tests == 'true'
212+
env:
213+
IncludeUwp: 'true'
214+
steps:
215+
- uses: actions/checkout@v4
216+
- name: Register MSVC problem matcher
217+
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
218+
- name: Build CPython
219+
run: .\PCbuild\build.bat -e -d -p arm64
220+
204221
build_macos:
205222
name: 'macOS'
206223
runs-on: macos-latest
@@ -530,6 +547,7 @@ jobs:
530547
- check_generated_files
531548
- build_win32
532549
- build_win_amd64
550+
- build_win_arm64
533551
- build_macos
534552
- build_ubuntu
535553
- build_ubuntu_ssltests
@@ -546,6 +564,7 @@ jobs:
546564
build_macos,
547565
build_ubuntu_ssltests,
548566
build_win32,
567+
build_win_arm64,
549568
test_hypothesis,
550569
allowed-skips: >-
551570
${{
@@ -561,6 +580,7 @@ jobs:
561580
check_generated_files,
562581
build_win32,
563582
build_win_amd64,
583+
build_win_arm64,
564584
build_macos,
565585
build_ubuntu,
566586
build_ubuntu_ssltests,

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on: [push, pull_request, workflow_dispatch]
55
permissions:
66
contents: read
77

8+
env:
9+
FORCE_COLOR: 1
10+
RUFF_FORMAT: github
11+
812
concurrency:
913
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1014
cancel-in-progress: true

0 commit comments

Comments
 (0)