Skip to content

Commit 270974f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fileio_comments
2 parents b0f3afe + e65a1eb commit 270974f

File tree

229 files changed

+6635
-6425
lines changed

Some content is hidden

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

229 files changed

+6635
-6425
lines changed

.github/CODEOWNERS

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
# https://git-scm.com/docs/gitignore#_pattern_format
66

77
# GitHub
8-
.github/** @ezio-melotti @hugovk
8+
.github/** @ezio-melotti @hugovk @AA-Turner
99

1010
# pre-commit
1111
.pre-commit-config.yaml @hugovk @AlexWaygood
12-
.ruff.toml @hugovk @AlexWaygood
12+
.ruff.toml @hugovk @AlexWaygood @AA-Turner
1313

1414
# Build system
1515
configure* @erlend-aasland @corona10
@@ -56,6 +56,14 @@ Tools/c-analyzer/ @ericsnowcurrently
5656
# dbm
5757
**/*dbm* @corona10 @erlend-aasland @serhiy-storchaka
5858

59+
# Doc/ tools
60+
Doc/conf.py @AA-Turner @hugovk
61+
Doc/Makefile @AA-Turner @hugovk
62+
Doc/make.bat @AA-Turner @hugovk
63+
Doc/requirements.txt @AA-Turner @hugovk
64+
Doc/_static/** @AA-Turner @hugovk
65+
Doc/tools/** @AA-Turner @hugovk
66+
5967
# runtime state/lifecycle
6068
**/*pylifecycle* @ericsnowcurrently
6169
**/*pystate* @ericsnowcurrently
@@ -293,6 +301,6 @@ Lib/configparser.py @jaraco
293301
Lib/test/test_configparser.py @jaraco
294302

295303
# Doc sections
296-
Doc/reference/ @willingc
304+
Doc/reference/ @willingc @AA-Turner
297305

298306
**/*weakref* @kumaraditya303

.github/actionlint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
self-hosted-runner:
2-
labels: ["ubuntu-24.04-aarch64", "windows-aarch64"]
2+
labels: ["windows-aarch64"]
33

44
config-variables: null
55

66
paths:
77
.github/workflows/**/*.yml:
88
ignore:
99
- 1st argument of function call is not assignable
10-
- SC2(015|038|086|091|097|098|129|155)
10+
- SC2(015|038|086|091|097|098|129|155)

.github/workflows/build.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,13 @@ jobs:
244244
- true
245245
os:
246246
- ubuntu-24.04
247-
- ubuntu-24.04-aarch64
248-
is-fork: # only used for the exclusion trick
249-
- ${{ github.repository_owner != 'python' }}
247+
- ubuntu-24.04-arm
250248
exclude:
251-
- os: ubuntu-24.04-aarch64
252-
is-fork: true
253249
# Do not test BOLT with free-threading, to conserve resources
254250
- bolt: true
255251
free-threading: true
256252
# BOLT currently crashes during instrumentation on aarch64
257-
- os: ubuntu-24.04-aarch64
253+
- os: ubuntu-24.04-arm
258254
bolt: true
259255
uses: ./.github/workflows/reusable-ubuntu.yml
260256
with:

