Skip to content

Commit 43c9c99

Browse files
committed
Merge remote-tracking branch 'upstream/main' into nested-async-comp
2 parents e21ae1a + f24777c commit 43c9c99

File tree

2,169 files changed

+200095
-90536
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,169 files changed

+200095
-90536
lines changed

.azure-pipelines/ci.yml

+8-43
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
variables:
2-
manylinux: false
32
coverage: false
43

5-
resources:
6-
containers:
7-
- container: manylinux1
8-
image: pyca/cryptography-manylinux1:x86_64
4+
trigger: ['main', '3.9', '3.8', '3.7']
95

106
jobs:
117
- job: Prebuild
128
displayName: Pre-build checks
139

1410
pool:
15-
vmImage: ubuntu-16.04
11+
vmImage: ubuntu-18.04
1612

1713
steps:
1814
- template: ./prebuild-checks.yml
@@ -24,7 +20,7 @@ jobs:
2420
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2521

2622
pool:
27-
vmImage: ubuntu-16.04
23+
vmImage: ubuntu-18.04
2824

2925
steps:
3026
- template: ./docs-steps.yml
@@ -56,50 +52,19 @@ jobs:
5652
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5753

5854
pool:
59-
vmImage: ubuntu-16.04
55+
vmImage: ubuntu-18.04
6056

6157
variables:
6258
testRunTitle: '$(build.sourceBranchName)-linux'
6359
testRunPlatform: linux
64-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1k
6561

6662
steps:
6763
- template: ./posix-steps.yml
6864
parameters:
6965
dependencies: apt
7066

7167

72-
- job: ManyLinux1_CI_Tests
73-
displayName: ManyLinux1 CI Tests
74-
dependsOn: Prebuild
75-
condition: |
76-
and(
77-
and(
78-
succeeded(),
79-
eq(variables['manylinux'], 'true')
80-
),
81-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
82-
)
83-
84-
pool:
85-
vmImage: ubuntu-16.04
86-
87-
container: manylinux1
88-
89-
variables:
90-
testRunTitle: '$(build.sourceBranchName)-manylinux1'
91-
testRunPlatform: manylinux1
92-
openssl_version: ''
93-
94-
steps:
95-
- template: ./posix-steps.yml
96-
parameters:
97-
dependencies: yum
98-
sudo_dependencies: ''
99-
xvfb: false
100-
patchcheck: false
101-
102-
10368
- job: Ubuntu_Coverage_CI_Tests
10469
displayName: Ubuntu CI Tests (coverage)
10570
dependsOn: Prebuild
@@ -113,12 +78,12 @@ jobs:
11378
)
11479
11580
pool:
116-
vmImage: ubuntu-16.04
81+
vmImage: ubuntu-18.04
11782

11883
variables:
11984
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
12085
testRunPlatform: linux-coverage
121-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1k
12287

12388
steps:
12489
- template: ./posix-steps.yml
@@ -139,7 +104,7 @@ jobs:
139104
matrix:
140105
win32:
141106
arch: win32
142-
buildOpt:
107+
buildOpt: '-p Win32'
143108
testRunTitle: '$(Build.SourceBranchName)-win32'
144109
testRunPlatform: win32
145110
win64:

.azure-pipelines/docs-steps.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ steps:
1212
inputs:
1313
versionSpec: '>=3.6'
1414

15-
- script: python -m pip install sphinx==2.2.0 blurb python-docs-theme
15+
- script: python -m pip install -r requirements.txt
16+
workingDirectory: '$(build.sourcesDirectory)/Doc'
1617
displayName: 'Install build dependencies'
1718

1819
- ${{ if ne(parameters.latex, 'true') }}:
19-
- script: make check suspicious html PYTHON=python
20+
- script: make check html PYTHON=python
2021
workingDirectory: '$(build.sourcesDirectory)/Doc'
2122
displayName: 'Build documentation'
2223

@@ -31,7 +32,7 @@ steps:
3132
- ${{ if eq(parameters.upload, 'true') }}:
3233
- task: PublishBuildArtifacts@1
3334
displayName: 'Publish docs'
34-
35+
3536
inputs:
3637
PathToPublish: '$(build.sourcesDirectory)/Doc/build'
3738
ArtifactName: docs

