Skip to content

Commit c0e57dd

Browse files
generatedunixname1734921407115435facebook-github-bot
authored andcommitted
Import upstream CPython branch '3.14'
Summary: Python `3.14.0rc2+` (`3.14`) was **published** on 2025-09-04 09:56:52+00:00. # Commit Info Base: (`3.14.0rc2+`) - `5ec6d56405bd7fe365d428b3c1db32feff260ae8` (commit date: 2025-08-31 06:54:59+00:00) Imported: (`3.14.0rc2+`) - `3.14` (commit date: 2025-09-04 09:56:52+00:00) # Files added ```javascript Misc/NEWS.d/next/Core_and_Builtins/2025-09-02-09-10-06.gh-issue-138372.h1Xk4-.rst ``` Reviewed By: itamaro Differential Revision: D81676855 fbshipit-source-id: f9f8a6e0f07551439b0ba0267498818b74bc7f97
1 parent 0a41a85 commit c0e57dd

26 files changed

Lines changed: 404 additions & 364 deletions

Doc/extending/extending.rst

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

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

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/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/hmac.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ cannot be used with HMAC.
5050
.. versionadded:: 3.7
5151

5252

53-
An HMAC object has the following methods:
53+
.. class:: HMAC
54+
55+
An HMAC object has the following methods:
5456

5557
.. method:: HMAC.update(msg)
5658

Doc/library/shutil.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ Directory and files operations
9090
copy the file more efficiently. See
9191
:ref:`shutil-platform-dependent-efficient-copy-operations` section.
9292

93+
.. exception:: SpecialFileError
94+
95+
This exception is raised when :func:`copyfile` or :func:`copytree` attempt
96+
to copy a named pipe.
97+
98+
.. versionadded:: 2.7
99+
93100
.. exception:: SameFileError
94101

95102
This exception is raised if source and destination in :func:`copyfile`

Doc/library/unittest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,6 +2525,10 @@ instead of as an error.
25252525
setUpModule and tearDownModule
25262526
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25272527

2528+
.. function:: setUpModule
2529+
tearDownModule
2530+
:no-typesetting:
2531+
25282532
These should be implemented as functions::
25292533

25302534
def setUpModule():

Doc/library/xml.sax.handler.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ events in the input document:
248248

249249
The *name* parameter contains the raw XML 1.0 name of the element type as a
250250
string and the *attrs* parameter holds an object of the
251-
:class:`~xml.sax.xmlreader.Attributes`
252-
interface (see :ref:`attributes-objects`) containing the attributes of
251+
:ref:`Attributes <attributes-objects>` interface containing the attributes of
253252
the element. The object passed as *attrs* may be re-used by the parser; holding
254253
on to a reference to it is not a reliable way to keep a copy of the attributes.
255254
To keep a copy of the attributes, use the :meth:`copy` method of the *attrs*
@@ -271,8 +270,7 @@ events in the input document:
271270
The *name* parameter contains the name of the element type as a ``(uri,
272271
localname)`` tuple, the *qname* parameter contains the raw XML 1.0 name used in
273272
the source document, and the *attrs* parameter holds an instance of the
274-
:class:`~xml.sax.xmlreader.AttributesNS` interface (see
275-
:ref:`attributes-ns-objects`)
273+
:ref:`AttributesNS <attributes-ns-objects>` interface
276274
containing the attributes of the element. If no namespace is associated with
277275
the element, the *uri* component of *name* will be ``None``. The object passed
278276
as *attrs* may be re-used by the parser; holding on to a reference to it is not

Doc/reference/datamodel.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,6 +2351,9 @@ Customizing module attribute access
23512351
single: __dir__ (module attribute)
23522352
single: __class__ (module attribute)
23532353

2354+
.. method:: module.__getattr__
2355+
module.__dir__
2356+
23542357
Special names ``__getattr__`` and ``__dir__`` can be also used to customize
23552358
access to module attributes. The ``__getattr__`` function at the module level
23562359
should accept one argument which is the name of an attribute and return the
@@ -2364,6 +2367,8 @@ The ``__dir__`` function should accept no arguments, and return an iterable of
23642367
strings that represents the names accessible on module. If present, this
23652368
function overrides the standard :func:`dir` search on a module.
23662369

2370+
.. attribute:: module.__class__
2371+
23672372
For a more fine grained customization of the module behavior (setting
23682373
attributes, properties, etc.), one can set the ``__class__`` attribute of
23692374
a module object to a subclass of :class:`types.ModuleType`. For example::

Doc/reference/simple_stmts.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ where the :keyword:`import` statement occurs.
831831

832832
.. index:: single: __all__ (optional module attribute)
833833

834+
.. attribute:: module.__all__
835+
:no-typesetting:
836+
834837
The *public names* defined by a module are determined by checking the module's
835838
namespace for a variable named ``__all__``; if defined, it must be a sequence
836839
of strings which are names defined or imported by that module. The names

0 commit comments

Comments
 (0)