8000 Merge remote-tracking branch 'upstream/main' into immortal-references · python/cpython@9f3ed39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9f3ed39

Browse files
Merge remote-tracking branch 'upstream/main' into immortal-references
2 parents a719b41 + cec5d85 commit 9f3ed39

File tree

790 files changed

+32363
-35332
lines changed

Some content is hidden

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

790 files changed

+32363
-35332
lines changed

.azure-pipelines/windows-release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ parameters:
4343
# Eventually when we stop releasing anything that old, we can drop this
4444
# argument (and make it implicitly always 'true')
4545
- name: ARM64TclTk
46-
displayName: "Use Tcl/Tk for ARM64"
46+
displayName: "Use Tcl/Tk for ARM64 (3.11 and later)"
4747
type: boolean
4848
default: true
4949
- name: DoPGO
5050
displayName: "Run PGO"
5151
type: boolean
5252
default: true
53+
- name: DoCHM
54+
displayName: "Produce compiled help document (pre-3.11)"
55+
type: boolean
56+
default: false
5357
- name: DoLayout
5458
displayName: "Produce full layout artifact"
5559
type: boolean
@@ -86,6 +90,7 @@ variables:
8690
${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
8791
SigningCertificate: ${{ parameters.SigningCertificate }}
8892
SigningDescription: ${{ parameters.SigningDescription }}
93+
DoCHM: ${{ parameters.DoCHM }}
8994
DoLayout: ${{ parameters.DoLayout }}
9095
DoMSIX: ${{ parameters.DoMSIX }}
9196
DoNuget: ${{ parameters.DoNuget }}

.azure-pipelines/windows-release/gpg-sign.yml

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

.azure-pipelines/windows-release/msi-steps.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ steps:
2121
inputs:
2222
sourceFolder: $(Build.BinariesDirectory)\doc
2323
targetFolder: $(Build.SourcesDirectory)\Doc\build
24-
contents: |
25-
htmlhelp\*.chm
2624

2725
- task: DownloadPipelineArtifact@1
2826
displayName: 'Download artifact: bin_win32'

.azure-pipelines/windows-release/stage-build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ jobs:
55
- job: Build_Docs
66
displayName: Docs build
77
pool:
8-
#name: 'Windows Release'
98
vmImage: windows-2022
109

1110
workspace:
@@ -21,14 +20,10 @@ jobs:
2120

2221
- script: Doc\make.bat htmlhelp
2322< 10000 /td>
displayName: 'Build CHM docs'
23+
condition: and(succeeded(), eq(variables['DoCHM'], 'true'))
2424
env:
2525
BUILDDIR: $(Build.BinariesDirectory)\Doc
2626

27-
#- powershell: |
28-
# mkdir -Force "$(Build.BinariesDirectory)\Doc\htmlhelp"
29-
# iwr "https://www.python.org/ftp/python/3.8.0/python380.chm" -OutFile "$(Build.BinariesDirectory)\Doc\htmlhelp\python390a0.chm"
30-
# displayName: 'Cheat at building CHM docs'
31-
3227
- task: CopyFiles@2
3328
displayName: 'Assemble artifact: Doc'
3429
inputs:
@@ -44,6 +39,7 @@ jobs:
4439
targetPath: $(Build.ArtifactStagingDirectory)\Doc
4540
artifactName: doc
4641

42+
4743
- job: Build_Python
4844
displayName: Python build
4945

.azure-pipelines/windows-release/stage-publish-pythonorg.yml

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,32 @@ jobs:
8484
condition: and(succeeded(), ne(variables['PublishARM64'], 'true'))
8585

8686

87-
- template: ./gpg-sign.yml
88-
parameters:
89-
GPGKeyFile: 'python-signing.key'
90-
Files: 'doc\htmlhelp\*.chm, msi\*\*, embed\*.zip'
87+
- task: DownloadSecureFile@1
88+
name: gpgkey
89+
inputs:
90+
secureFile: 'python-signing.key'
91+
displayName: 'Download GPG key'
92+
93+
- powershell: |
94+
git clone https://github.com/python/cpython-bin-deps --branch gpg --single-branch --depth 1 --progress -v "gpg"
95+
gpg/gpg2.exe --import "$(gpgkey.secureFilePath)"
96+
$files = gci -File "msi\*\*", "embed\*.zip"
97+
if ("$(DoCHM)" -ieq "true") {
98+
$files = $files + (gci -File "doc\htmlhelp\*.chm")
99+
}
100+
$files.FullName | %{
101+
gpg/gpg2.exe -ba --batch --passphrase $(GPGPassphrase) $_
102+
"Made signature for $_"
103+
}
104+
displayName: 'Generate GPG signatures'
105+
workingDirectory: $(Build.BinariesDirectory)
106+
107+
- powershell: |
108+
$p = gps "gpg-agent" -EA 0
109+
if ($p) { $p.Kill() }
110+
displayName: 'Kill GPG agent'
111+
condition: true
112+
91113
92114
- powershell: >
93115
$(Build.SourcesDirectory)\Tools\msi\uploadrelease.ps1
@@ -113,7 +135,7 @@ jobs:
113135
114136
- powershell: |
115137
$failures = 0
116-
gci "msi\*\*-webinstall.exe" -File | %{
138+
gci "msi\*\*.exe" -File | %{
117139
$d = mkdir "tests\$($_.BaseName)" -Force
118140
gci $d -r -File | del
119141
$ic = copy $_ $d -PassThru
@@ -133,7 +155,11 @@ jobs:
133155
displayName: 'Test layouts'
134156
135157
- powershell: |
136-
$hashes = gci doc\htmlhelp\python*.chm, msi\*\*.exe, embed\*.zip | `
158+
$files = gci -File "msi\*\*.exe", "embed\*.zip"
159+
if ("$(DoCHM)" -ieq "true") {
160+
$files = $files + (gci -File "doc\htmlhelp\python*.chm")
161+
}
162+
$hashes = $files | `
137163
Sort-Object Name | `
138164
Format-Table Name, @{
139165
Label="MD5";
@@ -148,9 +174,13 @@ jobs:
148174
149175
- powershell: |
150176
"Copying:"
151-
(gci msi\*\python*.asc, doc\htmlhelp\*.asc, embed\*.asc).FullName
177+
$files = gci -File "msi\*\python*.asc", "embed\*.asc"
178+
if ("$(DoCHM)" -ieq "true") {
179+
$files = $files + (gci -File "doc\htmlhelp\*.asc")
180+
}
181+
$files.FullName
152182
$d = mkdir "$(Build.ArtifactStagingDirectory)\hashes" -Force
153-
move msi\*\python*.asc, doc\htmlhelp\*.asc, embed\*.asc $d -Force
183+
move $files $d -Force
154184
gci msi -Directory | %{ move "msi\$_\*.asc" (mkdir "$d\$_" -Force) }
155185
workingDirectory: $(Build.BinariesDirectory)
156186
displayName: 'Copy GPG signatures for build'

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,17 @@ PC/readme.txt text eol=crlf
6060

6161
**/clinic/*.c.h generated
6262
*_db.h generated
63+
Doc/data/stable_abi.dat generated
6364
Doc/library/token-list.inc generated
6465
Include/internal/pycore_ast.h generated
6566
Include/internal/pycore_ast_state.h generated
6667
Include/opcode.h generated
6768
Include/token.h generated
6869
Lib/keyword.py generated
70+
Lib/test/test_stable_abi_ctypes.py generated
6971
Lib/token.py generated
7072
Objects/typeslots.inc generated
73+
PC/python3dll.c generated
7174
Parser/parser.c generated
7275
Parser/token.c generated
7376
Programs/test_frozenmain.h generated

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,6 @@ Lib/ast.py @isidentical
146146
# macOS
147147
/Mac/ @python/macos-team
148148
**/*osx_support* @python/macos-team
149+
150+
# pathlib
151+
**/*pathlib* @brettcannon

.github/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ comments they leave and their "Details" links, respectively. The key points of
4444
our workflow that are not covered by a bot or status check are:
4545

4646
- All discussions that are not directly related to the code in the pull request
47-
should happen on bugs.python.org
47+
should happen on `GitHub Issues <https://github.com/python/cpython/issues>`_.
4848
- Upon your first non-trivial pull request (which includes documentation changes),
4949
feel free to add yourself to ``Misc/ACKS``
5050

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Submit a bug report
4+
labels: "type-bug"
5+
---
6+
7+
<!--
8+
If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not
9+
the right place to seek help. Consider the following options instead:
10+
11+
- reading the Python tutorial: https://docs.python.org/3/tutorial/
12+
- posting in the "Users" category on discuss.python.org: https://discuss.python.org/c/users/7
13+
- emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list
14+
- searching our issue tracker (https://github.com/python/cpython/issues) to see if
15+
your problem has already been reported
16+
-->
17+
18+
**Bug report**
19+
20+
A clear and concise description of what the bug is.
21+
Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.
22+
23+
**Your environment**
24+
25+
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
26+
27+
- CPython versions tested on:
28+
- Operating system and architecture:
10000
29+
30+
<!--
31+
You can freely edit this text. Remove any lines you believe are unnecessary.
32+
-->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
contact_links:
2+
- name: "Getting help"
3+
about: "Ask questions about using Python and debugging errors on Discourse."
4+
url: "https://discuss.python.org/c/users/7"
5+
- name: "Proposing new features"
6+
about: "Submit major feature proposal (e.g. syntax changes) to an ideas forum first."
7+
url: "https://discuss.python.org/c/ideas/6"

.github/ISSUE_TEMPLATE/crash.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Crash report
3+
about: A hard crash of the interpreter, possibly with a core dump
4+
labels: "type-crash"
5+
---
6+
7+
<!--
8+
Use this template for hard crashes of the interpreter, segmentation faults, failed C-level assertions, and similar.
9+
Do not submit this form if you encounter an exception being unexpectedly raised from a Python function.
10+
Most of the time, these should be filed as bugs, rather than crashes.
11+
12+
The CPython interpreter is itself written in a different programming language, C.
13+
For CPython, a "crash" is when Python itself fails, leading to a traceback in the C stack.
14+
-->
15+
16+
**Crash report**
17+
18+
Tell us what happened, ideally including a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example).
19+
20+
**Error messages**
21+
22+
Enter any relevant error message caused by the crash, including a core dump if there is one.
23+
24+
**Your environment**
25+
26+
<!-- Include as many relevant details as possible about the environment you experienced the bug in -->
27+
28+
- CPython versions tested on:
29+
- Operating system and architecture:
30+
31+
<!--
32+
You can freely edit this text. Remove any lines you believe are unnecessary.
33+
-->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: Documentation
3+
about: Report a problem with the documentation
4+
labels: "docs"
5+
---
6+
7+
**Documentation**
8+
9+
(A clear and concise description of the issue.)

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature or enhancement
3+
about: Submit a proposal for a new CPython feature or enhancement
4+
labels: "type-feature"
5+
---
6+
7+
**Feature or enhancement**
8+
9+
(A clear and concise description of your proposal.)
10+
11+
**Pitch**
12+
13+
(Explain why this feature or enhacement should be implemented and how it would be used.
14+
Add examples, if applicable.)
15+
16+
**Previous discussion**
17+
18+
<!--
19+
New features to Python should first be discussed elsewhere before creating issues on GitHub,
20+
for example in the "ideas" category (https://discuss.python.org/c/ideas/6) of discuss.python.org,
21+
or the python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/).
22+
Use this space to post links to the places where you have already discussed this feature proposal:
23+
-->
24+
25+
26+
<!--
27+
You can freely edit this text. Remove any lines you believe are unnecessary.
28+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Please read this comment in its entirety. It's quite important.
77
It should be in the following format:
88
99
```
10-
bpo-NNNN: Summary of the changes made
10+
gh-NNNNN: Summary of the changes made
1111
```
1212
13-
Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.
13+
Where: gh-NNNNN refers to the GitHub issue number.
1414
1515
Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.
1616

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Tests
22

3-
# bpo-40548: "paths-ignore" is not used to skip documentation-only PRs, because
3+
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
44
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
55
# mandatory but not scheduled because of "paths-ignore".
66
on:
@@ -82,6 +82,9 @@ jobs:
8282
run: make regen-configure
8383
- name: Build CPython
8484
run: |
85+
# Deepfreeze will usually cause global objects to be added or removed,
86+
# so we run it before regen-global-objects gets rum (in regen-all).
87+
make regen-deepfreeze
8588
make -j4 regen-all
8689
make regen-stdlib-module-names
8790
- name: Check for changes

0 commit comments

Comments
 (0)
0