Skip to content

Commit 9b9b8c7

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pythongh-105223-apple-readline
2 parents 3465ca4 + 1ece084 commit 9b9b8c7

File tree

728 files changed

+19042
-10524
lines changed

Some content is hidden

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

728 files changed

+19042
-10524
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.yml

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

.gitattributes

Lines changed: 3 additions & 1 deletion
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,6 +66,8 @@ 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

.github/CODEOWNERS

Lines changed: 4 additions & 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
@@ -179,3 +180,6 @@ Doc/c-api/stable.rst @encukou
179180
/Tools/clinic/** @erlend-aasland @AlexWaygood
180181
/Lib/test/test_clinic.py @erlend-aasland @AlexWaygood
181182
Doc/howto/clinic.rst @erlend-aasland
183+
184+
# WebAssembly
185+
/Tools/wasm/ @brettcannon

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,26 @@ body:
99
1010
For help or advice on using Python, try one of the following options instead of opening a GitHub issue:
1111
12-
- Posting on [Discourse](https://discuss.python.org/c/users/7)
12+
- Asking on [Discourse](https://discuss.python.org/c/users/7) or [Stack Overflow](https://stackoverflow.com)
1313
- Reading the [Python tutorial](https://docs.python.org/3/tutorial/)
1414
- Emailing [python-list](https://mail.python.org/mailman/listinfo/python-list)
15-
- type: checkboxes
15+
16+
Make sure to also search the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc) to check that the bug has not already been reported.
17+
- type: textarea
1618
attributes:
17-
label: Checklist
18-
description: A bug in a third-party project (for example, `pip` or `requests`) should be reported to that project's issue tracker, not CPython
19-
options:
20-
- label: I am confident this is a bug in CPython, not a bug in a third-party project
21-
required: false
22-
- label: |
23-
I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),
24-
and am confident this bug has not been reported before
25-
required: false
19+
label: "Bug description:"
20+
description: >
21+
Give a clear and concise description of what happened.
22+
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
23+
[Copy and paste code where possible rather than using screenshots](https://meta.stackoverflow.com/a/285557/13990016),
24+
and put any code blocks inside triple backticks.
25+
26+
value: |
27+
```python
28+
# Add a code block here, if required
29+
```
30+
validations:
31+
required: true
2632
- type: dropdown
2733
attributes:
2834
label: "CPython versions tested on:"
@@ -47,23 +53,3 @@ body:
4753
- Other
4854
validations:
4955
required: false
50-
- type: input
51-
attributes:
52-
label: "Output from running 'python -VV' on the command line:"
53-
description: If you tested with multiple operating systems or architectures, feel free to provide details in the main bug description.
54-
validations:
55-
required: false
56-
- type: textarea
57-
attributes:
58-
label: "A clear and concise description of the bug:"
59-
description: >
60-
Tell us what happened.
61-
Include a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) if possible.
62-
Put any code blocks inside triple backticks.
63-
64-
value: |
65-
```python
66-
# Add a code block here, if required
67-
```
68-
validations:
69-
required: true

0 commit comments

Comments
 (0)