.github/workflows/jit.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ jobs:
8383
runner: ubuntu-24.04
8484
- target: aarch64-unknown-linux-gnu/gcc
8585
architecture: aarch64
86-
# Forks don't have access to our paid AArch64 runners. These jobs are skipped below:
87-
runner: ${{ github.repository_owner == 'python' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}
86+
runner: ubuntu-24.04-arm
8887
steps:
8988
- uses: actions/checkout@v4
9089
with:
@@ -123,8 +122,7 @@ jobs:
123122
./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
124123
125124
- name: Native Linux
126-
# Forks don't have access to our paid AArch64 runners. Skip those:
127-
if: runner.os == 'Linux' && (matrix.architecture == 'x86_64' || github.repository_owner == 'python')
125+
if: runner.os == 'Linux'
128126
run: |
129127
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" ./llvm.sh ${{ matrix.llvm }}
130128
export PATH="$(llvm-config-${{ matrix.llvm }} --bindir):$PATH"

.github/workflows/reusable-docs.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ jobs:
6565
continue-on-error: true
6666
run: |
6767
set -Eeuo pipefail
68-
# Build docs with the '-n' (nit-picky) option; write warnings to file
69-
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
68+
# Build docs with the nit-picky option; write warnings to file
69+
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" html
7070
- name: 'Check warnings'
7171
if: github.event_name == 'pull_request'
7272
run: |
@@ -76,26 +76,6 @@ jobs:
7676
--fail-if-improved \
7777
--fail-if-new-news-nit
7878
79-
# This build doesn't use problem matchers or check annotations
80-
build_doc_oldest_supported_sphinx:
81-
name: 'Docs (Oldest Sphinx)'
82-
runs-on: ubuntu-latest
83-
timeout-minutes: 60
84-
steps:
85-
- uses: actions/checkout@v4
86-
with:
87-
persist-credentials: false
88-
- name: 'Set up Python'
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: '3.13' # known to work with Sphinx 7.2.6
92-
cache: 'pip'
93-
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
94-
- name: 'Install build dependencies'
95-
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
96-
- name: 'Build HTML documentation'
97-
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
98-
9979
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
10080
doctest:
10181
name: 'Doctest'
@@ -121,4 +101,4 @@ jobs:
121101
run: make -C Doc/ PYTHON=../python venv
122102
# Use "xvfb-run" since some doctest tests open GUI windows
123103
- name: 'Run documentation doctest'
124-
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="-W --keep-going" doctest
104+
run: xvfb-run make -C Doc/ PYTHON=../python SPHINXERRORHANDLING="--fail-on-warning --keep-going" doctest

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ repos:
5656
- id: check-readthedocs
5757

5858
- repo: https://github.com/rhysd/actionlint
59-
rev: v1.7.6
59+
rev: v1.7.7
6060
hooks:
6161
- id: actionlint
6262

Doc/Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ PAPER =
1414
SOURCES =
1515
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
1616
REQUIREMENTS = requirements.txt
17-
SPHINXERRORHANDLING = -W
17+
SPHINXERRORHANDLING = --fail-on-warning
1818

1919
# Internal variables.
20-
PAPEROPT_a4 = -D latex_elements.papersize=a4paper
21-
PAPEROPT_letter = -D latex_elements.papersize=letterpaper
20+
PAPEROPT_a4 = --define latex_elements.papersize=a4paper
21+
PAPEROPT_letter = --define latex_elements.papersize=letterpaper
2222

23-
ALLSPHINXOPTS = -b $(BUILDER) \
24-
-d build/doctrees \
25-
-j $(JOBS) \
23+
ALLSPHINXOPTS = --builder $(BUILDER) \
24+
--doctree-dir build/doctrees \
25+
--jobs $(JOBS) \
2626
$(PAPEROPT_$(PAPER)) \
2727
$(SPHINXOPTS) $(SPHINXERRORHANDLING) \
2828
. build/$(BUILDER) $(SOURCES)
@@ -144,7 +144,7 @@ pydoc-topics: build
144144

145145
.PHONY: gettext
146146
gettext: BUILDER = gettext
147-
gettext: override SPHINXOPTS := -d build/doctrees-gettext $(SPHINXOPTS)
147+
gettext: override SPHINXOPTS := --doctree-dir build/doctrees-gettext $(SPHINXOPTS)
148148
gettext: build
149149

150150
.PHONY: htmlview
@@ -172,7 +172,7 @@ venv:
172172
else \
173173
echo "Creating venv in $(VENVDIR)"; \
174174
if $(UV) --version >/dev/null 2>&1; then \
175-
$(UV) venv $(VENVDIR); \
175+
$(UV) venv --python=$(PYTHON) $(VENVDIR); \
176176
VIRTUAL_ENV=$(VENVDIR) $(UV) pip install -r $(REQUIREMENTS); \
177177
else \
178178
$(PYTHON) -m venv $(VENVDIR); \
@@ -300,20 +300,20 @@ serve:
300300
# By default, Sphinx only rebuilds pages where the page content has changed.
301301
# This means it doesn't always pick up changes to preferred link targets, etc
302302
# To ensure such changes are picked up, we build the published docs with
303-
# `-E` (to ignore the cached environment) and `-a` (to ignore already existing
304-
# output files)
303+
# ``--fresh-env`` (to ignore the cached environment) and ``--write-all``
304+
# (to ignore already existing output files)
305305

306306
# for development releases: always build
307307
.PHONY: autobuild-dev
308308
autobuild-dev: DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py --short)
309309
autobuild-dev:
310-
$(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
310+
$(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION)
311311

312312
# for HTML-only rebuilds
313313
.PHONY: autobuild-dev-html
314314
autobuild-dev-html: DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py --short)
315315
autobuild-dev-html:
316-
$(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1' DISTVERSION=$(DISTVERSION)
316+
$(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) --fresh-env --write-all --html-define daily=1' DISTVERSION=$(DISTVERSION)
317317

318318
# for stable releases: only build if not in pre-release stage (alpha, beta)
319319
# release candidate downloads are okay, since the stable tree can be in that stage

Doc/c-api/init.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
109109

110110
Set by the :option:`-b` option.
111111

112-
.. deprecated-removed:: 3.12 3.14
112+
.. deprecated-removed:: 3.12 3.15
113113

114114
.. c:var:: int Py_DebugFlag
115115
@@ -123,7 +123,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
123123
Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment
124124
variable.
125125

126-
.. deprecated-removed:: 3.12 3.14
126+
.. deprecated-removed:: 3.12 3.15
127127

128128
.. c:var:: int Py_DontWriteBytecodeFlag
129129
@@ -137,7 +137,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
137137
Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE`
138138
environment variable.
139139

140-
.. deprecated-removed:: 3.12 3.14
140+
.. deprecated-removed:: 3.12 3.15
141141

142142
.. c:var:: int Py_FrozenFlag
143143
@@ -150,7 +150,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
150150

151151
Private flag used by ``_freeze_module`` and ``frozenmain`` programs.
152152

153-
.. deprecated-removed:: 3.12 3.14
153+
.. deprecated-removed:: 3.12 3.15
154154

155155
.. c:var:: int Py_HashRandomizationFlag
156156
@@ -165,7 +165,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
165165
If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment
166166
variable to initialize the secret hash seed.
167167

168-
.. deprecated-removed:: 3.12 3.14
168+
.. deprecated-removed:: 3.12 3.15
169169

170170
.. c:var:: int Py_IgnoreEnvironmentFlag
171171
@@ -178,7 +178,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
178178

179179
Set by the :option:`-E` and :option:`-I` options.
180180

181-
.. deprecated-removed:: 3.12 3.14
181+
.. deprecated-removed:: 3.12 3.15
182182

183183
.. c:var:: int Py_InspectFlag
184184
@@ -193,7 +193,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
193193
Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment
194194
variable.
195195

196-
.. deprecated-removed:: 3.12 3.14
196+
.. deprecated-removed:: 3.12 3.15
197197

198198
.. c:var:: int Py_InteractiveFlag
199199
@@ -218,7 +218,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
218218

219219
.. versionadded:: 3.4
220220

221-
.. deprecated-removed:: 3.12 3.14
221+
.. deprecated-removed:: 3.12 3.15
222222

223223
.. c:var:: int Py_LegacyWindowsFSEncodingFlag
224224
@@ -237,7 +237,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
237237

238238
.. availability:: Windows.
239239

240-
.. deprecated-removed:: 3.12 3.14
240+
.. deprecated-removed:: 3.12 3.15
241241

242242
.. c:var:: int Py_LegacyWindowsStdioFlag
243243
@@ -255,7 +255,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
255255

256256
.. availability:: Windows.
257257

258-
.. deprecated-removed:: 3.12 3.14
258+
.. deprecated-removed:: 3.12 3.15
259259

260260
.. c:var:: int Py_NoSiteFlag
261261
@@ -270,7 +270,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
270270

271271
Set by the :option:`-S` option.
272272

273-
.. deprecated-removed:: 3.12 3.14
273+
.. deprecated-removed:: 3.12 3.15
274274

275275
.. c:var:: int Py_NoUserSiteDirectory
276276
@@ -284,7 +284,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
284284
Set by the :option:`-s` and :option:`-I` options, and the
285285
:envvar:`PYTHONNOUSERSITE` environment variable.
286286

287-
.. deprecated-removed:: 3.12 3.14
287+
.. deprecated-removed:: 3.12 3.15
288288

289289
.. c:var:: int Py_OptimizeFlag
290290
@@ -295,7 +295,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
295295
Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment
296296
variable.
297297

298-
.. deprecated-removed:: 3.12 3.14
298+
.. deprecated-removed:: 3.12 3.15
299299

300300
.. c:var:: int Py_QuietFlag
301301
@@ -309,7 +309,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
309309

310310
.. versionadded:: 3.2
311311

312-
.. deprecated-removed:: 3.12 3.14
312+
.. deprecated-removed:: 3.12 3.15
313313

314314
.. c:var:: int Py_UnbufferedStdioFlag
315315
@@ -322,7 +322,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
322322
Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED`
323323
environment variable.
324324

325-
.. deprecated-removed:: 3.12 3.14
325+
.. deprecated-removed:: 3.12 3.15
326326

327327
.. c:var:: int Py_VerboseFlag
328328
@@ -338,7 +338,7 @@ to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to 2.
338338
Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment
339339
variable.
340340

341-
.. deprecated-removed:: 3.12 3.14
341+
.. deprecated-removed:: 3.12 3.15
342342

343343

344344
Initializing and finalizing the interpreter
@@ -606,7 +606,7 @@ Process-wide parameters
606606
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
607607
:c:expr:`wchar_*` string.
608608
609-
.. deprecated:: 3.11
609+
.. deprecated-removed:: 3.11 3.15
610610
611611
612612
.. c:function:: wchar_t* Py_GetProgramName()
@@ -868,7 +868,7 @@ Process-wide parameters
868868
.. XXX impl. doesn't seem consistent in allowing ``0``/``NULL`` for the params;
869869
check w/ Guido.
870870
871-
.. deprecated:: 3.11
871+
.. deprecated-removed:: 3.11 3.15
872872
873873
874874
.. c:function:: void PySys_SetArgv(int argc, wchar_t **argv)
@@ -889,7 +889,7 @@ Process-wide parameters
889889
890890
.. versionchanged:: 3.4 The *updatepath* value depends on :option:`-I`.
891891
892-
.. deprecated:: 3.11
892+
.. deprecated-removed:: 3.11 3.15
893893
894894
895895
.. c:function:: void Py_SetPythonHome(const wchar_t *home)
@@ -910,7 +910,7 @@ Process-wide parameters
910910
Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a
911911
:c:expr:`wchar_*` string.
912912
913-
.. deprecated:: 3.11
913+
.. deprecated-removed:: 3.11 3.15
914914
915915
916916
.. c:function:: wchar_t* Py_GetPythonHome()

0 commit comments

Comments
 (0)