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

Skip to content

Commit 6bc8e1e

Browse files
authored
Merge branch 'python:main' into fix-gethostname-declaration
2 parents d650b0c + 5e6661b commit 6bc8e1e

File tree

2,098 files changed

+210296
-138859
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,098 files changed

+210296
-138859
lines changed

.azure-pipelines/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.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-20.04
23+
vmImage: ubuntu-22.04
2424

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

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

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

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

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

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

.azure-pipelines/posix-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ steps:
6868
- ${{ if eq(parameters.patchcheck, 'true') }}:
6969
- script: |
7070
git fetch origin
71-
./python Tools/scripts/patchcheck.py --ci true
71+
./python Tools/patchcheck/patchcheck.py --ci true
7272
displayName: 'Run patchcheck.py'
7373
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
7474

.azure-pipelines/pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
displayName: Pre-build checks
99

1010
pool:
11-
vmImage: ubuntu-20.04
11+
vmImage: ubuntu-22.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-20.04
23+
vmImage: ubuntu-22.04
2424

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

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

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

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

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

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

.azure-pipelines/windows-layout-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ steps:
1212
displayName: Show layout info (${{ parameters.kind }})
1313

1414
- ${{ if eq(parameters.fulltest, 'true') }}:
15-
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)"
15+
- script: .\python.exe -m test -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results-${{ parameters.kind }}.xml" --tempdir "$(Build.BinariesDirectory)\tmp-${{ parameters.kind }}-$(arch)" -i test_launcher
1616
workingDirectory: $(Build.BinariesDirectory)\layout-${{ parameters.kind }}-$(arch)
1717
displayName: ${{ parameters.kind }} Tests
1818
env:

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ Doc/library/token-list.inc generated
6969
Include/internal/pycore_ast.h generated
7070
Include/internal/pycore_ast_state.h generated
7171
Include/internal/pycore_opcode.h generated
72-
Include/internal/pycore_runtime_init_generated.h generated
72+
Include/internal/pycore_*_generated.h generated
7373
Include/opcode.h generated
7474
Include/token.h generated
7575
Lib/keyword.py generated
76+
Lib/test/levenshtein_examples.json generated
7677
Lib/test/test_stable_abi_ctypes.py generated
7778
Lib/token.py generated
7879
Objects/typeslots.inc generated
@@ -81,6 +82,7 @@ Parser/parser.c generated
8182
Parser/token.c generated
8283
Programs/test_frozenmain.h generated
8384
Python/Python-ast.c generated
85+
Python/generated_cases.c.h generated
8486
Python/opcode_targets.h generated
8587
Python/stdlib_module_names.h generated
8688
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
# It uses the same pattern rule for gitignore file
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

7+
# GitHub
8+
.github/** @ezio-melotti
9+
10+
# Build system
11+
configure* @erlend-aasland @corona10
12+
713
# asyncio
8-
**/*asyncio* @1st1 @asvetlov
14+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
915

1016
# Core
1117
**/*context* @1st1
12-
**/*genobject* @1st1 @markshannon
18+
**/*genobject* @markshannon
1319
**/*hamt* @1st1
1420
Objects/set* @rhettinger
1521
Objects/dict* @methane @markshannon
@@ -52,15 +58,15 @@ Python/traceback.c @iritkatriel
5258
/Lib/html/ @ezio-melotti
5359
/Lib/_markupbase.py @ezio-melotti
5460
/Lib/test/test_html*.py @ezio-melotti
55-
/Tools/scripts/*html5* @ezio-melotti
61+
/Tools/build/parse_html5_entities.py @ezio-melotti
5662

5763
# Import (including importlib).
5864
# Ignoring importlib.h so as to not get flagged on
5965
# all pull requests that change the emitted
6066
# bytecode.
6167
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6268
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
63-
**/*importlib/resources/* @jaraco @warsaw @brettcannon
69+
**/*importlib/resources/* @jaraco @warsaw @FFY00
6470
**/importlib/metadata/* @jaraco @warsaw
6571

6672
# Dates and times
@@ -132,22 +138,27 @@ Lib/ast.py @isidentical
132138

133139
**/*idlelib* @terryjreedy
134140

135-
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
141+
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
136142

137-
**/*asyncore @giampaolo
138-
**/*asynchat @giampaolo
139143
**/*ftplib @giampaolo
140144
**/*shutil @giampaolo
141145

