Skip to content

Commit 7e0db5e

Browse files
committed
Merge branch 'main' into gh-98108/zipfile.Path-pickleability
2 parents 156df3b + 7796d31 commit 7e0db5e

File tree

1,478 files changed

+58426
-60627
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,478 files changed

+58426
-60627
lines changed

.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

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ 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
@@ -82,6 +82,7 @@ Parser/parser.c generated
8282
Parser/token.c generated
8383
Programs/test_frozenmain.h generated
8484
Python/Python-ast.c generated
85+
Python/generated_cases.c.h generated
8586
Python/opcode_targets.h generated
8687
Python/stdlib_module_names.h generated
8788
Tools/peg_generator/pegen/grammar_parser.py generated

.github/CODEOWNERS

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
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+
710
# asyncio
8-
**/*asyncio* @1st1 @asvetlov @gvanrossum
11+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
912

1013
# Core
1114
**/*context* @1st1
@@ -52,15 +55,15 @@ Python/traceback.c @iritkatriel
5255
/Lib/html/ @ezio-melotti
5356
/Lib/_markupbase.py @ezio-melotti
5457
/Lib/test/test_html*.py @ezio-melotti
55-
/Tools/scripts/*html5* @ezio-melotti
58+
/Tools/build/parse_html5_entities.py @ezio-melotti
5659

5760
# Import (including importlib).
5861
# Ignoring importlib.h so as to not get flagged on
5962
# all pull requests that change the emitted
6063
# bytecode.
6164
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6265
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
63-
**/*importlib/resources/* @jaraco @warsaw @brettcannon
66+
**/*importlib/resources/* @jaraco @warsaw @brettcannon @FFY00
6467
**/importlib/metadata/* @jaraco @warsaw
6568

6669
# Dates and times
@@ -132,10 +135,8 @@ Lib/ast.py @isidentical
132135

133136
**/*idlelib* @terryjreedy
134137

135-
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra
138+
**/*typing* @gvanrossum @Fidget-Spinner @JelleZijlstra @AlexWaygood
136139

137-
**/*asyncore @giampaolo
138-
**/*asynchat @giampaolo
139140
**/*ftplib @giampaolo
140141
**/*shutil @giampaolo
141142

@@ -145,6 +146,8 @@ Lib/ast.py @isidentical
145146

146147
**/*tomllib* @encukou
147148

149+
**/*sysconfig* @FFY00
150+
148151
# macOS
149152
/Mac/ @python/macos-team
150153
**/*osx_support* @python/macos-team

.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: 14 additions & 13 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
@@ -175,7 +176,7 @@ jobs:
175176
needs: check_source
176177
if: needs.check_source.outputs.run_tests == 'true'
177178
env:
178-
OPENSSL_VER: 1.1.1q
179+
OPENSSL_VER: 1.1.1s
179180
PYTHONSTRICTEXTENSIONBUILD: 1
180181
steps:
181182
- uses: actions/checkout@v3
@@ -201,7 +202,7 @@ jobs:
201202
run: |
202203
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
203204
- name: Configure ccache action
204-
uses: hendrikmuhs/ccache-action@v1
205+
uses: hendrikmuhs/ccache-action@v1.2
205206
- name: Setup directory envs for out-of-tree builds
206207
run: |
207208
echo "CPYTHON_RO_SRCDIR=$(realpath -m ${GITHUB_WORKSPACE}/../cpython-ro-srcdir)" >> $GITHUB_ENV
@@ -230,11 +231,11 @@ jobs:
230231
name: 'Ubuntu SSL tests with OpenSSL'
231232
runs-on: ubuntu-20.04
232233
needs: check_source
233-
if: needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_ssl_tests == 'true'
234+
if: needs.check_source.outputs.run_tests == 'true'
234235
strategy:
235236
fail-fast: false
236237
matrix:
237-
openssl_ver: [1.1.1q, 3.0.5]
238+
openssl_ver: [1.1.1s, 3.0.7]
238239
env:
239240
OPENSSL_VER: ${{ matrix.openssl_ver }}
240241
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -264,7 +265,7 @@ jobs:
264265
run: |
265266
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
266267
- name: Configure ccache action
267-
uses: hendrikmuhs/ccache-action@v1
268+
uses: hendrikmuhs/ccache-action@v1.2
268269
- name: Configure CPython
269270
run: ./configure --with-pydebug --with-openssl=$OPENSSL_DIR
270271
- name: Build CPython
@@ -281,7 +282,7 @@ jobs:
281282
needs: check_source
282283
if: needs.check_source.outputs.run_tests == 'true'
283284
env:
284-
OPENSSL_VER: 1.1.1q
285+
OPENSSL_VER: 1.1.1s
285286
PYTHONSTRICTEXTENSIONBUILD: 1
286287
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
287288
steps:
@@ -308,7 +309,7 @@ jobs:
308309
run: |
309310
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
310311
- name: Configure ccache action
311-
uses: hendrikmuhs/ccache-action@v1
312+
uses: hendrikmuhs/ccache-action@v1.2
312313
- name: Configure CPython
313314
run: ./configure --with-address-sanitizer --without-pymalloc
314315
- name: Build CPython

.github/workflows/build_msi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
permissions:
1919
contents: read
2020

21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
23+
cancel-in-progress: true
24+
2125
jobs:
2226
build:
2327
name: Windows Installer

.github/workflows/doc.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ on:
2828
permissions:
2929
contents: read
3030