.azure-pipelines/pr.yml

+8-43
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
variables:
2-
manylinux: false
32
coverage: false
43

5-
resources:
6-
containers:
7-
- container: manylinux1
8-
image: pyca/cryptography-manylinux1:x86_64
4+
pr: ['main', '3.9', '3.8', '3.7']
95

106
jobs:
117
- job: Prebuild
128
displayName: Pre-build checks
139

1410
pool:
15-
vmImage: ubuntu-16.04
11+
vmImage: ubuntu-18.04
1612

1713
steps:
1814
- template: ./prebuild-checks.yml
@@ -24,7 +20,7 @@ jobs:
2420
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2521

2622
pool:
27-
vmImage: ubuntu-16.04
23+
vmImage: ubuntu-18.04
2824

2925
steps:
3026
- template: ./docs-steps.yml
@@ -56,50 +52,19 @@ jobs:
5652
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5753

5854
pool:
59-
vmImage: ubuntu-16.04
55+
vmImage: ubuntu-18.04
6056

6157
variables:
6258
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
6359
testRunPlatform: linux
64-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1k
6561

6662
steps:
6763
- template: ./posix-steps.yml
6864
parameters:
6965
dependencies: apt
7066

7167

72-
- job: ManyLinux1_PR_Tests
73-
displayName: ManyLinux1 PR Tests
74-
dependsOn: Prebuild
75-
condition: |
76-
and(
77-
and(
78-
succeeded(),
79-
eq(variables['manylinux'], 'true')
80-
),
81-
eq(dependencies.Prebuild.outputs['tests.run'], 'true')
82-
)
83-
84-
pool:
85-
vmImage: ubuntu-16.04
86-
87-
container: manylinux1
88-
89-
variables:
90-
testRunTitle: '$(system.pullRequest.TargetBranch)-manylinux1'
91-
testRunPlatform: manylinux1
92-
openssl_version: ''
93-
94-
steps:
95-
- template: ./posix-steps.yml
96-
parameters:
97-
dependencies: yum
98-
sudo_dependencies: ''
99-
xvfb: false
100-
patchcheck: false
101-
102-
10368
- job: Ubuntu_Coverage_PR_Tests
10469
displayName: Ubuntu PR Tests (coverage)
10570
dependsOn: Prebuild
@@ -113,12 +78,12 @@ jobs:
11378
)
11479
11580
pool:
116-
vmImage: ubuntu-16.04
81+
vmImage: ubuntu-18.04
11782

11883
variables:
11984
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
12085
testRunPlatform: linux-coverage
121-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1k
12287

12388
steps:
12489
- template: ./posix-steps.yml
@@ -139,7 +104,7 @@ jobs:
139104
matrix:
140105
win32:
141106
arch: win32
142-
buildOpt:
107+
buildOpt: '-p Win32'
143108
testRunTitle: '$(System.PullRequest.TargetBranch)-win32'
144109
testRunPlatform: win32
145110
win64:

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

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
steps:
22
- template: ./checkout.yml
33

4+
- powershell: |
5+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
6+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
7+
displayName: 'Update signing description'
8+
condition: and(succeeded(), not(variables['SigningDescription']))
9+
410
- task: DownloadPipelineArtifact@1
511
displayName: 'Download artifact: doc'
612
inputs:

.azure-pipelines/windows-release/stage-pack-msix.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,26 @@ jobs:
105105
clean: all
106106

107107
steps:
108-
- checkout: none
108+
- template: ./checkout.yml
109109
- template: ./find-sdk.yml
110110

111+
- powershell: |
112+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
113+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
114+
displayName: 'Update signing description'
115+
condition: and(succeeded(), not(variables['SigningDescription']))
116+
111117
- task: DownloadBuildArtifacts@0
112118
displayName: 'Download Artifact: unsigned_msix'
113119
inputs:
114120
artifactName: unsigned_msix
115121
downloadPath: $(Build.BinariesDirectory)
116122

