Skip to content

Commit 3645ccc

Browse files
author
Erlend E. Aasland
committed
Merge branch 'main' into bpo-36859
2 parents d1efa55 + fa106a6 commit 3645ccc

File tree

1,060 files changed

+95655
-49902
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,060 files changed

+95655
-49902
lines changed

.azure-pipelines/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
22
coverage: false
33

4-
trigger: ['master', '3.9', '3.8', '3.7']
4+
trigger: ['main', '3.9', '3.8', '3.7']
55

66
jobs:
77
- job: Prebuild
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1k
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1k
8787

8888
steps:
8989
- template: ./posix-steps.yml

.azure-pipelines/docs-steps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ 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') }}:

.azure-pipelines/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
22
coverage: false
33

4-
pr: ['master', '3.9', '3.8', '3.7']
4+
pr: ['main', '3.9', '3.8', '3.7']
55

66
jobs:
77
- job: Prebuild
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1g
60+
openssl_version: 1.1.1k
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -83,7 +83,7 @@ jobs:
8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1g
86+
openssl_version: 1.1.1k
8787

8888
steps:
8989
- template: ./posix-steps.yml

.gitattributes

Lines changed: 2 additions & 1 deletion
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,6 +57,7 @@ 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
6061

6162
# Language aware diff headers
6263
# https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more

.github/CODEOWNERS

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Python/ast_opt.c @isidentical
5353

5454

5555
# SSL
56-
**/*ssl* @python/crypto-team @tiran
57-
**/*.pem @python/crypto-team @tiran
56+
**/*ssl* @python/crypto-team
57+
**/*.pem @python/crypto-team
5858

5959
# CSPRNG
60-
Python/bootstrap_hash.c @python/crypto-team @tiran
60+
Python/bootstrap_hash.c @python/crypto-team
6161

6262
# Dates and times
6363
**/*datetime* @pganssle @abalkin
@@ -91,6 +91,10 @@ Parser/asdl.py @isidentical
9191
Parser/asdl_c.py @isidentical
9292
Lib/ast.py @isidentical
9393

94+
# Mock
95+
/Lib/unittest/mock.py @cjw296
96+
/Lib/unittest/test/testmock/* @cjw296
97+
9498
# SQLite 3
9599
**/*sqlite* @berkerpeksag
96100

.github/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- master
7+
- main
88

