Skip to content

Commit 42c39a3

Browse files
Merge branch 'master' of github.com:python/cpython into fix-issue21914
* 'master' of github.com:python/cpython: (2949 commits) Add files in tests/test_peg_generator to the install target lists (GH-19723) bpo-40398: Fix typing.get_args() for special generic aliases. (GH-19720) bpo-40348: Fix typos in the programming FAQ (GH-19729) bpo-38387: Formally document PyDoc_STRVAR and PyDoc_STR macros (GH-16607) bpo-40401: Remove duplicate pyhash.h include from pythoncore.vcxproj (GH-19725) bpo-40387: Improve queue join() example. (GH-19724) bpo-40396: Support GenericAlias in the typing functions. (GH-19718) Fix typo in Lib/typing.py (GH-19717) Fix typo in object.__format__ docs (GH-19504) bpo-40275: Avoid importing logging in test.support (GH-19601) bpo-40275: Avoid importing socket in test.support (GH-19603) bpo-40275: Avoid importing asyncio in test.support (GH-19600) bpo-40279: Add some error-handling to the module initialisation docs example (GH-19705) closes bpo-40385: Remove Tools/scripts/checkpyc.py (GH-19709) bpo-40334: Add What's New sections for PEP 617 and PEP 585 (GH-19704) bpo-40340: Separate examples more clearly in the programming FAQ (GH-19688) bpo-40360: Deprecate lib2to3 module in light of PEP 617 (GH-19663) bpo-40334: Rewrite test_c_parser to avoid memory leaks (GH-19694) bpo-38061: subprocess uses closefrom() on FreeBSD (GH-19697) bpo-38061: os.closerange() uses closefrom() on FreeBSD (GH-19696) ...
2 parents 38e8fab + 4044c84 commit 42c39a3

File tree

2,159 files changed

+230160
-91168
lines changed

Some content is hidden

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

2,159 files changed

+230160
-91168
lines changed

.azure-pipelines/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ jobs:
3535
- job: macOS_CI_Tests
3636
displayName: macOS CI Tests
3737
dependsOn: Prebuild
38-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
38+
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
39+
# bpo-39837: macOS tests on Azure Pipelines are disabled
40+
condition: false
3941

4042
variables:
4143
testRunTitle: '$(build.sourceBranchName)-macos'
4244
testRunPlatform: macos
4345

4446
pool:
45-
vmImage: xcode9-macos10.13
47+
vmImage: macos-10.14
4648

4749
steps:
4850
- template: ./macos-steps.yml
@@ -59,7 +61,7 @@ jobs:
5961
variables:
6062
testRunTitle: '$(build.sourceBranchName)-linux'
6163
testRunPlatform: linux
62-
openssl_version: 1.1.0j
64+
openssl_version: 1.1.1f
6365

6466
steps:
6567
- template: ./posix-steps.yml
@@ -116,7 +118,7 @@ jobs:
116118
variables:
117119
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118120
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.0j
121+
openssl_version: 1.1.1f
120122

121123
steps:
122124
- template: ./posix-steps.yml
@@ -131,7 +133,7 @@ jobs:
131133
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132134

133135
pool:
134-
vmImage: vs2017-win2016
136+
vmImage: windows-2019
135137

136138
strategy:
137139
matrix:
@@ -145,7 +147,7 @@ jobs:
145147
buildOpt: '-p x64'
146148
testRunTitle: '$(Build.SourceBranchName)-win64'
147149
testRunPlatform: win64
148-
maxParallel: 2
150+
maxParallel: 4
149151

150152
steps:
151153
- 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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ steps:
66
- script: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-azdev
77
displayName: 'Configure CPython (debug)'
88

9-
- script: make -s -j4
9+
- script: make -j4
1010
displayName: 'Build CPython'
1111

1212
- script: make pythoninfo
1313
displayName: 'Display build info'
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/posix-steps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ steps:
2020
- script: ./configure --with-pydebug
2121
displayName: 'Configure CPython (debug)'
2222

23-
- script: make -s -j4
23+
- script: make -j4
2424
displayName: 'Build CPython'
2525

2626
- ${{ if eq(parameters.coverage, 'true') }}:
@@ -49,7 +49,7 @@ steps:
4949
- script: ./venv/bin/python -m coverage xml
5050
displayName: 'Generate coverage.xml'
5151

52-
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash)
52+
- script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) -y .github/codecov.yml
5353
displayName: 'Publish code coverage results'
5454

5555

.azure-pipelines/pr.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ jobs:
3333
- job: macOS_PR_Tests
3434
displayName: macOS PR Tests
3535
dependsOn: Prebuild
36-
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
36+
#condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
37+
# bpo-39837: macOS tests on Azure Pipelines are disabled
38+
condition: false
3739

3840
variables:
3941
testRunTitle: '$(system.pullRequest.TargetBranch)-macos'
4042
testRunPlatform: macos
4143

4244
pool:
43-
vmImage: xcode9-macos10.13
45+
vmImage: macos-10.14
4446

4547
steps:
4648
- template: ./macos-steps.yml
@@ -59,7 +61,7 @@ jobs:
5961
variables:
6062
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
6163
testRunPlatform: linux
62-
openssl_version: 1.1.0j
64+
openssl_version: 1.1.1f
6365

6466
steps:
6567
- template: ./posix-steps.yml
@@ -116,7 +118,7 @@ jobs:
116118
variables:
117119
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
118120
testRunPlatform: linux-coverage
119-
openssl_version: 1.1.0j
121+
openssl_version: 1.1.1f
120122

121123
steps:
122124
- template: ./posix-steps.yml
@@ -131,7 +133,7 @@ jobs:
131133
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
132134

133135
pool:
134-
vmImage: vs2017-win2016
136+
vmImage: windows-2019
135137

136138
strategy:
137139
matrix:
@@ -145,7 +147,10 @@ jobs:
145147
buildOpt: '-p x64'
146148
testRunTitle: '$(System.PullRequest.TargetBranch)-win64'
147149
testRunPlatform: win64
148-
maxParallel: 2
150+
winarm64:
151+
arch: arm64
152+
buildOpt: '-p arm64'
153+
maxParallel: 4
149154

150155
steps:
151156
- template: ./windows-steps.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

0 commit comments

Comments
 (0)