31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
3135
jobs:
3236
build_doc:
3337
name: 'Docs'
@@ -46,9 +50,14 @@ jobs:
4650
run: make -C Doc/ venv
4751
- name: 'Check documentation'
4852
run: make -C Doc/ check
53+
- name: 'Upload NEWS'
54+
uses: actions/upload-artifact@v3
55+
with:
56+
name: NEWS
57+
path: Doc/build/NEWS
4958
- name: 'Build HTML documentation'
5059
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
51-
- name: 'Upload'
60+
- name: 'Upload docs'
5261
uses: actions/upload-artifact@v3
5362
with:
5463
name: doc-html

.github/workflows/project-updater.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- opened
77
- labeled
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
add-to-project:
1114
name: Add issues to projects

.github/workflows/verify-ensurepip-wheels.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ on:
66
paths:
77
- 'Lib/ensurepip/_bundled/**'
88
- '.github/workflows/verify-ensurepip-wheels.yml'
9-
- 'Tools/scripts/verify_ensurepip_wheels.py'
9+
- 'Tools/build/verify_ensurepip_wheels.py'
1010
pull_request:
1111
paths:
1212
- 'Lib/ensurepip/_bundled/**'
1313
- '.github/workflows/verify-ensurepip-wheels.yml'
14-
- 'Tools/scripts/verify_ensurepip_wheels.py'
14+
- 'Tools/build/verify_ensurepip_wheels.py'
1515

1616
permissions:
1717
contents: read
1818

19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
1923
jobs:
2024
verify:
2125
runs-on: ubuntu-latest
@@ -25,4 +29,4 @@ jobs:
2529
with:
2630
python-version: '3'
2731
- name: Compare checksums of bundled pip and setuptools to ones published on PyPI
28-
run: ./Tools/scripts/verify_ensurepip_wheels.py
32+
run: ./Tools/build/verify_ensurepip_wheels.py

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ gmon.out
4141
.DS_Store
4242

4343
*.exe
44-
!Lib/distutils/command/*.exe
4544

4645
# Ignore core dumps... but not Tools/msi/core/ or the like.
4746
core
@@ -58,7 +57,6 @@ Doc/.venv/
5857
Doc/env/
5958
Doc/.env/
6059
Include/pydtrace_probes.h
61-
Lib/distutils/command/*.pdb
6260
Lib/lib2to3/*.pickle
6361
Lib/site-packages/*
6462
!Lib/site-packages/README.txt
@@ -116,6 +114,7 @@ PCbuild/win32/
116114
Tools/unicode/data/
117115
/autom4te.cache
118116
/build/
117+
/builddir/
119118
/config.cache
120119
/config.log
121120
/config.status
@@ -143,7 +142,7 @@ Tools/ssl/win32
143142
Tools/freeze/test/outdir
144143

145144
# The frozen modules are always generated by the build so we don't
146-
# keep them in the repo. Also see Tools/scripts/freeze_modules.py.
145+
# keep them in the repo. Also see Tools/build/freeze_modules.py.
147146
Python/frozen_modules/*.h
148147
# The manifest can be generated at any time with "make regen-frozen".
149148
Python/frozen_modules/MANIFEST

Doc/Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ PAPEROPT_letter = -D latex_elements.papersize=letterpaper
2121
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j auto \
2222
$(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES)
2323

24-
.PHONY: help build html htmlhelp latex text texinfo changes linkcheck \
25-
suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
26-
autobuild-dev autobuild-stable venv
24+
.PHONY: help build html htmlhelp latex text texinfo epub changes linkcheck \
25+
coverage doctest pydoc-topics htmlview clean clean-venv venv dist check serve \
26+
autobuild-dev autobuild-dev-html autobuild-stable autobuild-stable-html
2727

2828
help:
2929
@echo "Please use \`make <target>' where <target> is one of"
@@ -42,7 +42,6 @@ help:
4242
@echo " doctest to run doctests in the documentation"
4343
@echo " pydoc-topics to regenerate the pydoc topics file"
4444
@echo " dist to create a \"dist\" directory with archived docs for download"
45-
@echo " suspicious to check for suspicious markup in output text"
4645
@echo " check to run a check for frequent markup errors"
4746

4847
build:
@@ -110,18 +109,6 @@ linkcheck:
110109
"or in build/$(BUILDER)/output.txt"; \
111110
false; }
112111

113-
suspicious: BUILDER = suspicious
114-
suspicious:
115-
@$(MAKE) build BUILDER=$(BUILDER) || { \
116-
echo "Suspicious check complete; look for any errors in the above output" \
117-
"or in build/$(BUILDER)/suspicious.csv. If all issues are false" \
118-
"positives, append that file to tools/susp-ignored.csv."; \
119-
false; }
120-
@echo "⚠ make suspicious is deprecated and will be removed soon."
121-
@echo "⚠ Use:"
122-
@echo "⚠ make check"
123-
@echo "⚠ instead."
124-
125112
coverage: BUILDER = coverage
126113
coverage: build
127114
@echo "Coverage finished; see c.txt and python.txt in build/coverage"

Doc/README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ Available make targets are:
9393
plain text documentation for the labels defined in
9494
``tools/pyspecific.py`` -- pydoc needs these to show topic and keyword help.
9595

96-
* "suspicious", which checks the parsed markup for text that looks like
97-
malformed and thus unconverted reST.
98-
9996
* "check", which checks for frequent markup errors.
10097

10198
* "serve", which serves the build/html directory on port 8000.

Doc/c-api/buffer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ a buffer, see :c:func:`PyObject_GetBuffer`.
9999
For :term:`contiguous` arrays, the value points to the beginning of
100100
the memory block.
101101

102-
.. c:member:: void *obj
102+
.. c:member:: PyObject *obj
103103
104104
A new reference to the exporting object. The reference is owned by
105105
the consumer and automatically decremented and set to ``NULL`` by

0 commit comments

Comments
 (0)