Skip to content

Commit b08c1bb

Browse files
authored
Merge branch 'main' into doc-sphinxext-opengraph-social-cards
2 parents 209b5b1 + da36bcc commit b08c1bb

File tree

69 files changed

+1754
-1734
lines changed

Some content is hidden

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

69 files changed

+1754
-1734
lines changed

.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"

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ venv:
175175
else \
176176
echo "Creating venv in $(VENVDIR)"; \
177177
if $(UV) --version >/dev/null 2>&1; then \
178-
$(UV) venv $(VENVDIR); \
178+
$(UV) venv --python=$(PYTHON) $(VENVDIR); \
179179
VIRTUAL_ENV=$(VENVDIR) $(UV) pip install $(requirements); \
180180
else \
181181
$(PYTHON) -m venv $(VENVDIR); \

Doc/c-api/veryhigh.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,20 @@ the same library that the Python runtime is using.
348348
.. versionchanged:: 3.8
349349
Added *cf_feature_version* field.
350350
351+
The available compiler flags are accessible as macros:
351352
352-
.. c:var:: int CO_FUTURE_DIVISION
353+
.. c:namespace:: NULL
353354
354-
This bit can be set in *flags* to cause division operator ``/`` to be
355-
interpreted as "true division" according to :pep:`238`.
355+
.. c:macro:: PyCF_ALLOW_TOP_LEVEL_AWAIT
356+
PyCF_ONLY_AST
357+
PyCF_OPTIMIZED_AST
358+
PyCF_TYPE_COMMENTS
359+
360+
See :ref:`compiler flags <ast-compiler-flags>` in documentation of the
361+
:py:mod:`!ast` Python module, which exports these constants under
362+
the same names.
363+
364+
.. c:var:: int CO_FUTURE_DIVISION
365+
366+
This bit can be set in *flags* to cause division operator ``/`` to be
367+
interpreted as "true division" according to :pep:`238`.

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ Pending removal in Python 3.16
8080
has been deprecated since Python 3.13.
8181
Use the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment variable instead.
8282

83+
* :mod:`sysconfig`:
84+
85+
* The ``~sysconfig.expand_makefile_vars`` function
86+
has been deprecated since Python 3.14.
87+
Use the ``vars`` argument of :func:`sysconfig.get_paths` instead.
88+
8389
* :mod:`tarfile`:
8490

8591
* The undocumented and unused :attr:`!TarFile.tarfile` attribute

Doc/library/asyncio-eventloop.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ Creating Futures and Tasks
392392

393393
If *factory* is ``None`` the default task factory will be set.
394394
Otherwise, *factory* must be a *callable* with the signature matching
395-
``(loop, coro, context=None)``, where *loop* is a reference to the active
395+
``(loop, coro, **kwargs)``, where *loop* is a reference to the active
396396
event loop, and *coro* is a coroutine object. The callable
397-
must return a :class:`asyncio.Future`-compatible object.
397+
must pass on all *kwargs*, and return a :class:`asyncio.Task`-compatible object.
398398

399399
.. method:: loop.get_task_factory()
400400

Doc/library/dis.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ the following command can be used to display the disassembly of
7575
>>> dis.dis(myfunc)
7676
2 RESUME 0
7777
<BLANKLINE>
78-
3 LOAD_GLOBAL 1 (len + NULL)
78+
3 LOAD_GLOBAL 0 (len)
79+
PUSH_NULL
7980
LOAD_FAST 0 (alist)
8081
CALL 1
8182
RETURN_VALUE
@@ -207,6 +208,7 @@ Example:
207208
...
208209
RESUME
209210
LOAD_GLOBAL
211+
PUSH_NULL
210212
LOAD_FAST
211213
CALL
212214
RETURN_VALUE
@@ -1215,21 +1217,28 @@ iterations of the loop.
12151217

12161218
.. opcode:: LOAD_ATTR (namei)
12171219

1218-
If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with
1219-
``getattr(STACK[-1], co_names[namei>>1])``.
1220+
Replaces ``STACK[-1]`` with ``getattr(STACK[-1], co_names[namei>>1])``.
12201221

1221-
If the low bit of ``namei`` is set, this will attempt to load a method named
1222-
``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is popped.
1222+
.. versionchanged:: 3.12
1223+
If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is
1224+
pushed to the stack before the attribute or unbound method respectively.
1225+
1226+
.. versionchanged:: 3.14
1227+
Reverted change from 3.12. The low bit of ``namei`` has no special meaning.
1228+
1229+
1230+
.. opcode:: LOAD_METHOD (namei)
1231+
1232+
Attempt to load a method named ``co_names[namei>>1]`` from the ``STACK[-1]`` object.
1233+
``STACK[-1]`` is popped.
12231234
This bytecode distinguishes two cases: if ``STACK[-1]`` has a method with the
12241235
correct name, the bytecode pushes the unbound method and ``STACK[-1]``.
12251236
``STACK[-1]`` will be used as the first argument (``self``) by :opcode:`CALL`
12261237
or :opcode:`CALL_KW` when calling the unbound method.
12271238
Otherwise, ``NULL`` and the object returned by
12281239
the attribute lookup are pushed.
12291240

1230-
.. versionchanged:: 3.12
1231-
If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is
1232-
pushed to the stack before the attribute or unbound method respectively.
1241+
.. versionadded:: 3.14
12331242

12341243

12351244
.. opcode:: LOAD_SUPER_ATTR (namei)
@@ -1926,12 +1935,6 @@ but are replaced by real opcodes or removed before bytecode is generated.
19261935
This opcode is now a pseudo-instruction.
19271936

19281937

1929-
.. opcode:: LOAD_METHOD
1930-
1931-
Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode
1932-
with a flag set in the arg.
1933-
1934-
19351938
.. _opcode_collections:
19361939

19371940
Opcode collections

Doc/whatsnew/3.14.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,12 @@ zipinfo
730730

731731
(Contributed by Bénédikt Tran in :gh:`123424`.)
732732

733+
* :meth:`zipfile.ZipFile.writestr` now respect ``SOURCE_DATE_EPOCH`` that
734+
distributions can set centrally and have build tools consume this in order
735+
to produce reproducible output.
736+
737+
(Contributed by Jiahao Li in :gh:`91279`.)
738+
733739
.. Add improved modules above alphabetically, not here at the end.
734740
735741
Optimizations

0 commit comments

Comments
 (0)