Skip to content

Commit 0cf75d2

Browse files
committed
Merge main branch
2 parents 39446ab + 5a14f71 commit 0cf75d2

File tree

1,489 files changed

+102063
-76538
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,489 files changed

+102063
-76538
lines changed

.azure-pipelines/ci.yml

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

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

66
jobs:
77
- job: Prebuild
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-18.04
11+
vmImage: ubuntu-20.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-18.04
23+
vmImage: ubuntu-20.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -40,7 +40,7 @@ jobs:
4040
testRunPlatform: macos
4141

4242
pool:
43-
vmImage: macos-10.14
43+
vmImage: macos-10.15
4444

4545
steps:
4646
- template: ./macos-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-18.04
55+
vmImage: ubuntu-20.04
5656

5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1k
60+
openssl_version: 1.1.1l
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-18.04
81+
vmImage: ubuntu-20.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1k
86+
openssl_version: 1.1.1l
8787

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

.azure-pipelines/pr.yml

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

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

66
jobs:
77
- job: Prebuild
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-18.04
11+
vmImage: ubuntu-20.04
1212

1313
steps:
1414
- template: ./prebuild-checks.yml
@@ -20,7 +20,7 @@ jobs:
2020
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['docs.run'], 'true'))
2121

2222
pool:
23-
vmImage: ubuntu-18.04
23+
vmImage: ubuntu-20.04
2424

2525
steps:
2626
- template: ./docs-steps.yml
@@ -38,7 +38,7 @@ jobs:
3838
testRunPlatform: macos
3939

4040
pool:
41-
vmImage: macos-10.14
41+
vmImage: macos-10.15
4242

4343
steps:
4444
- template: ./macos-steps.yml
@@ -52,12 +52,12 @@ jobs:
5252
condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true'))
5353

5454
pool:
55-
vmImage: ubuntu-18.04
55+
vmImage: ubuntu-20.04
5656

5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1k
60+
openssl_version: 1.1.1l
6161

6262
steps:
6363
- template: ./posix-steps.yml
@@ -78,12 +78,12 @@ jobs:
7878
)
7979
8080
pool:
81-
vmImage: ubuntu-18.04
81+
vmImage: ubuntu-20.04
8282

8383
variables:
8484
testRunTitle: '$(Build.SourceBranchName)-linux-coverage'
8585
testRunPlatform: linux-coverage
86-
openssl_version: 1.1.1k
86+
openssl_version: 1.1.1l
8787

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

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*.{py,c,cpp,h,rst,md,yml}]
4+
trim_trailing_whitespace = true
5+
insert_final_newline = true
6+
indent_style = space
7+
8+
[*.{py,c,cpp,h}]
9+
indent_size = 4
10+
11+
[*.yml]
12+
indent_size = 2

.gitattributes

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Lib/test/test_email/data/*.txt -text
2828
Lib/test/xmltestdata/* -text
2929
Lib/test/coding20731.py -text
3030
Lib/test/test_importlib/data01/* -text
31+
Lib/test/test_importlib/namespacedata01/* -text
3132

3233
# CRLF files
3334
*.bat text eol=crlf
@@ -45,8 +46,8 @@ Modules/clinic/*.h linguist-generated=true
4546
Objects/clinic/*.h linguist-generated=true
4647
PC/clinic/*.h linguist-generated=true
4748
Python/clinic/*.h linguist-generated=true
48-
Python/importlib.h linguist-generated=true
49-
Python/importlib_external.h linguist-generated=true
49+
Python/frozen_modules/*.h linguist-generated=true
50+
Python/frozen_modules/MANIFEST linguist-generated=true
5051
Include/internal/pycore_ast.h linguist-generated=true
5152
Python/Python-ast.c linguist-generated=true
5253
Include/opcode.h linguist-generated=true

.github/CODEOWNERS

Lines changed: 4 additions & 4 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
@@ -128,7 +128,7 @@ Lib/ast.py @isidentical
128128

129129
**/*idlelib* @terryjreedy
130130

131-
**/*typing* @gvanrossum @ilevkivskyi
131+
**/*typing* @gvanrossum @Fidget-Spinner
132132

133133
**/*asyncore @giampaolo
134134
**/*asynchat @giampaolo

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ official website](https://www.python.org/dev/security/) for
1414
instructions on how to report a security-related problem to
1515
the Python team responsibly.
1616

17-
To reach the response team, email `security at python dot org`.
17+
To reach the response team, email `security at python dot org`.

.github/problem-matchers/sphinx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"line": 2,
3535
"message": 3
3636
}
37-
]
37+
]
3838
}
3939
]
4040
}

.github/workflows/build.yml

