Skip to content

Commit 13c01d7

Browse files
authored
Merge branch 'main' into str_methods_2
2 parents 27cc327 + add16f1 commit 13c01d7

File tree

1,724 files changed

+71005
-37507
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,724 files changed

+71005
-37507
lines changed

.azure-pipelines/ci.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
variables:
2-
coverage: false
3-
41
trigger: ['main', '3.11', '3.10', '3.9', '3.8', '3.7']
52

63
jobs:
@@ -14,24 +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-
3514
- job: Ubuntu_CI_Tests
3615
displayName: Ubuntu CI Tests
3716
dependsOn: Prebuild
@@ -51,33 +30,6 @@ jobs:
5130
dependencies: apt
5231

5332

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-
8133
- job: Windows_CI_Tests
8234
displayName: Windows CI Tests
8335
dependsOn: Prebuild

.azure-pipelines/macos-steps.yml

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

.azure-pipelines/posix-steps.yml

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
parameters:
2-
coverage: false
32
sudo_dependencies: sudo
43
dependencies: apt
54
patchcheck: true
@@ -23,47 +22,16 @@ steps:
2322
- script: make -j4
2423
displayName: 'Build CPython'
2524

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'
25+
- script: make pythoninfo
26+
displayName: 'Display build info'
2927

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
28+
- script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
29+
displayName: 'Tests'
30+
env:
31+
${{ if eq(parameters.xvfb, 'true') }}:
32+
COMMAND: xvfb-run make
33+
${{ if ne(parameters.xvfb, 'true') }}:
34+
COMMAND: make
6735

6836
- ${{ if eq(parameters.patchcheck, 'true') }}:
6937
- script: |

.azure-pipelines/pr.yml

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

63
jobs:
@@ -14,26 +11,6 @@ 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-
3714
- job: Ubuntu_PR_Tests
3815
displayName: Ubuntu PR Tests
3916
dependsOn: Prebuild
@@ -53,33 +30,6 @@ jobs:
5330
dependencies: apt
5431

5532

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-
8333
- job: Windows_PR_Tests
8434
displayName: Windows PR Tests
8535
dependsOn: Prebuild

.cirrus-DISABLED.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
4+
freebsd_task:
5+
freebsd_instance:
6+
matrix:
7+
- image: freebsd-13-2-release-amd64
8+
# Turn off TCP and UDP blackhole. It is not enabled by default in FreeBSD,
9+
# but it is in the FreeBSD GCE images as used by Cirrus-CI. It causes even
10+
# local local connections to fail with ETIMEDOUT instead of ECONNREFUSED.
11+
# For more information see https://reviews.freebsd.org/D41751 and
12+
# https://github.com/cirruslabs/cirrus-ci-docs/issues/483.
13+
sysctl_script:
14+
- sysctl net.inet.tcp.blackhole=0
15+
- sysctl net.inet.udp.blackhole=0
16+
configure_script:
17+
- mkdir build
18+
- cd build
19+
- ../configure --with-pydebug
20+
build_script:
21+
- cd build
22+
- make -j$(sysctl -n hw.ncpu)
23+
pythoninfo_script:
24+
- cd build
25+
- make pythoninfo
26+
test_script:
27+
- cd build
28+
# dtrace fails to build on FreeBSD - see gh-73263
29+
- make buildbottest TESTOPTS="-j0 -x test_dtrace --timeout=600"

.coveragerc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
# Regexes for lines to exclude from consideration
6+
exclude_lines =
7+
# Don't complain if non-runnable code isn't run:
8+
if 0:
9+
if __name__ == .__main__.:
10+
raise AssertionError\(
11+
12+
# Empty bodies in protocols or abstract methods
13+
^\s*def [a-zA-Z0-9_]+\(.*\)(\s*->.*)?:\s*\.\.\.(\s*#.*)?$
14+
^\s*\.\.\.(\s*#.*)?$
15+
16+
.*# pragma: no cover
17+
.*# pragma: no branch
18+
19+
# Additions for IDLE:
20+
.*# htest #
21+
if not (_htest or _utest):
22+
if not .*_utest:
23+
if .*_htest:
24+

.gitattributes

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PC/classicAppCompat.* binary
2424
[attr]noeol -text
2525

2626
Lib/test/cjkencodings/* noeol
27-
Lib/test/coding20731.py noeol
27+
Lib/test/tokenizedata/coding20731.py noeol
2828
Lib/test/decimaltestdata/*.decTest noeol
2929
Lib/test/test_email/data/*.txt noeol
3030
Lib/test/test_importlib/resources/data01/* noeol
@@ -66,15 +66,20 @@ PCbuild/readme.txt dos
6666
[attr]generated linguist-generated=true diff=generated
6767

6868
**/clinic/*.c.h generated
69+
**/clinic/*.cpp.h generated
70+
**/clinic/*.h.h generated
6971
*_db.h generated
7072
Doc/data/stable_abi.dat generated
7173
Doc/library/token-list.inc generated
7274
Include/internal/pycore_ast.h generated
7375
Include/internal/pycore_ast_state.h generated
7476
Include/internal/pycore_opcode.h generated
77+
Include/internal/pycore_opcode_metadata.h generated
7578
Include/internal/pycore_*_generated.h generated
7679
Include/opcode.h generated
80+
Include/opcode_ids.h generated
7781
Include/token.h generated
82+
Lib/_opcode_metadata.py generated
7883
Lib/keyword.py generated
7984
Lib/test/levenshtein_examples.json generated
8085
Lib/test/test_stable_abi_ctypes.py generated
@@ -87,7 +92,7 @@ Programs/test_frozenmain.h generated
8792
Python/Python-ast.c generated
8893
Python/executor_cases.c.h generated
8994
Python/generated_cases.c.h generated
90-
Python/opcode_metadata.h generated
95+
Python/abstract_interp_cases.c.h generated
9196
Python/opcode_targets.h generated
9297
Python/stdlib_module_names.h generated
9398
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 11 additions & 1 deletion
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
@@ -69,6 +70,7 @@ Python/traceback.c @iritkatriel
6970

7071
# Import (including importlib).
7172
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
73+
/Python/import.c @kumaraditya303
7274
**/*importlib/resources/* @jaraco @warsaw @FFY00
7375
**/importlib/metadata/* @jaraco @warsaw
7476

@@ -172,4 +174,12 @@ Doc/c-api/stable.rst @encukou
172174
**/*pathlib* @barneygale
173175

174176
# zipfile.Path
175-
**/*zipfile/*_path.py @jaraco
177+
**/*zipfile/_path/* @jaraco
178+
179+
# Argument Clinic
180+
/Tools/clinic/** @erlend-aasland @AlexWaygood
181+
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
182+
Doc/howto/clinic.rst @erlend-aasland
183+
184+
# WebAssembly
185+
/Tools/wasm/ @brettcannon

.github/ISSUE_TEMPLATE/bug.md

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

0 commit comments

Comments
 (0)