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

Skip to content

Commit 3424a7d

Browse files
Merge commit '698a0da7d440856a90b45964e9082b5a55387b80' into fix-bitfield-clean
2 parents 60cebe2 + 698a0da commit 3424a7d

892 files changed

Lines changed: 37461 additions & 64482 deletions

File tree

Some content is hidden

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

.azure-pipelines/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(build.sourceBranchName)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1t
60+
openssl_version: 1.1.1u
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.1t
86+
openssl_version: 1.1.1u
8787

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

.azure-pipelines/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
variables:
5858
testRunTitle: '$(system.pullRequest.TargetBranch)-linux'
5959
testRunPlatform: linux
60-
openssl_version: 1.1.1t
60+
openssl_version: 1.1.1u
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.1t
86+
openssl_version: 1.1.1u
8787

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

.devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ FROM docker.io/library/fedora:37
22

33
ENV CC=clang
44

5-
ENV WASI_SDK_VERSION=19
5+
ENV WASI_SDK_VERSION=20
66
ENV WASI_SDK_PATH=/opt/wasi-sdk
77

88
ENV WASMTIME_HOME=/opt/wasmtime
9-
ENV WASMTIME_VERSION=7.0.0
9+
ENV WASMTIME_VERSION=9.0.1
1010
ENV WASMTIME_CPU_ARCH=x86_64
1111

1212
RUN dnf -y --nodocs --setopt=install_weak_deps=False install /usr/bin/{blurb,clang,curl,git,ln,tar,xz} 'dnf-command(builddep)' && \