123+
# MSIX must be signed and timestamped simultaneously
117124
- powershell: |
118125
$failed = $true
119126
foreach ($retry in 1..3) {
120-
signtool sign /a /n "$(SigningCertificate)" /fd sha256 /t http://timestamp.verisign.com/scripts/timestamp.dll /d "$(SigningDescription)" (gi *.msix)
127+
signtool sign /a /n "$(SigningCertificate)" /fd sha256 /tr http://timestamp.digicert.com/ /td sha256 /d "$(SigningDescription)" (gi *.msix)
121128
if ($?) {
122129
$failed = $false
123130
break

.azure-pipelines/windows-release/stage-pack-nuget.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
condition: and(succeeded(), eq(variables['DoNuget'], 'true'))
55

66
pool:
7-
vmImage: windows-2019
7+
name: 'Windows Release'
88

99
workspace:
1010
clean: all
@@ -36,6 +36,14 @@ jobs:
3636
nuget pack "$(Build.BinariesDirectory)\layout\python.nuspec" -OutputDirectory $(Build.ArtifactStagingDirectory) -NoPackageAnalysis -NonInteractive
3737
displayName: 'Create nuget package'
3838
39+
- powershell: |
40+
gci *.nupkg | %{
41+
nuget sign "$_" -CertificateSubjectName "$(SigningCertificate)" -Timestamper http://timestamp.digicert.com/ -Overwrite
42+
}
43+
displayName: 'Sign nuget package'
44+
workingDirectory: $(Build.ArtifactStagingDirectory)
45+
condition: and(succeeded(), variables['SigningCertificate'])
46+
3947
- task: PublishBuildArtifacts@1
4048
displayName: 'Publish Artifact: nuget'
4149
inputs:

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
- template: ./checkout.yml
2727
- template: ./find-sdk.yml
2828

29+
- powershell: |
30+
$d = (.\PCbuild\build.bat -V) | %{ if($_ -match '\s+(\w+):\s*(.+)\s*$') { @{$Matches[1] = $Matches[2];} }};
31+
Write-Host "##vso[task.setvariable variable=SigningDescription]Python $($d.PythonVersion)"
32+
displayName: 'Update signing description'
33+
condition: and(succeeded(), not(variables['SigningDescription']))
34+
2935
- powershell: |
3036
Write-Host "##vso[build.addbuildtag]signed"
3137
displayName: 'Add build tags'
@@ -51,7 +57,7 @@ jobs:
5157
$files = (gi ${{ parameters.Include }} -Exclude ${{ parameters.Exclude }})
5258
$failed = $true
5359
foreach ($retry in 1..10) {
54-
signtool timestamp /t http://timestamp.verisign.com/scripts/timestamp.dll $files
60+
signtool timestamp /tr http://timestamp.digicert.com/ /td sha256 $files
5561
if ($?) {
5662
$failed = $false
5763
break

.gitattributes

+12-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ PC/clinic/*.h linguist-generated=true
4747
Python/clinic/*.h linguist-generated=true
4848
Python/importlib.h linguist-generated=true
4949
Python/importlib_external.h linguist-generated=true
50-
Include/Python-ast.h linguist-generated=true
50+
Include/internal/pycore_ast.h linguist-generated=true
5151
Python/Python-ast.c linguist-generated=true
5252
Include/opcode.h linguist-generated=true
5353
Python/opcode_targets.h linguist-generated=true
@@ -57,3 +57,14 @@ Doc/library/token-list.inc linguist-generated=true
5757
Include/token.h linguist-generated=true
5858
Lib/token.py linguist-generated=true
5959
Parser/token.c linguist-generated=true
60+
Programs/test_frozenmain.h linguist-generated=true
61+
62+
# Language aware diff headers
63+
# https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more
64+
# https://gist.github.com/tekin/12500956bd56784728e490d8cef9cb81
65+
*.c diff=cpp
66+
*.h diff=cpp
67+
*.css diff=css
68+
*.html diff=html
69+
*.py diff=python
70+
*.md diff=markdown

0 commit comments

Comments
 (0)