Skip to content

Commit 10b0b8d

Browse files
itamarometa-codesync[bot]
authored andcommitted
Import CPython 3.14.5+ stable branch (2026-05-13)
Summary: Imported python/cpython `3.14.5+` from upstream rev [`2dedb4c`](https://www.github.com/python/cpython/commit/2dedb4c846efe1f461d271ccce353d1521ce83aa) (committed 2026-05-13 16:21:23+00:00). # Commit Info Base: (`3.14.5+`) - [`74cca9a`](https://www.github.com/python/cpython/commit/74cca9a92fb7d653e404843a56b8bdc7b0afdbbf) (commit date: 2026-05-11 09:57:50+00:00) Imported: (`3.14.5+`) - [`2dedb4c`](https://www.github.com/python/cpython/commit/2dedb4c846efe1f461d271ccce353d1521ce83aa) (commit date: 2026-05-13 16:21:23+00:00) # Noteworthy file changes - Test files (1 added) - Low-signal files (4 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GAgz6iD7QKuU_mUDAP8cwiSNH8oybr0LAAAz Differential Revision: D105034713 fbshipit-source-id: 147b0df3592057108dfe23bd2ce0fa3f5f78189d
1 parent d87ff50 commit 10b0b8d

35 files changed

Lines changed: 730 additions & 395 deletions

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Lib/test/test_ast/ @eclips4
213213
**/*multiprocessing* @gpshead
214214

215215
# SQLite 3
216-
**/*sqlite* @berkerpeksag @erlend-aasland
216+
**/*sqlite* @erlend-aasland
217217

218218
# subprocess
219219
/Lib/subprocess.py @gpshead

‎.github/workflows/mypy.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ jobs:
6868
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6969
with:
7070
persist-credentials: false
71-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
71+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
7272
with:
7373
python-version: "3.13"
74-
cache: pip
75-
cache-dependency-path: Tools/requirements-dev.txt
76-
- run: pip install -r Tools/requirements-dev.txt
74+
activate-environment: true
75+
cache-dependency-glob: Tools/requirements-dev.txt
76+
- run: uv pip install -r Tools/requirements-dev.txt
7777
- run: python3 Misc/mypy/make_symlinks.py --symlink
78-
- run: mypy --config-file ${{ matrix.target }}/mypy.ini
78+
- run: mypy --num-workers 4 --config-file ${{ matrix.target }}/mypy.ini

‎Doc/data/python3.14.abi‎

Lines changed: 315 additions & 309 deletions
Large diffs are not rendered by default.

‎Doc/library/dataclasses.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,8 @@ Module contents
497497
.. function:: is_dataclass(obj)
498498

499499
Return ``True`` if its parameter is a dataclass (including subclasses of a
500-
dataclass) or an instance of one, otherwise return ``False``.
500+
dataclass, but not including :ref:`generic aliases <types-genericalias>`)
501+
or an instance of one, otherwise return ``False``.
501502

502503
If you need to know if a class is an instance of a dataclass (and
503504
not a dataclass itself), then add a further check for ``not

‎Doc/library/inspect.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,9 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
399399
Return ``True`` if the object is a class, whether built-in or created in Python
400400
code.
401401

402+
This function returns ``False`` for :ref:`generic aliases <types-genericalias>` of classes,
403+
such as ``list[int]``.
404+
402405

403406
.. function:: ismethod(object)
404407

‎Doc/library/json.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Basic Usage
214214
a string (such as ``"\t"``) is used to indent each level.
215215
If zero, negative, or ``""`` (the empty string),
216216
only newlines are inserted.
217-
If ``None`` (the default), the most compact representation is used.
217+
If ``None`` (the default), no newlines are inserted.
218218
:type indent: int | str | None
219219

220220
:param separators:

‎Doc/library/pickle.rst‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The :mod:`!pickle` module differs from :mod:`marshal` in several significant way
5959
* :mod:`marshal` cannot be used to serialize user-defined classes and their
6060
instances. :mod:`!pickle` can save and restore class instances transparently,
6161
however the class definition must be importable and live in the same module as
62-
when the object was stored.
62+
when the object was pickled.
6363

6464
* The :mod:`marshal` serialization format is not guaranteed to be portable
6565
across Python versions. Because its primary job in life is to support
@@ -696,7 +696,10 @@ or both.
696696
If a string is returned, the string should be interpreted as the name of a
697697
global variable. It should be the object's local name relative to its
698698
module; the pickle module searches the module namespace to determine the
699-
object's module. This behaviour is typically useful for singletons.
699+
object's module: for a given ``obj`` to be pickled, the ``__module__``
700+
attribute is looked up on ``obj`` directly, which falls back to a lookup
701+
on the type of ``obj`` if no ``__module__`` instance attribute is set.
702+
This behaviour is typically useful for singletons.
700703

701704
When a tuple is returned, it must be between two and six items long.
702705
Optional items can either be omitted, or ``None`` can be provided as their

‎Doc/library/stdtypes.rst‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5783,7 +5783,8 @@ type and the :class:`bytes` data type:
57835783

57845784
``GenericAlias`` objects are instances of the class
57855785
:class:`types.GenericAlias`, which can also be used to create ``GenericAlias``
5786-
objects directly.
5786+
objects directly. Specializations of user-defined :ref:`generic classes <generic-classes>`
5787+
may not be instances of :class:`types.GenericAlias`, but they provide similar functionality.
57875788

57885789
.. describe:: T[X, Y, ...]
57895790

‎Doc/library/typing.rst‎

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,14 +3480,27 @@ Introspection helpers
34803480

34813481
Determine if a type is a :class:`Protocol`.
34823482

3483-
For example::
3483+
For example:
3484+
3485+
.. testcode::
34843486

34853487
class P(Protocol):
34863488
def a(self) -> str: ...
34873489
b: int
34883490

3489-
is_protocol(P) # => True
3490-
is_protocol(int) # => False
3491+
assert is_protocol(P)
3492+
assert not is_protocol(int)
3493+
3494+
This function only returns true for ``Protocol`` classes, not for
3495+
:ref:`generic aliases <types-genericalias>` of them:
3496+
3497+
.. testcode::
3498+
3499+
class GenericP[T](Protocol):
3500+
def a(self) -> T: ...
3501+
b: int
3502+
3503+
assert not is_protocol(GenericP[int])
34913504

34923505
.. versionadded:: 3.13
34933506

@@ -3510,6 +3523,17 @@ Introspection helpers
35103523
# not a typed dict itself
35113524
assert not is_typeddict(TypedDict)
35123525

3526+
This function only returns true for ``TypedDict`` classes, not for
3527+
:ref:`generic aliases <types-genericalias>` of them:
3528+
3529+
.. testcode::
3530+
3531+
class GenericFilm[T](TypedDict):
3532+
title: str
3533+
year: T
3534+
3535+
assert not is_typeddict(GenericFilm[int])
3536+
35133537
.. versionadded:: 3.10
35143538

35153539
.. class:: ForwardRef

‎Doc/library/unittest.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,10 +1237,10 @@ Test cases
12371237
| :meth:`assertNotEndsWith(a, b) | ``not a.endswith(b)`` | 3.14 |
12381238
| <TestCase.assertNotEndsWith>` | | |
12391239
+---------------------------------------+--------------------------------+--------------+
1240-
| :meth:`assertHasAttr(a, b) | ``hastattr(a, b)`` | 3.14 |
1240+
| :meth:`assertHasAttr(a, b) | ``hasattr(a, b)`` | 3.14 |
12411241
| <TestCase.assertHasAttr>` | | |
12421242
+---------------------------------------+--------------------------------+--------------+
1243-
| :meth:`assertNotHasAttr(a, b) | ``not hastattr(a, b)`` | 3.14 |
1243+
| :meth:`assertNotHasAttr(a, b) | ``not hasattr(a, b)`` | 3.14 |
12441244
| <TestCase.assertNotHasAttr>` | | |
12451245
+---------------------------------------+--------------------------------+--------------+
12461246

0 commit comments

Comments
 (0)