Skip to content

Commit 290ec9e

Browse files
committed
Merge branch 'master' into deprecate-__getformat__/145633
# Conflicts: # Doc/whatsnew/3.16.rst
2 parents 2c55ab2 + 03503dc commit 290ec9e

846 files changed

Lines changed: 28334 additions & 9535 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.

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ Include/internal/pycore_ast_state.h generated
8080
Include/internal/pycore_opcode.h generated
8181
Include/internal/pycore_opcode_metadata.h generated
8282
Include/internal/pycore_*_generated.h generated
83+
Include/internal/pycore_token.h generated
8384
Include/internal/pycore_uop_ids.h generated
8485
Include/internal/pycore_uop_metadata.h generated
8586
Include/opcode.h generated
8687
Include/opcode_ids.h generated
8788
Include/slots_generated.h generated
88-
Include/token.h generated
8989
Lib/_opcode_metadata.py generated
9090
Lib/idlelib/help.html generated
9191
Lib/keyword.py generated

.github/CODEOWNERS

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Tools/cases_generator/ @markshannon
223223
Python/assemble.c @markshannon @iritkatriel
224224
Python/codegen.c @markshannon @iritkatriel
225225
Python/compile.c @markshannon @iritkatriel
226-
Python/flowgraph.c @markshannon @iritkatriel
226+
Python/flowgraph.c @markshannon @iritkatriel @eclips4
227227
Python/instruction_sequence.c @iritkatriel
228228
Python/symtable.c @JelleZijlstra @carljm
229229

@@ -598,6 +598,12 @@ Doc/library/tomllib.rst @encukou @hauntsaninja
598598
Lib/test/test_tomllib/ @encukou @hauntsaninja
599599
Lib/tomllib/ @encukou @hauntsaninja
600600

601+
# Turtle
602+
Doc/library/turtle.rst @StanFromIreland
603+
Doc/library/turtle-star.png @StanFromIreland
604+
Lib/test/test_turtle.py @StanFromIreland
605+
Lib/turtle.py @StanFromIreland
606+
601607
# Typing
602608
Doc/library/typing.rst @JelleZijlstra @AlexWaygood
603609
Lib/test/test_typing.py @JelleZijlstra @AlexWaygood
@@ -620,6 +626,12 @@ Lib/test/test_unittest/testmock/ @cjw296
620626
# Weakref
621627
**/*weakref* @kumaraditya303
622628

629+
# Zlib
630+
Doc/library/zlib.rst @StanFromIreland
631+
Lib/compression/zlib.py @StanFromIreland
632+
Lib/test/test_zlib.py @StanFromIreland
633+
Modules/_zlibmodule.c @StanFromIreland
634+
623635
# Zipfile.Path
624636
Lib/test/test_zipfile/_path/ @jaraco
625637
Lib/zipfile/_path/ @jaraco

.github/workflows/build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ jobs:
245245
os: ${{ matrix.os }}
246246
test-opts: ${{ matrix.test-opts || '' }}
247247

248+
build-ubuntu-installed:
249+
name: 'Ubuntu (installed)'
250+
needs: build-context
251+
if: needs.build-context.outputs.run-ubuntu == 'true'
252+
uses: ./.github/workflows/reusable-install.yml
253+
248254
build-ubuntu-ssltests:
249255
name: 'Ubuntu SSL tests'
250256
runs-on: ${{ matrix.os }}
@@ -262,13 +268,13 @@ jobs:
262268
# unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
263269
# supported by important vendors such as AWS-LC.
264270
- { name: openssl, version: 1.1.1w }
265-
- { name: openssl, version: 3.0.21 }
266-
- { name: openssl, version: 3.4.6 }
267-
- { name: openssl, version: 3.5.7 }
268-
- { name: openssl, version: 3.6.3 }
269-
- { name: openssl, version: 4.0.1 }
271+
- { name: openssl, version: 3.0.22 }
272+
- { name: openssl, version: 3.4.7 }
273+
- { name: openssl, version: 3.5.8 }
274+
- { name: openssl, version: 3.6.4 }
275+
- { name: openssl, version: 4.0.2 }
270276
## AWS-LC
271-
- { name: aws-lc, version: 5.0.0 }
277+
- { name: aws-lc, version: 5.5.0 }
272278
env:
273279
SSLLIB_VER: ${{ matrix.ssllib.version }}
274280
MULTISSL_DIR: ${{ github.workspace }}/multissl
@@ -373,7 +379,7 @@ jobs:
373379
needs: build-context
374380
if: needs.build-context.outputs.run-ubuntu == 'true'
375381
env:
376-
OPENSSL_VER: 3.5.7
382+
OPENSSL_VER: 3.5.8
377383
PYTHONSTRICTEXTENSIONBUILD: 1
378384
steps:
379385
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -481,7 +487,7 @@ jobs:
481487
matrix:
482488
os: [ubuntu-26.04]
483489
env:
484-
OPENSSL_VER: 3.5.7
490+
OPENSSL_VER: 3.5.8
485491
PYTHONSTRICTEXTENSIONBUILD: 1
486492
ASAN_OPTIONS: detect_leaks=0:allocator_may_return_null=1:handle_segv=0
487493
steps:
@@ -636,6 +642,7 @@ jobs:
636642
- build-windows
637643
- build-macos
638644
- build-ubuntu
645+
- build-ubuntu-installed
639646
- build-ubuntu-ssltests
640647
- build-ios
641648
- build-emscripten
@@ -685,6 +692,7 @@ jobs:
685692
!fromJSON(needs.build-context.outputs.run-ubuntu)
686693
&& '
687694
build-ubuntu,
695+
build-ubuntu-installed,
688696
build-ubuntu-ssltests,
689697
test-hypothesis,
690698
build-asan,
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Reusable Ubuntu (installed)
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
FORCE_COLOR: 1
11+
12+
jobs:
13+
build-install-test:
14+
name: build, install and test
15+
runs-on: ubuntu-26.04-arm
16+
timeout-minutes: 60
17+
env:
18+
PYTHONSTRICTEXTENSIONBUILD: 1
19+
steps:
20+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
21+
with:
22+
persist-credentials: false
23+
- name: Register gcc problem matcher
24+
run: echo "::add-matcher::.github/problem-matchers/gcc.json"
25+
- name: Set install dir
26+
run:
27+
echo "INSTALL_DIR=$(realpath "${GITHUB_WORKSPACE}/../installed-python")" >> "$GITHUB_ENV"
28+
- name: Install dependencies
29+
run: sudo ./.github/workflows/posix-deps-apt.sh
30+
- name: Configure CPython
31+
run: ./configure --config-cache --prefix="$INSTALL_DIR"
32+
- name: Build CPython
33+
run: make -j
34+
- name: Install CPython
35+
run: make install
36+
- name: Set installed interpreter
37+
run: |
38+
ldversion=$(./python -c 'import sysconfig; print(sysconfig.get_config_var("LDVERSION"))')
39+
echo "INSTALLED_PYTHON=${INSTALL_DIR}/bin/python${ldversion}" >> "$GITHUB_ENV"
40+
- name: Display build info
41+
run: |
42+
"$INSTALLED_PYTHON" -m test.pythoninfo
43+
- name: Test the installed Python
44+
run: xvfb-run "$INSTALLED_PYTHON" -m test --fast-ci --timeout=900

.github/workflows/reusable-san.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
env:
1919
FORCE_COLOR: 1
20-
OPENSSL_VER: 3.5.7
20+
OPENSSL_VER: 3.5.8
2121

2222
jobs:
2323
build-san-reusable:

.github/workflows/reusable-ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ${{ inputs.os }}
3636
timeout-minutes: 60
3737
env:
38-
OPENSSL_VER: 3.5.7
38+
OPENSSL_VER: 3.5.8
3939
PYTHONSTRICTEXTENSIONBUILD: 1
4040
TERM: linux
4141
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Tools/unicode/data/
143143
/config.status.lineno
144144
/.ccache
145145
/cross-build*/
146+
/dist/
146147
/jit_stencils*.h
147148
/jit_unwind_info*.h
148149
.jit-stamp