.devcontainer/devcontainer.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"-y",
1010
"which",
1111
"zsh",
12-
"fish"
12+
"fish",
13+
// For umask fix below.
14+
"/usr/bin/setfacl"
1315
],
1416
"updateContentCommand": {
1517
// Using the shell for `nproc` usage.
@@ -22,6 +24,11 @@
2224
"html"
2325
]
2426
},
27+
"postCreateCommand": {
28+
// https://github.com/orgs/community/discussions/26026
29+
"umask fix: workspace": ["sudo", "setfacl", "-bnR", "."],
30+
"umask fix: /tmp": ["sudo", "setfacl", "-bnR", "/tmp"]
31+
},
2532
"customizations": {
2633
"vscode": {
2734
"extensions": [
@@ -31,10 +38,10 @@
3138
"maelvalais.autoconf",
3239
// C auto-complete.
3340
"ms-vscode.cpptools",
34-
// To view built docs.
35-
"ms-vscode.live-server"
36-
// https://github.com/microsoft/vscode-python/issues/18073
37-
// "ms-python.python"
41+
// To view HTML build of docs.
42+
"ms-vscode.live-server",
43+
// Python auto-complete.
44+
"ms-python.python"
3845
],
3946
"settings": {
4047
"C_Cpp.default.compilerPath": "/usr/bin/clang",

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*.zip binary
1919

2020
# Specific binary files
21-
Lib/test/sndhdrdata/sndhdr.* binary
2221
PC/classicAppCompat.* binary
2322

2423
# Text files that should not be subject to eol conversion

.github/CODEOWNERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Python/traceback.c @iritkatriel
6868
/Tools/build/parse_html5_entities.py @ezio-melotti
6969

7070
# Import (including importlib).
71-
**/*import* @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
71+
**/*import* @brettcannon @ericsnowcurrently @ncoghlan @warsaw
7272
**/*importlib/resources/* @jaraco @warsaw @FFY00
7373
**/importlib/metadata/* @jaraco @warsaw
7474

@@ -118,6 +118,12 @@ Lib/ast.py @isidentical
118118
/Lib/test/test_subprocess.py @gpshead
119119
/Modules/*subprocess* @gpshead
120120

121+
# Limited C API & stable ABI
122+
Tools/build/stable_abi.py @encukou
123+
Misc/stable_abi.toml @encukou
124+
Doc/data/*.abi @encukou
125+
Doc/c-api/stable.rst @encukou
126+
121127
# Windows
122128
/PC/ @python/windows-team
123129
/PCbuild/ @python/windows-team

.github/workflows/build.yml

Lines changed: 96 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ permissions:
2828
contents: read
2929

3030
concurrency:
31-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
31+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
3232
cancel-in-progress: true
3333

3434
jobs:
@@ -37,8 +37,10 @@ jobs:
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 10
3939
outputs:
40+
run-docs: ${{ steps.docs-changes.outputs.run-docs || false }}
4041
run_tests: ${{ steps.check.outputs.run_tests }}
4142
run_hypothesis: ${{ steps.check.outputs.run_hypothesis }}
43+
config_hash: ${{ steps.config_hash.outputs.hash }}
4244
steps:
4345
- uses: actions/checkout@v3
4446
- name: Check for source changes
@@ -74,6 +76,45 @@ jobs:
7476
echo "Run hypothesis tests"
7577
echo "run_hypothesis=true" >> $GITHUB_OUTPUT
7678
fi
79+
- name: Compute hash for config cache key
80+
id: config_hash
81+
run: |
82+
echo "hash=${{ hashFiles('configure', 'configure.ac', '.github/workflows/build.yml') }}" >> $GITHUB_OUTPUT
83+
- name: Get a list of the changed documentation-related files
84+
if: github.event_name == 'pull_request'
85+
id: changed-docs-files
86+
uses: Ana06/[email protected]
87+
with:
88+
filter: |
89+
Doc/**
90+
# Temporarily skip paths with spaces
91+
# (i.e. "C API", "Core and Builtins")
92+
# to avoid "Error: One of your files includes a space".
93+
# Pending https://github.com/python/core-workflow/issues/186
94+
# Misc/**
95+
Misc/NEWS.d/next/Build/**
96+
Misc/NEWS.d/next/Documentation/**
97+
Misc/NEWS.d/next/IDLE/**
98+
Misc/NEWS.d/next/Library/**
99+
Misc/NEWS.d/next/Security/**
100+
Misc/NEWS.d/next/Tests/**
101+
Misc/NEWS.d/next/Tools-Demos/**
102+
Misc/NEWS.d/next/Windows/**
103+
Misc/NEWS.d/next/macOS/**
104+
.github/workflows/reusable-docs.yml
105+
- name: Check for docs changes
106+
if: >-
107+
github.event_name == 'pull_request'
108+
&& steps.changed-docs-files.outputs.added_modified_renamed != ''
109+
id: docs-changes
110+
run: |
111+
echo "run-docs=true" >> "${GITHUB_OUTPUT}"
112+
113+
check-docs:
114+
name: Docs
115+
needs: check_source
116+
if: fromJSON(needs.check_source.outputs.run-docs)
117+
uses: ./.github/workflows/reusable-docs.yml
77118

78119
check_generated_files:
79120
name: 'Check if generated files are up to date'
@@ -83,23 +124,28 @@ jobs:
83124
if: needs.check_source.outputs.run_tests == 'true'
84125
steps:
85126
- uses: actions/checkout@v3
127+
- name: Restore config.cache
128+
uses: actions/cache@v3
129+
with:
130+
path: config.cache
131+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
86132
- uses: actions/setup-python@v3
87133
- name: Install Dependencies
88134
run: sudo ./.github/workflows/posix-deps-apt.sh
89135
- name: Add ccache to PATH
90136
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
91137
- name: Configure ccache action
92138
uses: hendrikmuhs/[email protected]
93-
- name: Check Autoconf version 2.69 and aclocal 1.16.3
139+
- name: Check Autoconf and aclocal versions
94140
run: |
95-
grep "Generated by GNU Autoconf 2.69" configure
96-
grep "aclocal 1.16.3" aclocal.m4
141+
grep "Generated by GNU Autoconf 2.71" configure
142+
grep "aclocal 1.16.4" aclocal.m4
97143
grep -q "runstatedir" configure
98144
grep -q "PKG_PROG_PKG_CONFIG" aclocal.m4
99145
- name: Configure CPython
100146
run: |
101147
# Build Python with the libpython dynamic library
102-
./configure --with-pydebug --enable-shared
148+
./configure --config-cache --with-pydebug --enable-shared
103149
- name: Regenerate autoconf files with container image
104150
run: make regen-configure
105151
- name: Build CPython
@@ -180,14 +226,19 @@ jobs:
180226
PYTHONSTRICTEXTENSIONBUILD: 1
181227
steps:
182228
- uses: actions/checkout@v3
229+
- name: Restore config.cache
230+
uses: actions/cache@v3
231+
with:
232+
path: config.cache
233+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
183234
- name: Install Homebrew dependencies
184235
run: brew install pkg-config [email protected] xz gdbm tcl-tk
185236
- name: Configure CPython
186237
run: |
187-
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
188-
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
189-
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
238+
GDBM_CFLAGS="-I$(brew --prefix gdbm)/include" \
239+
GDBM_LIBS="-L$(brew --prefix gdbm)/lib -lgdbm" \
190240
./configure \
241+
--config-cache \
191242
--with-pydebug \
192243
--prefix=/opt/python-dev \
193244
--with-openssl="$(brew --prefix [email protected])"
@@ -205,7 +256,7 @@ jobs:
205256
needs: check_source
206257
if: needs.check_source.outputs.run_tests == 'true'
207258
env:
208-
OPENSSL_VER: 1.1.1t
259+
OPENSSL_VER: 1.1.1u
209260
PYTHONSTRICTEXTENSIONBUILD: 1
210261
steps:
211262
- uses: actions/checkout@v3
@@ -240,9 +291,18 @@ jobs:
240291
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
241292
- name: Bind mount sources read-only
242293
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
294+
- name: Restore config.cache
295+
uses: actions/cache@v3
296+
with:
297+
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
298+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
243299
- name: Configure CPython out-of-tree
244300
working-directory: ${{ env.CPYTHON_BUILDDIR }}
245-
run: ../cpython-ro-srcdir/configure --with-pydebug --with-openssl=$OPENSSL_DIR
301+
run: |
302+
../cpython-ro-srcdir/configure \
303+
--config-cache \
304+
--with-pydebug \
305+
--with-openssl=$OPENSSL_DIR
246306
- name: Build CPython out-of-tree
247307
working-directory: ${{ env.CPYTHON_BUILDDIR }}
248308
run: make -j4
@@ -265,14 +325,19 @@ jobs:
265325
strategy:
266326
fail-fast: false
267327
matrix:
268-
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
328+
openssl_ver: [1.1.1u, 3.0.9, 3.1.1]
269329
env:
270330
OPENSSL_VER: ${{ matrix.openssl_ver }}
271331
MULTISSL_DIR: ${{ github.workspace }}/multissl
272332
OPENSSL_DIR: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}
273333
LD_LIBRARY_PATH: ${{ github.workspace }}/multissl/openssl/${{ matrix.openssl_ver }}/lib
274334
steps:
275335
- uses: actions/checkout@v3
336+
- name: Restore config.cache
337+
uses: actions/cache@v3
338+
with:
339+
path: config.cache
340+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
276341
- name: Register gcc problem matcher
277342
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
278343
- name: Install Dependencies
@@ -297,7 +362,7 @@ jobs:
297362
- name: Configure ccache action
298363
uses: hendrikmuhs/[email protected]
299364
- name: Configure CPython
300-
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
365+
run: ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
301366
- name: Build CPython
302367
run: make -j4
303368
- name: Display build info
@@ -306,13 +371,13 @@ jobs:
306371
run: ./python Lib/test/ssltests.py
307372

308373
test_hypothesis:
309-
name: "Hypothesis Tests on Ubuntu"
374+
name: "Hypothesis tests on Ubuntu"
310375
runs-on: ubuntu-20.04
311376
timeout-minutes: 60
312377
needs: check_source
313378
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
314379
env:
315-
OPENSSL_VER: 1.1.1t
380+
OPENSSL_VER: 1.1.1u
316381
PYTHONSTRICTEXTENSIONBUILD: 1
317382
steps:
318383
- uses: actions/checkout@v3
@@ -347,9 +412,18 @@ jobs:
347412
run: mkdir -p $CPYTHON_RO_SRCDIR $CPYTHON_BUILDDIR
348413
- name: Bind mount sources read-only
349414
run: sudo mount --bind -o ro $GITHUB_WORKSPACE $CPYTHON_RO_SRCDIR
415+
- name: Restore config.cache
416+
uses: actions/cache@v3
417+
with:
418+
path: ${{ env.CPYTHON_BUILDDIR }}/config.cache
419+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
350420
- name: Configure CPython out-of-tree
351421
working-directory: ${{ env.CPYTHON_BUILDDIR }}
352-
run: ../cpython-ro-srcdir/configure --with-pydebug --with-openssl=$OPENSSL_DIR
422+
run: |
423+
../cpython-ro-srcdir/configure \
424+
--config-cache \
425+
--with-pydebug \
426+
--with-openssl=$OPENSSL_DIR
353427
- name: Build CPython out-of-tree
354428
working-directory: ${{ env.CPYTHON_BUILDDIR }}
355429
run: make -j4
@@ -412,11 +486,16 @@ jobs:
412486
needs: check_source
413487
if: needs.check_source.outputs.run_tests == 'true'
414488
env:
415-
OPENSSL_VER: 1.1.1t
489+
OPENSSL_VER: 1.1.1u
416490
PYTHONSTRICTEXTENSIONBUILD: 1
417491
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
418492
steps:
419493
- uses: actions/checkout@v3
494+
- name: Restore config.cache
495+
uses: actions/cache@v3
496+
with:
497+
path: config.cache
498+
key: ${{ github.job }}-${{ runner.os }}-${{ needs.check_source.outputs.config_hash }}
420499
- name: Register gcc problem matcher
421500
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
422501
- name: Install Dependencies
@@ -445,7 +524,7 @@ jobs:
445524
- name: Configure ccache action
446525
uses: hendrikmuhs/[email protected]
447526
- name: Configure CPython
448-
run: ./configure --with-address-sanitizer --without-pymalloc
527+
run: ./configure --config-cache --with-address-sanitizer --without-pymalloc
449528
- name: Build CPython
450529
run: make -j4
451530
- name: Display build info

.github/workflows/build_msi.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ on:
88
- '3.*'
99
paths:
1010
- 'Tools/msi/**'
11+
- '.github/workflows/build_msi.yml'
1112
pull_request:
1213
branches:
1314
- 'main'
1415
- '3.*'
1516
paths:
1617
- 'Tools/msi/**'
18+
- '.github/workflows/build_msi.yml'
1719

1820
permissions:
1921
contents: read
@@ -33,4 +35,4 @@ jobs:
3335
steps:
3436
- uses: actions/checkout@v3
3537
- name: Build CPython installer
36-
run: .\Tools\msi\build.bat -${{ matrix.type }}
38+
run: .\Tools\msi\build.bat --doc -${{ matrix.type }}

0 commit comments

Comments
 (0)