Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0ecee3

Browse files
committed
Merge remote-tracking branch 'origin/master' into bpo-30744-make-locals-closure-safe
Update implementation to account for the replaceable frame evaluation function pointer.
2 parents 5b63e7c + 94d2c8d commit f0ecee3

File tree

1,754 files changed

+90049
-43457
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,754 files changed

+90049
-43457
lines changed

.azure-pipelines/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
testRunPlatform: macos
4343

4444
pool:
45-
vmImage: xcode9-macos10.13
45+
vmImage: macos-10.14
4646

4747
steps:
4848
- template: ./macos-steps.yml
@@ -59,7 +59,7 @@ jobs:
5959
variables:
6060
testRunTitle: '$(build.sourceBranchName)-linux'
6161
testRunPlatform: linux
62-
openssl_version: 1.1.1b
62+
openssl_version: 1.1.1d
6363

6464
steps:
6565
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
116116
variables:
117117
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118118
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.1b
119+
openssl_version: 1.1.1d
120120

121121
steps:
122122
- template: ./posix-steps.yml
@@ -131,7 +131,7 @@ jobs:
131131
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132132

133133
pool:
134-
vmImage: vs2017-win2016
134+
vmImage: windows-2019
135135

136136
strategy:
137137
matrix:
@@ -145,7 +145,7 @@ jobs:
145145
buildOpt: '-p x64'
146146
testRunTitle: '$(Build.SourceBranchName)-win64'
147147
testRunPlatform: win64
148-
maxParallel: 2
148+
maxParallel: 4
149149

150150
steps:
151151
- template: ./windows-steps.yml

.azure-pipelines/docs-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
inputs:
1313
versionSpec: '>=3.6'
1414

15-
- script: python -m pip install sphinx==1.8.2 blurb python-docs-theme
15+
- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme
1616
displayName: 'Install build dependencies'
1717

1818
- ${{ if ne(parameters.latex, 'true') }}:
@@ -21,7 +21,7 @@ steps:
2121
displayName: 'Build documentation'
2222

2323
- ${{ if eq(parameters.latex, 'true') }}:
24-
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
24+
- script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full
2525
displayName: 'Install LaTeX'
2626

2727
- script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb'

.azure-pipelines/macos-steps.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ steps:
1414

1515
- script: make buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml"
1616
displayName: 'Tests'
17+
continueOnError: true
18+
timeoutInMinutes: 30
1719

1820
- task: PublishTestResults@2
1921
displayName: 'Publish Test Results'

.azure-pipelines/posix-deps-apt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
apt-get update
23

34
apt-get -yq install \

.azure-pipelines/pr.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
testRunPlatform: macos
4141

4242
pool:
43-
vmImage: xcode9-macos10.13
43+
vmImage: macos-10.14
4444

4545
steps:
4646
- template: ./macos-steps.yml
@@ -59,7 +59,7 @@ jobs:
5959
variables:
6060
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
6161
testRunPlatform: linux
62-
openssl_version: 1.1.0j
62+
openssl_version: 1.1.1d
6363

6464
steps:
6565
- template: ./posix-steps.yml
@@ -116,7 +116,7 @@ jobs:
116116
variables:
117117
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118118
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.0j
119+
openssl_version: 1.1.1d
120120

121121
steps:
122122
- template: ./posix-steps.yml
@@ -131,7 +131,7 @@ jobs:
131131
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132132

133133
pool:
134-
vmImage: vs2017-win2016
134+
vmImage: windows-2019
135135

136136
strategy:
137137
matrix:
@@ -145,7 +145,10 @@ jobs:
145145
buildOpt: '-p x64'
146146
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
147147
testRunPlatform: win64
148-
maxParallel: 2
148+
winarm64:
149+
arch: arm64
150+
buildOpt: '-p arm64'
151+
maxParallel: 4
149152

150153
steps:
151154
- template: ./windows-steps.yml