Doc/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ help:
3232
@echo "Please use \`make <target>' where <target> is one of"
3333
@echo " clean to remove build files"
3434
@echo " venv to create a venv with necessary tools"
35+
@echo " lock to regenerate the pinned dependencies in $(REQUIREMENTS)"
3536
@echo " html to make standalone HTML files"
3637
@echo " gettext to generate POT files"
3738
@echo " htmlview to open the index page built by the html target in your browser"
@@ -185,6 +186,19 @@ venv:
185186
echo "The venv has been created in the $(VENVDIR) directory"; \
186187
fi
187188

189+
.PHONY: lock
190+
lock:
191+
# Dependencies have a 14 day cooldown period to mitigate supply chain attacks,
192+
# except for sphinx_linklint and python-docs-theme, which are maintained by
193+
# core team members.
194+
uv pip compile requirements.txt \
195+
--exclude-newer P14D \
196+
--exclude-newer-package sphinx_linklint=PT0S \
197+
--exclude-newer-package python-docs-theme=PT0S \
198+
--no-cache --output-file $(REQUIREMENTS) \
199+
--python-version 3.12 --universal \
200+
--custom-compile-command="make lock"
201+
188202
.PHONY: dist-no-html
189203
dist-no-html: dist-text dist-epub dist-texinfo
190204

Doc/about.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and now maintained as an independent project.
1010
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
1111
.. _Sphinx: https://www.sphinx-doc.org/
1212

13-
.. In the online version of these documents, you can submit comments and suggest
13+
.. In the online version of this documentation, you can submit comments and suggest
1414
changes directly on the documentation pages.
1515
1616
Development of the documentation and its toolchain is an entirely volunteer

Doc/c-api/arg.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,18 @@ inside nested parentheses. They are:
399399
their default value --- when an optional argument is not specified,
400400
:c:func:`PyArg_ParseTuple` does not touch the contents of the corresponding C
401401
variable(s).
402+
For example, the format string ``"OO|OO"`` corresponds to the Python
403+
signature ``f(a, b, c=None, d=None)``.
402404

403405
``$``
404406
:c:func:`PyArg_ParseTupleAndKeywords` only:
405407
Indicates that the remaining arguments in the Python argument list are
406-
keyword-only. Currently, all keyword-only arguments must also be optional
407-
arguments, so ``|`` must always be specified before ``$`` in the format
408-
string.
408+
keyword-only.
409+
They are optional if ``|`` was specified before ``$``, and required otherwise.
410+
``|`` cannot be specified after ``$``.
411+
For example, the format string ``"O|O$O"`` corresponds to the Python
412+
signature ``f(a, b=None, *, c=None)``,
413+
and the format string ``"OO$OO"`` corresponds to ``f(a, b, *, c, d)``.
409414

410415
.. versionadded:: 3.3
411416

0 commit comments

Comments
 (0)