Lines changed: 62 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,23 @@ jobs:
7171
make regen-stdlib-module-names
7272
- name: Check for changes
7373
run: |
74+
git add -u
7475
changes=$(git status --porcelain)
7576
# Check for changes in regenerated files
7677
if ! test -z "$changes"
7778
then
78-
echo "Generated files not up to date. Perhaps you forgot to run make regen-all ;)"
79+
echo "Generated files not up to date. Perhaps you forgot to run make regen-all or build.bat --regen ;)"
7980
echo "$changes"
8081
exit 1
8182
fi
8283
- name: Check exported libpython symbols
8384
run: make smelly
8485
- name: Check limited ABI symbols
8586
run: make check-limited-abi
87+
- name: Check Autoconf version 2.69
88+
run: |
89+
grep "Generated by GNU Autoconf 2.69" configure
90+
grep "PKG_PROG_PKG_CONFIG" aclocal.m4
8691
8792
build_win32:
8893
name: 'Windows (x86)'
@@ -119,10 +124,16 @@ jobs:
119124
runs-on: macos-latest
120125
needs: check_source
121126
if: needs.check_source.outputs.run_tests == 'true'
127+
env:
128+
PYTHONSTRICTEXTENSIONBUILD: 1
122129
steps:
123130
- uses: actions/checkout@v2
131+
- name: Prepare homebrew environment variables
132+
run: |
133+
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
134+
echo "PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
124135
- name: Configure CPython
125-
run: ./configure --with-pydebug --with-openssl=/usr/local/opt/openssl --prefix=/opt/python-dev
136+
run: ./configure --with-pydebug --prefix=/opt/python-dev
126137
- name: Build CPython
127138
run: make -j4
128139
- name: Display build info
@@ -136,7 +147,8 @@ jobs:
136147
needs: check_source
137148
if: needs.check_source.outputs.run_tests == 'true'
138149
env:
139-
OPENSSL_VER: 1.1.1k
150+
OPENSSL_VER: 1.1.1l
151+
PYTHONSTRICTEXTENSIONBUILD: 1
140152
steps:
141153
- uses: actions/checkout@v2
142154
- name: Register gcc problem matcher
@@ -150,7 +162,7 @@ jobs:
150162
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
151163
- name: 'Restore OpenSSL build'
152164
id: cache-openssl
153-
uses: actions/[email protected].5
165+
uses: actions/[email protected].6
154166
with:
155167
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
156168
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -179,7 +191,7 @@ jobs:
179191
strategy:
180192
fail-fast: false
181193
matrix:
182-
openssl_ver: [1.1.1k, 3.0.0-alpha17]
194+
openssl_ver: [1.1.1l, 3.0.0]
183195
env:
184196
OPENSSL_VER: ${{ matrix.openssl_ver }}
185197
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -198,7 +210,7 @@ jobs:
198210
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
199211
- name: 'Restore OpenSSL build'
200212
id: cache-openssl
201-
uses: actions/[email protected].5
213+
uses: actions/[email protected].6
202214
with:
203215
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
204216
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
@@ -218,3 +230,47 @@ jobs:
218230
run: make pythoninfo
219231
- name: SSL tests
220232
run: ./python Lib/test/ssltests.py
233+
234+
235+
build_asan:
236+
name: 'Address sanitizer'
237+
runs-on: ubuntu-20.04
238+
needs: check_source
239+
if: needs.check_source.outputs.run_tests == 'true'
240+
env:
241+
OPENSSL_VER: 1.1.1l
242+
PYTHONSTRICTEXTENSIONBUILD: 1
243+
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
244+
steps:
245+
- uses: actions/checkout@v2
246+
- name: Register gcc problem matcher
247+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
248+
- name: Install Dependencies
249+
run: sudo ./.github/workflows/posix-deps-apt.sh
250+
- name: Configure OpenSSL env vars
251+
run: |
252+
echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
253+
echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
254+
echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
255+
- name: 'Restore OpenSSL build'
256+
id: cache-openssl
257+
uses: actions/[email protected]
258+
with:
259+
path: ./multissl/openssl/${{ env.OPENSSL_VER }}
260+
key: ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
261+
- name: Install OpenSSL
262+
if: steps.cache-openssl.outputs.cache-hit != 'true'
263+
run: python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
264+
- name: Add ccache to PATH
265+
run: |
266+
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
267+
- name: Configure ccache action
268+
uses: hendrikmuhs/ccache-action@v1
269+
- name: Configure CPython
270+
run: ./configure --with-address-sanitizer --without-pymalloc
271+
- name: Build CPython
272+
run: make -j4
273+
- name: Display build info
274+
run: make pythoninfo
275+
- name: Tests
276+
run: xvfb-run make buildbottest TESTOPTS="-j4 -uall,-cpu -x test_ctypes test_crypt test_decimal test_faulthandler test_interpreters test___all__ test_idle test_tix test_tk test_ttk_guionly test_ttk_textonly test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn"

.github/workflows/doc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
- name: 'Install build dependencies'
3939
run: make -C Doc/ PYTHON=../python venv
4040
- name: 'Build documentation'
41-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html suspicious
41+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going -j4" doctest html
4242
- name: 'Upload'
43-
uses: actions/[email protected].3
43+
uses: actions/[email protected].4
4444
with:
4545
name: doc-html
4646
path: Doc/build/html

.github/workflows/posix-deps-apt.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ apt-get -yq install \
99
libbz2-dev \
1010
libffi-dev \
1111
libgdbm-dev \
12+
libgdbm-compat-dev \
1213
liblzma-dev \
1314
libncurses5-dev \
1415
libreadline6-dev \

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/stale@v3
16+
- uses: actions/stale@v4
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
1919
stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.'

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ gmon.out
3535
.coverage
3636
.mypy_cache/
3737
.pytest_cache/
38+
.DS_Store
3839

3940
*.exe
4041
!Lib/distutils/command/*.exe
@@ -67,7 +68,7 @@ Modules/Setup.config
6768
Modules/Setup.local
6869
Modules/config.c
6970
Modules/ld_so_aix
70-
Programs/_freeze_importlib
71+
Programs/_freeze_module
7172
Programs/_testembed
7273
PC/python_nt*.h
7374
PC/pythonnt_rc*.h
@@ -120,6 +121,12 @@ Tools/msi/obj
120121
Tools/ssl/amd64
121122
Tools/ssl/win32
122123

124+
# The frozen modules are always generated by the build so we don't
125+
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
126+
Python/frozen_modules/*.h
127+
# The manifest can be generated at any time with "make regen-frozen".
128+
Python/frozen_modules/MANIFEST
129+
123130
# Two-trick pony for OSX and other case insensitive file systems:
124131
# Ignore ./python binary on Unix but still look into ./Python/ directory.
125132
/python

0 commit comments

Comments
 (0)