Skip to content

Commit 7492e16

Browse files
authored
Merge branch 'main' into abiinfo-slot
2 parents cb0309f + e76464d commit 7492e16

File tree

294 files changed

+5137
-2683
lines changed

Some content is hidden

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

294 files changed

+5137
-2683
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
"dnf",
66
"install",
77
"-y",
8-
"which",
9-
"zsh",
10-
"fish",
118
// For umask fix below.
129
"/usr/bin/setfacl"
1310
],

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
- name: Build CPython
131131
run: |
132132
make -j4 regen-all
133-
make regen-stdlib-module-names regen-sbom regen-unicodedata
133+
make regen-stdlib-module-names regen-sbom
134134
- name: Check for changes
135135
run: |
136136
git add -u

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,18 @@ repos:
1414
name: Run Ruff (lint) on Tools/build/
1515
args: [--exit-non-zero-on-fix, --config=Tools/build/.ruff.toml]
1616
files: ^Tools/build/
17+
- id: ruff
18+
name: Run Ruff (lint) on Tools/i18n/
19+
args: [--exit-non-zero-on-fix, --config=Tools/i18n/.ruff.toml]
20+
files: ^Tools/i18n/
1721
- id: ruff
1822
name: Run Ruff (lint) on Argument Clinic
1923
args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
2024
files: ^Tools/clinic/|Lib/test/test_clinic.py
25+
- id: ruff
26+
name: Run Ruff (lint) on Tools/peg_generator/
27+
args: [--exit-non-zero-on-fix, --config=Tools/peg_generator/.ruff.toml]
28+
files: ^Tools/peg_generator/
2129
- id: ruff-format
2230
name: Run Ruff (format) on Doc/
2331
args: [--check]

Doc/c-api/init.rst

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,12 +2299,20 @@ per-object locks for :term:`free-threaded <free threading>` CPython. They are
22992299
intended to replace reliance on the :term:`global interpreter lock`, and are
23002300
no-ops in versions of Python with the global interpreter lock.
23012301
2302+
Critical sections are intended to be used for custom types implemented
2303+
in C-API extensions. They should generally not be used with built-in types like
2304+
:class:`list` and :class:`dict` because their public C-APIs
2305+
already use critical sections internally, with the notable
2306+
exception of :c:func:`PyDict_Next`, which requires critical section
2307+
to be acquired externally.
2308+
23022309
Critical sections avoid deadlocks by implicitly suspending active critical
2303-
sections and releasing the locks during calls to :c:func:`PyEval_SaveThread`.
2304-
When :c:func:`PyEval_RestoreThread` is called, the most recent critical section
2305-
is resumed, and its locks reacquired. This means the critical section API
2306-
provides weaker guarantees than traditional locks -- they are useful because
2307-
their behavior is similar to the :term:`GIL`.
2310+
sections, hence, they do not provide exclusive access such as provided by
2311+
traditional locks like :c:type:`PyMutex`. When a critical section is started,
2312+
the per-object lock for the object is acquired. If the code executed inside the
2313+
critical section calls C-API functions then it can suspend the critical section thereby
2314+
releasing the per-object lock, so other threads can acquire the per-object lock
2315+
for the same object.
23082316
23092317
Variants that accept :c:type:`PyMutex` pointers rather than Python objects are also
23102318
available. Use these variants to start a critical section in a situation where

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ Pending removal in Python 3.15
107107

108108
* :mod:`zipimport`:
109109

110-
* :meth:`~zipimport.zipimporter.load_module` has been deprecated since
110+
* :meth:`!zipimport.zipimporter.load_module` has been deprecated since
111111
Python 3.10. Use :meth:`~zipimport.zipimporter.exec_module` instead.
112-
(Contributed by Jiahao Li in :gh:`125746`.)
112+
(:gh:`125746`.)

Doc/extending/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ A pointer to the module definition must be returned via :c:func:`PyModuleDef_Ini
426426
so that the import machinery can create the module and store it in ``sys.modules``.
427427

428428
When embedding Python, the :c:func:`!PyInit_spam` function is not called
429-
automatically unless there's an entry in the :c:data:`PyImport_Inittab` table.
429+
automatically unless there's an entry in the :c:data:`!PyImport_Inittab` table.
430430
To add the module to the initialization table, use :c:func:`PyImport_AppendInittab`,
431431
optionally followed by an import of the module::
432432

Doc/glossary.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Glossary
2121
right delimiters (parentheses, square brackets, curly braces or triple
2222
quotes), or after specifying a decorator.
2323

24-
* The :const:`Ellipsis` built-in constant.
24+
.. index:: single: ...; ellipsis literal
25+
26+
* The three dots form of the :ref:`Ellipsis <bltin-ellipsis-object>` object.
2527

2628
abstract base class
2729
Abstract base classes complement :term:`duck-typing` by
@@ -107,7 +109,7 @@ Glossary
107109
statements.
108110

109111
asynchronous generator iterator
110-
An object created by a :term:`asynchronous generator` function.
112+
An object created by an :term:`asynchronous generator` function.
111113

112114
This is an :term:`asynchronous iterator` which when called using the
113115
:meth:`~object.__anext__` method returns an awaitable object which will execute

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ Here are three practical data validation utilities:
420420

421421
def validate(self, value):
422422
if not isinstance(value, str):
423-
raise TypeError(f'Expected {value!r} to be an str')
423+
raise TypeError(f'Expected {value!r} to be a str')
424424
if self.minsize is not None and len(value) < self.minsize:
425425
raise ValueError(
426426
f'Expected {value!r} to be no smaller than {self.minsize!r}'

Doc/howto/instrumentation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ should instead read:
269269
(assuming a :ref:`debug build <debug-build>` of CPython 3.6)
270270

271271

272+
.. _static-markers:
273+
272274
Available static markers
273275
------------------------
274276

Doc/library/annotationlib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.. module:: annotationlib
55
:synopsis: Functionality for introspecting annotations
66

7+
.. versionadded:: 3.14
78

89
**Source code:** :source:`Lib/annotationlib.py`
910

0 commit comments

Comments
 (0)