Skip to content

Commit 4a8943e

Browse files
authored
Merge branch 'python:main' into queue-shutdown-multiprocessing
2 parents 5a7a387 + f070f54 commit 4a8943e

File tree

226 files changed

+3440
-1934
lines changed

Some content is hidden

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

226 files changed

+3440
-1934
lines changed

.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/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: 3 additions & 1 deletion
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

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/collections.abc.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,17 @@ Collections Abstract Base Classes -- Detailed Descriptions
272272
linked list), the mixins will have quadratic performance and will
273273
likely need to be overridden.
274274

275-
.. versionchanged:: 3.5
276-
The index() method added support for *stop* and *start*
277-
arguments.
275+
.. method:: index(value, start=0, stop=None)
276+
277+
Return first index of *value*.
278+
279+
Raises :exc:`ValueError` if the value is not present.
280+
281+
Supporting the *start* and *stop* arguments is optional, but recommended.
282+
283+
.. versionchanged:: 3.5
284+
The :meth:`!index` method added support for *stop* and *start*
285+
arguments.
278286

279287
.. class:: Set
280288
MutableSet

Doc/library/constants.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ A small number of constants live in the built-in namespace. They are:
6565
.. index:: single: ...; ellipsis literal
6666
.. data:: Ellipsis
6767

68-
The same as the ellipsis literal "``...``". Special value used mostly in conjunction
69-
with extended slicing syntax for user-defined container data types.
68+
The same as the ellipsis literal "``...``", an object frequently used to
69+
indicate that something is omitted. Assignment to ``Ellipsis`` is possible, but
70+
assignment to ``...`` raises a :exc:`SyntaxError`.
7071
``Ellipsis`` is the sole instance of the :data:`types.EllipsisType` type.
7172

7273

Doc/library/curses.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,10 @@ The module :mod:`curses` defines the following functions:
716716
Window Objects
717717
--------------
718718

719-
Window objects, as returned by :func:`initscr` and :func:`newwin` above, have
720-
the following methods and attributes:
719+
.. class:: window
720+
721+
Window objects, as returned by :func:`initscr` and :func:`newwin` above, have
722+
the following methods and attributes:
721723

722724

723725
.. method:: window.addch(ch[, attr])

Doc/library/exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ The following exceptions are used as warning categories; see the
897897

898898
Base class for warnings about dubious syntax.
899899

900+
This warning is typically emitted when compiling Python source code, and usually won't be reported
901+
when running already compiled code.
902+
900903

901904
.. exception:: RuntimeWarning
902905

0 commit comments

Comments
 (0)