Skip to content

Commit 262189d

Browse files
Merge branch 'main' into fix-issue21914
2 parents abd206e + f482ade commit 262189d

File tree

902 files changed

+58029
-37038
lines changed

Some content is hidden

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

902 files changed

+58029
-37038
lines changed

.azure-pipelines/ci.yml

+6-6
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.1q
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.1q
86+
openssl_version: 1.1.1t
8787

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

.azure-pipelines/pr.yml

+6-6
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.1q
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.1q
86+
openssl_version: 1.1.1t
8787

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

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

+1-1
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:

.github/CODEOWNERS

+12-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
# GitHub
88
.github/** @ezio-melotti
99

10+
# Build system
11+
configure* @erlend-aasland @corona10
12+
1013
# asyncio
11-
**/*asyncio* @1st1 @asvetlov @gvanrossum
14+
**/*asyncio* @1st1 @asvetlov @gvanrossum @kumaraditya303
1215

1316
# Core
1417
**/*context* @1st1
@@ -63,7 +66,7 @@ Python/traceback.c @iritkatriel
6366
# bytecode.
6467
**/*import*.c @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
6568
**/*import*.py @brettcannon @encukou @ericsnowcurrently @ncoghlan @warsaw
66-
**/*importlib/resources/* @jaraco @warsaw @brettcannon @FFY00
69+
**/*importlib/resources/* @jaraco @warsaw @FFY00
6770
**/importlib/metadata/* @jaraco @warsaw
6871

6972
# Dates and times
@@ -144,13 +147,18 @@ Lib/ast.py @isidentical
144147
**/*cgi* @ethanfurman
145148
**/*tarfile* @ethanfurman
146149

147-
**/*tomllib* @encukou
150+
**/*tomllib* @encukou @hauntsaninja
148151

149152
**/*sysconfig* @FFY00
150153

154+
**/*cjkcodecs* @corona10
155+
151156
# macOS
152157
/Mac/ @python/macos-team
153158
**/*osx_support* @python/macos-team
154159

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

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ jobs:
176176
needs: check_source
177177
if: needs.check_source.outputs.run_tests == 'true'
178178
env:
179-
OPENSSL_VER: 1.1.1s
179+
OPENSSL_VER: 1.1.1t
180180
PYTHONSTRICTEXTENSIONBUILD: 1
181181
steps:
182182
- uses: actions/checkout@v3
@@ -235,7 +235,7 @@ jobs:
235235
strategy:
236236
fail-fast: false
237237
matrix:
238-
openssl_ver: [1.1.1s, 3.0.7]
238+
openssl_ver: [1.1.1t, 3.0.8, 3.1.0-beta1]
239239
env:
240240
OPENSSL_VER: ${{ matrix.openssl_ver }}
241241
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -282,7 +282,7 @@ jobs:
282282
needs: check_source
283283
if: needs.check_source.outputs.run_tests == 'true'
284284
env:
285-
OPENSSL_VER: 1.1.1s
285+
OPENSSL_VER: 1.1.1t
286286
PYTHONSTRICTEXTENSIONBUILD: 1
287287
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
288288
steps:

.github/workflows/doc.yml

-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ jobs:
5252
run: make -C Doc/ check
5353
- name: 'Build HTML documentation'
5454
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
55-
- name: 'Upload'
56-
uses: actions/upload-artifact@v3
57-
with:
58-
name: doc-html
59-
path: Doc/build/html
6055

6156
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
6257
doctest:

.github/workflows/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: "Check PRs"
18-
uses: actions/stale@v6
18+
uses: actions/stale@v7
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
stale-pr-message: 'This PR is stale because it has been open for 30 days with no activity.'

Doc/Makefile

+26-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ VENVDIR = ./venv
99
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
1010
SPHINXLINT = PATH=$(VENVDIR)/bin:$$PATH sphinx-lint
1111
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
12+
JOBS = auto
1213
PAPER =
1314
SOURCES =
1415
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
@@ -18,13 +19,10 @@ SPHINXERRORHANDLING = -W
1819
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
1920
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
2021

21-
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j auto \
22+
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) -j $(JOBS) \
2223
$(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES)
2324

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
27-
25+
.PHONY: help
2826
help:
2927
@echo "Please use \`make <target>' where <target> is one of"
3028
@echo " clean to remove build files"
@@ -44,6 +42,7 @@ help:
4442
@echo " dist to create a \"dist\" directory with archived docs for download"
4543
@echo " check to run a check for frequent markup errors"
4644

45+
.PHONY: build
4746
build:
4847
-mkdir -p build
4948
# Look first for a Misc/NEWS file (building from a source release tarball
@@ -70,70 +69,85 @@ build:
7069
$(SPHINXBUILD) $(ALLSPHINXOPTS)
7170
@echo
7271

72+
.PHONY: html
7373
html: BUILDER = html
7474
html: build
7575
@echo "Build finished. The HTML pages are in build/html."
7676

77+
.PHONY: htmlhelp
7778
htmlhelp: BUILDER = htmlhelp
7879
htmlhelp: build
7980
@echo "Build finished; now you can run HTML Help Workshop with the" \
8081
"build/htmlhelp/pydoc.hhp project file."
8182