.azure-pipelines/windows-release.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: Release_$(Build.SourceBranchName)_$(SourceTag)_$(Date:yyyyMMdd)$(Rev:.rr)
2+
3+
variables:
4+
__RealSigningCertificate: 'Python Software Foundation'
5+
# QUEUE TIME VARIABLES
6+
# GitRemote: python
7+
# SourceTag:
8+
# DoPGO: true
9+
# SigningCertificate: 'Python Software Foundation'
10+
# SigningDescription: 'Built: $(Build.BuildNumber)'
11+
# DoLayout: true
12+
# DoMSIX: true
13+
# DoNuget: true
14+
# DoEmbed: true
15+
# DoMSI: true
16+
# DoPublish: false
17+
# PyDotOrgUsername: ''
18+
# PyDotOrgServer: ''
19+
# BuildToPublish: ''
20+
21+
trigger: none
22+
pr: none
23+
24+
stages:
25+
- stage: Build
26+
displayName: Build binaries
27+
condition: and(succeeded(), not(variables['BuildToPublish']))
28+
jobs:
29+
- template: windows-release/stage-build.yml
30+
31+
- stage: Sign
32+
displayName: Sign binaries
33+
dependsOn: Build
34+
condition: and(succeeded(), not(variables['BuildToPublish']))
35+
jobs:
36+
- template: windows-release/stage-sign.yml
37+
38+
- stage: Layout
39+
displayName: Generate layouts
40+
dependsOn: Sign
41+
condition: and(succeeded(), not(variables['BuildToPublish']))
42+
jobs:
43+
- template: windows-release/stage-layout-full.yml
44+
- template: windows-release/stage-layout-embed.yml
45+
- template: windows-release/stage-layout-nuget.yml
46+
47+
- stage: Pack
48+
dependsOn: Layout
49+
condition: and(succeeded(), not(variables['BuildToPublish']))
50+
jobs:
51+
- template: windows-release/stage-pack-nuget.yml
52+
53+
- stage: Test
54+
dependsOn: Pack
55+
condition: and(succeeded(), not(variables['BuildToPublish']))
56+
jobs:
57+
- template: windows-release/stage-test-embed.yml
58+
- template: windows-release/stage-test-nuget.yml
59+
60+
- stage: Layout_MSIX
61+
displayName: Generate MSIX layouts
62+
dependsOn: Sign
63+
condition: and(succeeded(), and(eq(variables['DoMSIX'], 'true'), not(variables['BuildToPublish'])))
64+
jobs:
65+
- template: windows-release/stage-layout-msix.yml
66+
67+
- stage: Pack_MSIX
68+
displayName: Package MSIX
69+
dependsOn: Layout_MSIX
70+
condition: and(succeeded(), not(variables['BuildToPublish']))
71+
jobs:
72+
- template: windows-release/stage-pack-msix.yml
73+
74+
- stage: Build_MSI
75+
displayName: Build MSI installer
76+
dependsOn: Sign
77+
condition: and(succeeded(), and(eq(variables['DoMSI'], 'true'), not(variables['BuildToPublish'])))
78+
jobs:
79+
- template: windows-release/stage-msi.yml
80+
81+
- stage: Test_MSI
82+
displayName: Test MSI installer
83+
dependsOn: Build_MSI
84+
condition: and(succeeded(), not(variables['BuildToPublish']))
85+
jobs:
86+
- template: windows-release/stage-test-msi.yml
87+
88+
- stage: PublishPyDotOrg
89+
displayName: Publish to python.org
90+
dependsOn: ['Test_MSI', 'Test']
91+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
92+
jobs:
93+
- template: windows-release/stage-publish-pythonorg.yml
94+
95+
- stage: PublishNuget
96+
displayName: Publish to nuget.org
97+
dependsOn: Test
98+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
99+
jobs:
100+
- template: windows-release/stage-publish-nugetorg.yml
101+
102+
- stage: PublishStore
103+
displayName: Publish to Store
104+
dependsOn: Pack_MSIX
105+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), not(variables['BuildToPublish'])))
106+
jobs:
107+
- template: windows-release/stage-publish-store.yml
108+
109+
110+
- stage: PublishExistingPyDotOrg
111+
displayName: Publish existing build to python.org
112+
dependsOn: []
113+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
114+
jobs:
115+
- template: windows-release/stage-publish-pythonorg.yml
116+
117+
- stage: PublishExistingNuget
118+
displayName: Publish existing build to nuget.org
119+
dependsOn: []
120+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
121+
jobs:
122+
- template: windows-release/stage-publish-nugetorg.yml
123+
124+
- stage: PublishExistingStore
125+
displayName: Publish existing build to Store
126+
dependsOn: []
127+
condition: and(succeeded(), and(eq(variables['DoPublish'], 'true'), variables['BuildToPublish']))
128+
jobs:
129+
- template: windows-release/stage-publish-store.yml
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
parameters:
2+
ShouldPGO: false
3+
4+
steps:
5+
- template: ./checkout.yml
6+
7+
- powershell: |
8+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
9+
Write-Host "##vso[task.setvariable variable=VersionText]$($d.PythonVersion)"
10+
Write-Host "##vso[task.setvariable variable=VersionNumber]$($d.PythonVersionNumber)"
11+
Write-Host "##vso[task.setvariable variable=VersionHex]$($d.PythonVersionHex)"
12+
Write-Host "##vso[task.setvariable variable=VersionUnique]$($d.PythonVersionUnique)"
13+
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)"
14+
Write-Host "##vso[build.addbuildtag]$($d.PythonVersion)-$(Name)"
15+
displayName: 'Extract version numbers'
16+
17+
- ${{ if eq(parameters.ShouldPGO, 'false') }}:
18+
- powershell: |
19+
$env:SigningCertificate = $null
20+
.\PCbuild\build.bat -v -p $(Platform) -c $(Configuration)
21+
displayName: 'Run build'
22+
env:
23+
IncludeUwp: true
24+
Py_OutDir: '$(Build.BinariesDirectory)\bin'
25+
26+
- ${{ if eq(parameters.ShouldPGO, 'true') }}:
27+
- powershell: |
28+
$env:SigningCertificate = $null
29+
.\PCbuild\build.bat -v -p $(Platform) --pgo
30+
displayName: 'Run build with PGO'
31+
env:
32+
IncludeUwp: true
33+
Py_OutDir: '$(Build.BinariesDirectory)\bin'
34+
35+
- powershell: |
36+
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
37+
$tool = (gci -r "$kitroot\Bin\*\x64\signtool.exe" | sort FullName -Desc | select -First 1)
38+
if (-not $tool) {
39+
throw "SDK is not available"
40+
}
41+
Write-Host "##vso[task.prependpath]$($tool.Directory)"
42+
displayName: 'Add WinSDK tools to path'
43+
44+
- powershell: |
45+
$env:SigningCertificate = $null
46+
$(_HostPython) PC\layout -vv -b "$(Build.BinariesDirectory)\bin" -t "$(Build.BinariesDirectory)\catalog" --catalog "${env:CAT}.cdf" --preset-default --arch $(Arch)
47+
makecat "${env:CAT}.cdf"
48+
del "${env:CAT}.cdf"
49+
if (-not (Test-Path "${env:CAT}.cat")) {
50+
throw "Failed to build catalog file"
51+
}
52+
displayName: 'Generate catalog'
53+
env:
54+
CAT: $(Build.BinariesDirectory)\bin\$(Arch)\python
55+
PYTHON_HEXVERSION: $(VersionHex)
56+
57+
- task: PublishPipelineArtifact@0
58+
displayName: 'Publish binaries'
59+
condition: and(succeeded(), not(and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate'])))
60+
inputs:
61+
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
62+
artifactName: bin_$(Name)
63+
64+
- task: PublishPipelineArtifact@0
65+
displayName: 'Publish binaries for signing'
66+
condition: and(succeeded(), and(eq(variables['Configuration'], 'Release'), variables['SigningCertificate']))
67+
inputs:
68+
targetPath: '$(Build.BinariesDirectory)\bin\$(Arch)'
69+
artifactName: unsigned_bin_$(Name)
70+
71+
- task: CopyFiles@2
72+
displayName: 'Layout Artifact: symbols'
73+
inputs:
74+
sourceFolder: $(Build.BinariesDirectory)\bin\$(Arch)
75+
targetFolder: $(Build.ArtifactStagingDirectory)\symbols\$(Name)
76+
flatten: true
77+
contents: |
78+
**\*.pdb
79+
80+
- task: PublishBuildArtifacts@1
81+
displayName: 'Publish Artifact: symbols'
82+
inputs:
83+
PathToPublish: '$(Build.ArtifactStagingDirectory)\symbols'
84+
ArtifactName: symbols
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
parameters:
2+
depth: 3
3+
4+
steps:
5+
- checkout: none
6+
7+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch https://github.com/$(GitRemote)/cpython.git .
8+
displayName: 'git clone ($(GitRemote)/$(SourceTag))'
9+
condition: and(succeeded(), and(variables['GitRemote'], variables['SourceTag']))
10+
11+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(SourceTag) --single-branch $(Build.Repository.Uri) .
12+
displayName: 'git clone (<default>/$(SourceTag))'
13+
condition: and(succeeded(), and(not(variables['GitRemote']), variables['SourceTag']))
14+
15+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch https://github.com/$(GitRemote)/cpython.git .
16+
displayName: 'git clone ($(GitRemote)/<default>)'
17+
condition: and(succeeded(), and(variables['GitRemote'], not(variables['SourceTag'])))
18+
19+
- script: git clone --progress -v --depth ${{ parameters.depth }} --branch $(Build.SourceBranchName) --single-branch $(Build.Repository.Uri) .
20+
displayName: 'git clone'
21+
condition: and(succeeded(), and(not(variables['GitRemote']), not(variables['SourceTag'])))
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Locate the Windows SDK and add its binaries directory to PATH
2+
#
3+
# `toolname` can be overridden to use a different marker file.
4+
5+
parameters:
6+
toolname: signtool.exe
7+
8+
steps:
9+
- powershell: |
10+
$kitroot = (gp 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\').KitsRoot10
11+
$tool = (gci -r "$kitroot\Bin\*\${{ parameters.toolname }}" | sort FullName -Desc | select -First 1)
12+
if (-not $tool) {
13+
throw "SDK is not available"
14+
}
15+
Write-Host "##vso[task.prependpath]$($tool.Directory)"
16+
Write-Host "Adding $($tool.Directory) to PATH"
17+
displayName: 'Add WinSDK tools to path'

0 commit comments

Comments
 (0)