99
+ `Stable buildbots <http://buildbot.python.org/3.x.stable/>`_
1010

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Most PRs will require an issue number. Trivial changes, like fixing a typo, do n
1616
1717
# Backport Pull Request title
1818
19-
If this is a backport PR (PR made against branches other than `master`),
19+
If this is a backport PR (PR made against branches other than `main`),
2020
please ensure that the PR title is in the following format:
2121
2222
```
@@ -25,6 +25,6 @@ please ensure that the PR title is in the following format:
2525
2626
Where: [X.Y] is the branch name, e.g. [3.6].
2727
28-
GH-NNNN refers to the PR number from `master`.
28+
GH-NNNN refers to the PR number from `main`.
2929
3030
-->

.github/SECURITY.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ https://devguide.python.org/#status-of-python-branches
1010
## Reporting a Vulnerability
1111

1212
Please read the guidelines on reporting security issues [on the
13-
official website](
14-
https://www.python.org/news/security/#reporting-security-issues-in-python
15-
) for instructions on how to report a security-related problem to
13+
official website](https://www.python.org/dev/security/) for
14+
instructions on how to report a security-related problem to
1615
the Python team responsibly.
1716

1817
To reach the response team, email `security at python dot org`.

.github/codecov.yml

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

.github/workflows/build.yml

Lines changed: 76 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,34 @@ name: Tests
66
on:
77
push:
88
branches:
9-
- master
10-
- 3.9
11-
- 3.8
12-
- 3.7
9+
- 'main'
10+
- '3.10'
11+
- '3.9'
12+
- '3.8'
13+
- '3.7'
1314
pull_request:
1415
branches:
15-
- master
16-
- 3.9
17-
- 3.8
18-
- 3.7
16+
- 'main'
17+
- '3.10'
18+
- '3.9'
19+
- '3.8'
20+
- '3.7'
1921

2022
jobs:
2123
check_source:
2224
name: 'Check for source changes'
2325
runs-on: ubuntu-latest
2426
outputs:
2527
run_tests: ${{ steps.check.outputs.run_tests }}
28+
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
2629
steps:
2730
- uses: actions/checkout@v2
2831
- name: Check for source changes
2932
id: check
3033
run: |
3134
if [ -z "$GITHUB_BASE_REF" ]; then
3235
echo '::set-output name=run_tests::true'
36+
echo '::set-output name=run_ssl_tests::true'
3337
else
3438
git fetch origin $GITHUB_BASE_REF --depth=1
3539
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -46,6 +50,7 @@ jobs:
4650
#
4751
# https://github.com/python/core-workflow/issues/373
4852
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
53+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
4954
fi
5055
5156
check_generated_files:
@@ -127,31 +132,89 @@ jobs:
127132

128133
build_ubuntu:
129134
name: 'Ubuntu'
130-
runs-on: ubuntu-latest
135+
runs-on: ubuntu-20.04
131136
needs: check_source
132137
if: needs.check_source.outputs.run_tests == 'true'
133138
env:
134-
OPENSSL_VER: 1.1.1f
139+
OPENSSL_VER: 1.1.1k
135140
steps:
136141
- uses: actions/checkout@v2
137142
- name: Register gcc problem matcher
138143
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
139144
- name: Install Dependencies
140145
run: sudo ./.github/workflows/posix-deps-apt.sh
146+
- name: Configure OpenSSL env vars
147+
run: |
148+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
149+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
150+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
141151
- name: 'Restore OpenSSL build'
142152
id: cache-openssl
143-
uses: actions/[email protected].4
153+
uses: actions/[email protected].6
144154
with:
145155
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
146156
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
147157
- name: Install OpenSSL
148158
if: steps.cache-openssl.outputs.cache-hit != 'true'
149-
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $PWD/multissl --openssl $OPENSSL_VER --system Linux
159+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
160+
- name: Add ccache to PATH
161+
run: |
162+
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
163+
- name: Configure ccache action
164+
uses: hendrikmuhs/ccache-action@v1
150165
- name: Configure CPython
151-
run: ./configure --with-pydebug --with-openssl=$PWD/multissl/openssl/$OPENSSL_VER
166+
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
152167
- name: Build CPython
153168
run: make -j4
154169
- name: Display build info
155170
run: make pythoninfo
156171
- name: Tests
157172
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu"
173+
174+
build_ubuntu_ssltests:
175+
name: 'Ubuntu SSL tests with OpenSSL'
176+
runs-on: ubuntu-20.04
177+
needs: check_source
178+
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
179+
strategy:
180+
fail-fast: false
181+
matrix:
182+
openssl_ver: [1.1.1k, 3.0.0-alpha17]
183+
env:
184+
OPENSSL_VER: ${{ matrix.openssl_ver }}
185+
MULTISSL_DIR: ${{ github.workspace }}/multissl
186+
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
187+
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
188+
steps:
189+
- uses: actions/checkout@v2
190+
- name: Register gcc problem matcher
191+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
192+
- name: Install Dependencies
193+
run: sudo ./.github/workflows/posix-deps-apt.sh
194+
- name: Configure OpenSSL env vars
195+
run: |
196+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
197+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
198+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
199+
- name: 'Restore OpenSSL build'
200+
id: cache-openssl
201+
uses: actions/[email protected]
202+
with:
203+
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
204+
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
205+
- name: Install OpenSSL
206+
if: steps.cache-openssl.outputs.cache-hit != 'true'
207+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
208+
- name: Add ccache to PATH
209+
run: |
210+
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
211+
- name: Configure ccache action
212+
uses: hendrikmuhs/ccache-action@v1
213+
- name: Configure CPython
214+
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
215+
- name: Build CPython
216+
run: make -j4
217+
- name: Display build info
218+
run: make pythoninfo
219+
- name: SSL tests
220+
run: ./python Lib/test/ssltests.py

.github/workflows/build_msi.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,20 @@ name: TestsMSI
33
on:
44
push:
55
branches:
6-
- master
7-
- 3.9
8-
- 3.8
9-
- 3.7
6+
- 'main'
7+
- '3.10'
8+
- '3.9'
9+
- '3.8'
10+
- '3.7'
1011
paths:
1112
- 'Tools/msi/**'
1213
pull_request:
1314
branches:
14-
- master
15-
- 3.9
16-
- 3.8
17-
- 3.7
15+
- 'main'
16+
- '3.10'
17+
- '3.9'
18+
- '3.8'
19+
- '3.7'
1820
paths:
1921
- 'Tools/msi/**'
2022

0 commit comments

Comments
 (0)