Skip to content

Commit e145633

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Import CPython 3.14.5+ stable branch (2026-06-04)
Summary: Imported python/cpython `3.14.5+` from upstream rev [`045bc6b`](https://www.github.com/python/cpython/commit/045bc6bcbf16a229500ce029a333314654916866) (committed 2026-06-04 00:21:15+00:00). # Commit Info - Base: (`3.14.5+`) - [`861ab65`](https://www.github.com/python/cpython/commit/861ab650c9dc3ac01cd9390d4d68df2a5b4aa51f) (commit date: 2026-06-02 13:05:49+00:00) - Imported: (`3.14.5+`) - [`045bc6b`](https://www.github.com/python/cpython/commit/045bc6bcbf16a229500ce029a333314654916866) (commit date: 2026-06-04 00:21:15+00:00) # Noteworthy file changes - Low-signal files (4 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GG2SMSNU3M9r_kkFAN47iY9qk0AAbr0LAAAz Reviewed By: itamaro Differential Revision: D107509434 fbshipit-source-id: eea177d48a34abd39aa27a98ff463b7edd6e9bb6
1 parent daf1816 commit e145633

56 files changed

Lines changed: 203 additions & 55 deletions

Some content is hidden

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

Doc/c-api/typehints.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
3131
static PyMethodDef my_obj_methods[] = {
3232
// Other methods.
3333
...
34-
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
34+
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "my_obj is generic over its contained type"}
3535
...
3636
}
3737

Doc/conf.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88

99
import os
1010
import sys
11-
from importlib import import_module
1211
from importlib.util import find_spec
1312

1413
# Make our custom extensions available to Sphinx
1514
sys.path.append(os.path.abspath('tools/extensions'))
1615
sys.path.append(os.path.abspath('includes'))
1716

18-
# Python specific content from Doc/Tools/extensions/pyspecific.py
19-
from pyspecific import SOURCE_URI
17+
from patchlevel import get_header_version_info, get_version_info
2018

2119
# General configuration
2220
# ---------------------
@@ -77,7 +75,7 @@
7775
# We look for the Include/patchlevel.h file in the current Python source tree
7876
# and replace the values accordingly.
7977
# See Doc/tools/extensions/patchlevel.py
80-
version, release = import_module('patchlevel').get_version_info()
78+
version, release = get_version_info()
8179

8280
rst_epilog = f"""
8381
.. |python_version_literal| replace:: ``Python {version}``
@@ -555,16 +553,20 @@
555553
r'https://unix.org/version2/whatsnew/lp64_wp.html',
556554
]
557555

556+
558557
# Options for sphinx.ext.extlinks
559558
# -------------------------------
560559

560+
v = get_header_version_info()
561+
branch = "main" if v.releaselevel == "alpha" else f"{v.major}.{v.minor}"
562+
561563
# This config is a dictionary of external sites,
562564
# mapping unique short aliases to a base URL and a prefix.
563565
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
564566
extlinks = {
565567
"oss-fuzz": ("https://issues.oss-fuzz.com/issues/%s", "#%s"),
566568
"pypi": ("https://pypi.org/project/%s/", "%s"),
567-
"source": (SOURCE_URI, "%s"),
569+
"source": (f"https://github.com/python/cpython/tree/{branch}/%s", "%s"),
568570
}
569571
extlinks_detect_hardcoded_links = True
570572

Doc/library/array.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The module defines the following type:
106106
:exc:`TypeError` is raised. Array objects also implement the buffer interface,
107107
and may be used wherever :term:`bytes-like objects <bytes-like object>` are supported.
108108

109+
Arrays are :ref:`generic <generics>` over the type of their contents.
110+
109111
.. audit-event:: array.__new__ typecode,initializer array.array
110112

111113

Doc/library/asyncio-future.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ Future Object
101101
implementations can inject their own optimized implementations
102102
of a Future object.
103103

104+
Futures are :ref:`generic <generics>` over the type of their results.
105+
104106
.. versionchanged:: 3.7
105107
Added support for the :mod:`contextvars` module.
106108

Doc/library/asyncio-task.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,9 @@ Task object
12481248
blocks. If the coroutine returns or raises without blocking, the task
12491249
will be finished eagerly and will skip scheduling to the event loop.
12501250

1251+
Tasks are :ref:`generic <generics>` over the return type of their wrapped
1252+
coroutines.
1253+
12511254
.. versionchanged:: 3.7
12521255
Added support for the :mod:`contextvars` module.
12531256

Doc/library/collections.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ or subtracting from an empty counter.
480480
Unix. They are also useful for tracking transactions and other pools of data
481481
where only the most recent activity is of interest.
482482

483+
Deques are :ref:`generic <generics>` over the type of their contents.
484+
483485

484486
Deque objects support the following methods:
485487

@@ -735,6 +737,9 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
735737
as if they were passed to the :class:`dict` constructor, including keyword
736738
arguments.
737739

740+
:class:`!defaultdict`\s are :ref:`generic <generics>` over two types,
741+
signifying (respectively) the types of the dictionary's keys and values.
742+
738743

739744
:class:`defaultdict` objects support the following method in addition to the
740745
standard :class:`dict` operations:

Doc/library/contextvars.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Context Variables
4444
references to context variables which prevents context variables
4545
from being properly garbage collected.
4646

47+
:class:`!ContextVar`\s are :ref:`generic <generics>` over the type of
48+
their contained value.
49+
4750
.. attribute:: ContextVar.name
4851

4952
The name of the variable. This is a read-only property.
@@ -132,6 +135,9 @@ Context Variables
132135
Tokens support the :ref:`context manager protocol <context-managers>`
133136
to automatically reset context variables. See :meth:`ContextVar.set`.
134137

138+
Tokens are :ref:`generic <generics>` over the same type as the
139+
:class:`ContextVar` which created them.
140+
135141
.. versionadded:: 3.14
136142

137143
Added support for usage as a context manager.

Doc/library/ctypes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,6 +3167,8 @@ Arrays and pointers
31673167
subscript and slice accesses; for slice reads, the resulting object is
31683168
*not* itself an :class:`Array`.
31693169

3170+
Arrays are :ref:`generic <generics>` over the type of their elements.
3171+
31703172

31713173
.. attribute:: _length_
31723174

Doc/library/exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,9 @@ their subgroups based on the types of the contained exceptions.
971971
raises a :exc:`TypeError` if any contained exception is not an
972972
:exc:`Exception` subclass.
973973

974+
Exception groups are :ref:`generic <generics>` over the type of their
975+
contained exceptions.
976+
974977
.. impl-detail::
975978

976979
The ``excs`` parameter may be any sequence, but lists and tuples are

Doc/library/io.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ than raw I/O does.
829829

830830
.. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)
831831

832-
A buffered binary stream providing higher-level access to a seekable
833-
:class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader`
834-
and :class:`BufferedWriter`.
832+
A buffered binary stream implementing :class:`BufferedIOBase` interfaces
833+
providing higher-level access to a seekable :class:`RawIOBase` raw binary
834+
stream.
835835

836836
The constructor creates a reader and writer for a seekable raw stream, given
837837
in the first argument. If the *buffer_size* is omitted it defaults to

0 commit comments

Comments
 (0)