83+
.PHONY: latex
8284
latex: BUILDER = latex
8385
latex: build
8486
@echo "Build finished; the LaTeX files are in build/latex."
8587
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
8688
"run these through (pdf)latex."
8789

90+
.PHONY: text
8891
text: BUILDER = text
8992
text: build
9093
@echo "Build finished; the text files are in build/text."
9194

95+
.PHONY: texinfo
9296
texinfo: BUILDER = texinfo
9397
texinfo: build
9498
@echo "Build finished; the python.texi file is in build/texinfo."
9599
@echo "Run \`make info' in that directory to run it through makeinfo."
96100

101+
.PHONY: epub
97102
epub: BUILDER = epub
98103
epub: build
99104
@echo "Build finished; the epub files are in build/epub."
100105

106+
.PHONY: changes
101107
changes: BUILDER = changes
102108
changes: build
103109
@echo "The overview file is in build/changes."
104110

111+
.PHONY: linkcheck
105112
linkcheck: BUILDER = linkcheck
106113
linkcheck:
107114
@$(MAKE) build BUILDER=$(BUILDER) || { \
108115
echo "Link check complete; look for any errors in the above output" \
109116
"or in build/$(BUILDER)/output.txt"; \
110117
false; }
111118

119+
.PHONY: coverage
112120
coverage: BUILDER = coverage
113121
coverage: build
114122
@echo "Coverage finished; see c.txt and python.txt in build/coverage"
115123

124+
.PHONY: doctest
116125
doctest: BUILDER = doctest
117126
doctest:
118127
@$(MAKE) build BUILDER=$(BUILDER) || { \
119128
echo "Testing of doctests in the sources finished, look at the" \
120129
"results in build/doctest/output.txt"; \
121130
false; }
122131

132+
.PHONY: pydoc-topics
123133
pydoc-topics: BUILDER = pydoc-topics
124134
pydoc-topics: build
125135
@echo "Building finished; now run this:" \
126136
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
127137

138+
.PHONY: htmlview
128139
htmlview: html
129140
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
130141

142+
.PHONY: clean
131143
clean: clean-venv
132144
-rm -rf build/*
133145

146+
.PHONY: clean-venv
134147
clean-venv:
135148
rm -rf $(VENVDIR)
136149

150+
.PHONY: venv
137151
venv:
138152
@if [ -d $(VENVDIR) ] ; then \
139153
echo "venv already exists."; \
@@ -145,6 +159,7 @@ venv:
145159
echo "The venv has been created in the $(VENVDIR) directory"; \
146160
fi
147161

162+
.PHONY: dist
148163
dist:
149164
rm -rf dist
150165
mkdir -p dist
@@ -199,12 +214,14 @@ dist:
199214
rm -r dist/python-$(DISTVERSION)-docs-texinfo
200215
rm dist/python-$(DISTVERSION)-docs-texinfo.tar
201216

217+
.PHONY: check
202218
check:
203219
# Check the docs and NEWS files with sphinx-lint.
204220
# Ignore the tools and venv dirs and check that the default role is not used.
205221
$(SPHINXLINT) -i tools -i $(VENVDIR) --enable default-role
206222
$(SPHINXLINT) --enable default-role ../Misc/NEWS.d/next/
207223

224+
.PHONY: serve
208225
serve:
209226
@echo "The serve target was removed, use htmlview instead (see bpo-36329)"
210227

@@ -216,22 +233,26 @@ serve:
216233
# output files)
217234

218235
# for development releases: always build
236+
.PHONY: autobuild-dev
219237
autobuild-dev:
220238
make dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'
221239

222240
# for quick rebuilds (HTML only)
241+
.PHONY: autobuild-dev-html
223242
autobuild-dev-html:
224243
make html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'
225244

226245
# for stable releases: only build if not in pre-release stage (alpha, beta)
227246
# release candidate downloads are okay, since the stable tree can be in that stage
247+
.PHONY: autobuild-stable
228248
autobuild-stable:
229249
@case $(DISTVERSION) in *[ab]*) \
230250
echo "Not building; $(DISTVERSION) is not a release version."; \
231251
exit 1;; \
232252
esac
233253
@make autobuild-dev
234254

255+
.PHONY: autobuild-stable-html
235256
autobuild-stable-html:
236257
@case $(DISTVERSION) in *[ab]*) \
237258
echo "Not building; $(DISTVERSION) is not a release version."; \

Doc/_static/og-image.png

14.2 KB
Loading

Doc/bugs.rst

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ If you find a bug in this documentation or would like to propose an improvement,
1919
please submit a bug report on the :ref:`tracker <using-the-tracker>`. If you
2020
have a suggestion on how to fix it, include that as well.
2121

22+
You can also open a discussion item on our
23+
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.
24+
2225
If you're short on time, you can also email documentation bug reports to
2326
docs@python.org (behavioral bugs can be sent to python-list@python.org).
2427
'docs@' is a mailing list run by volunteers; your request will be noticed,

Doc/c-api/apiabiversion.rst

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
5858
Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is
5959
hexversion ``0x030a00f0``.
6060

61+
Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``.
62+
6163
This version is also available via the symbol :data:`Py_Version`.
6264

6365
.. c:var:: const unsigned long Py_Version

0 commit comments

Comments
 (0)