142146
**/*enum* @ethanfurman
143147
**/*cgi* @ethanfurman
144148
**/*tarfile* @ethanfurman
145149

146-
**/*tomllib* @encukou
150+
**/*tomllib* @encukou @hauntsaninja
151+
152+
**/*sysconfig* @FFY00
153+
154+
**/*cjkcodecs* @corona10
147155

148156
# macOS
149157
/Mac/ @python/macos-team
150158
**/*osx_support* @python/macos-team
151159

152160
# pathlib
153-
**/*pathlib* @brettcannon
161+
**/*pathlib* @barneygale
162+
163+
# zipfile.Path
164+
**/*zipfile/*_path.py @jaraco

.github/CONTRIBUTING.rst

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,9 @@ Contributing to Python
44
Build Status
55
------------
66

7-
- main
7+
- `Buildbot status overview <https://buildbot.python.org/all/#/release_status>`_
88

9-
+ `Stable buildbots <https://buildbot.python.org/3.x.stable/>`_
10-
11-
- 3.9
12-
13-
+ `Stable buildbots <https://buildbot.python.org/3.9.stable/>`_
14-
15-
- 3.8
16-
17-
+ `Stable buildbots <https://buildbot.python.org/3.8.stable/>`_
18-
19-
- 3.7
20-
21-
+ `Stable buildbots <https://buildbot.python.org/3.7.stable/>`_
9+
- `GitHub Actions status <https://github.com/python/cpython/actions/workflows/build.yml>`_
2210

2311

2412
Thank You
@@ -38,7 +26,7 @@ also suggestions on how you can most effectively help the project.
3826

3927
Please be aware that our workflow does deviate slightly from the typical GitHub
4028
project. Details on how to properly submit a pull request are covered in
41-
`Lifecycle of a Pull Request <https://devguide.python.org/pullrequest/>`_.
29+
`Lifecycle of a Pull Request <https://devguide.python.org/getting-started/pull-request-lifecycle.html>`_.
4230
We utilize various bots and status checks to help with this, so do follow the
4331
comments they leave and their "Details" links, respectively. The key points of
4432
our workflow that are not covered by a bot or status check are:

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The Python team applies security fixes according to the table
66
in [the devguide](
7-
https://devguide.python.org/#status-of-python-branches
7+
https://devguide.python.org/versions/#supported-versions
88
).
99

1010
## Reporting a Vulnerability

.github/workflows/build.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,23 @@ on:
2525
permissions:
2626
contents: read
2727

28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
30+
cancel-in-progress: true
31+
2832
jobs:
2933
check_source:
3034
name: 'Check for source changes'
3135
runs-on: ubuntu-latest
3236
outputs:
3337
run_tests: ${{ steps.check.outputs.run_tests }}
34-
run_ssl_tests: ${{ steps.check.outputs.run_ssl_tests }}
3538
steps:
3639
- uses: actions/checkout@v3
3740
- name: Check for source changes
3841
id: check
3942
run: |
4043
if [ -z "$GITHUB_BASE_REF" ]; then
41-
echo '::set-output name=run_tests::true'
42-
echo '::set-output name=run_ssl_tests::true'
44+
echo "run_tests=true" >> $GITHUB_OUTPUT
4345
else
4446
git fetch origin $GITHUB_BASE_REF --depth=1
4547
# git diff "origin/$GITHUB_BASE_REF..." (3 dots) may be more
@@ -55,8 +57,7 @@ jobs:
5557
# into the PR branch anyway.
5658
#
5759
# https://github.com/python/core-workflow/issues/373
58-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo '::set-output name=run_tests::true' || true
59-
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qE '(ssl|hashlib|hmac|^.github)' && echo '::set-output name=run_ssl_tests::true' || true
60+
git diff --name-only origin/$GITHUB_BASE_REF.. | grep -qvE '(\.rst$|^Doc|^Misc)' && echo "run_tests=true" >> $GITHUB_OUTPUT || true
6061
fi
6162
6263
check_generated_files:
@@ -72,7 +73,7 @@ jobs:
7273
- name: Add ccache to PATH
7374
run: echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
7475
- name: Configure ccache action
75-
uses: hendrikmuhs/ccache-action@v1
76+
uses: hendrikmuhs/ccache-action@v1.2
7677
- name: Check Autoconf version 2.69 and aclocal 1.16.3
7778
run: |
7879
grep "Generated by GNU Autoconf 2.69" configure
@@ -110,6 +111,9 @@ jobs:
110111
run: make smelly
111112
- name: Check limited ABI symbols
112113
run: make check-limited-abi
114+
- name: Check for unsupported C global variables
115+
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
116+
run: make check-c-globals
113117

114118
build_win32:
115119
name: 'Windows (x86)'
@@ -153,15 +157,23 @@ jobs:
153157
needs: check_source
154158
if: needs.check_source.outputs.run_tests == 'true'
155159
env:
160+
HOMEBREW_NO_ANALYTICS: 1
161+
HOMEBREW_NO_AUTO_UPDATE: 1
162+
HOMEBREW_NO_INSTALL_CLEANUP: 1
156163
PYTHONSTRICTEXTENSIONBUILD: 1
157164
steps:
158165
- uses: actions/checkout@v3
159-
- name: Prepare homebrew environment variables
160-
run: |
161-
echo "LDFLAGS=-L$(brew --prefix tcl-tk)/lib" >> $GITHUB_ENV
162-
echo "PKG_CONFIG_PATH=$(brew --prefix [email protected])/lib/pkgconfig:$(brew --prefix tcl-tk)/lib/pkgconfig" >> $GITHUB_ENV
166+
- name: Install Homebrew dependencies
167+
run: brew install pkg-config [email protected] xz gdbm tcl-tk
163168
- name: Configure CPython
164-
run: ./configure --with-pydebug --prefix=/opt/python-dev
169+
run: |
170+
CFLAGS="-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include" \
171+
LDFLAGS="-L$(brew --prefix gdbm)/lib -I$(brew --prefix xz)/lib" \
172+
PKG_CONFIG_PATH="$(brew --prefix tcl-tk)/lib/pkgconfig" \
173+
./configure \
174+
--with-pydebug \
175+
--prefix=/opt/python-dev \
176+
--with-openssl="$(brew --prefix [email protected])"
165177
- name: Build CPython
166178
run: make -j4
167179
- name: Display build info
@@ -175,7 +187,7 @@ jobs:
175187
needs: check_source
176188
if: needs.check_source.outputs.run_tests == 'true'
177189
env:
178-
OPENSSL_VER: 1.1.1n
190+
OPENSSL_VER: 1.1.1t
179191
PYTHONSTRICTEXTENSIONBUILD: 1
180192
steps:
181193
- uses: actions/checkout@v3
@@ -201,7 +213,7 @@ jobs:
201213
run: |
202214
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
203215
- name: Configure ccache action
204-
uses: hendrikmuhs/ccache-action@v1
216+
uses: hendrikmuhs/ccache-action@v1.2
205217
- name: Setup directory envs for out-of-tree builds
206218
run: |
207219
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -230,11 +242,11 @@ jobs:
230242
name: 'Ubuntu SSL tests with OpenSSL'
231243
runs-on: ubuntu-20.04
232244
needs: check_source
233-
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
245+
if: needs.check_source.outputs.run_tests == 'true'
234246
strategy:
235247
fail-fast: false
236248
matrix:
237-
openssl_ver: [1.1.1n, 3.0.2]
249+
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
238250
env:
239251
OPENSSL_VER: ${{ matrix.openssl_ver }}
240252
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -264,7 +276,7 @@ jobs:
264276
run: |
265277
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
266278
- name: Configure ccache action
267-
uses: hendrikmuhs/ccache-action@v1
279+
uses: hendrikmuhs/ccache-action@v1.2
268280
- name: Configure CPython
269281
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
270282
- name: Build CPython
@@ -281,7 +293,7 @@ jobs:
281293
needs: check_source
282294
if: needs.check_source.outputs.run_tests == 'true'
283295
env:
284-
OPENSSL_VER: 1.1.1n
296+
OPENSSL_VER: 1.1.1t
285297
PYTHONSTRICTEXTENSIONBUILD: 1
286298
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
287299
steps:
@@ -308,7 +320,7 @@ jobs:
308320
run: |
309321
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
310322
- name: Configure ccache action
311-
uses: hendrikmuhs/ccache-action@v1
323+
uses: hendrikmuhs/ccache-action@v1.2
312324
- name: Configure CPython
313325
run: ./configure --with-address-sanitizer --without-pymalloc
314326
- name: Build CPython

0 commit comments

Comments
 (0)