Skip to content

Commit bc3d892

Browse files
committed
Merge branch '3.14' of https://github.com/python/cpython into 3.14
2 parents cde768c + 8c69901 commit bc3d892

17 files changed

+1468
-990
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,3 +326,8 @@ Modules/_xxtestfuzz/ @ammaraskar
326326
**/*templateobject* @lysnikolaou
327327
**/*templatelib* @lysnikolaou
328328
**/*tstring* @lysnikolaou
329+
330+
# Remote debugging
331+
Python/remote_debug.h @pablogsal
332+
Python/remote_debugging.c @pablogsal
333+
Modules/_remote_debugging_module.c @pablogsal @ambv @1st1

.github/workflows/tail-call.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,3 @@ jobs:
137137
CC=clang-20 ./configure --with-tail-call-interp --disable-gil
138138
make all --jobs 4
139139
./python -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3
140-

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,14 @@ repos:
4343
exclude: ^Lib/test/test_tomllib/
4444
- id: check-yaml
4545
- id: end-of-file-fixer
46-
types: [python]
46+
types_or: [python, yaml]
4747
exclude: Lib/test/tokenizedata/coding20731.py
48+
- id: end-of-file-fixer
49+
files: '^\.github/CODEOWNERS$'
4850
- id: trailing-whitespace
49-
types_or: [c, inc, python, rst]
51+
types_or: [c, inc, python, rst, yaml]
5052
- id: trailing-whitespace
51-
files: '\.(gram)$'
53+
files: '^\.github/CODEOWNERS|\.(gram)$'
5254

5355
- repo: https://github.com/python-jsonschema/check-jsonschema
5456
rev: 0.33.0

.readthedocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ build:
3232
- make -C Doc venv html
3333
- mkdir _readthedocs
3434
- mv Doc/build/html _readthedocs/html
35-

Doc/data/python3.14.abi

Lines changed: 796 additions & 793 deletions
Large diffs are not rendered by default.

Doc/reference/datamodel.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,10 +1228,22 @@ Special attributes
12281228
:attr:`__annotations__ attributes <object.__annotations__>`.
12291229

12301230
For best practices on working with :attr:`~object.__annotations__`,
1231-
please see :mod:`annotationlib`. Where possible, use
1231+
please see :mod:`annotationlib`. Use
12321232
:func:`annotationlib.get_annotations` instead of accessing this
12331233
attribute directly.
12341234

1235+
.. warning::
1236+
1237+
Accessing the :attr:`!__annotations__` attribute directly
1238+
on a class object may return annotations for the wrong class, specifically
1239+
in certain cases where the class, its base class, or a metaclass
1240+
is defined under ``from __future__ import annotations``.
1241+
See :pep:`749 <749#pep749-metaclasses>` for details.
1242+
1243+
This attribute does not exist on certain builtin classes. On
1244+
user-defined classes without ``__annotations__``, it is an
1245+
empty dictionary.
1246+
12351247
.. versionchanged:: 3.14
12361248
Annotations are now :ref:`lazily evaluated <lazy-evaluation>`.
12371249
See :pep:`649`.

Doc/whatsnew/3.14.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ deferred evaluation of annotations (:pep:`649`),
7474
and a new type of interpreter that uses tail calls.
7575

7676
The library changes include the addition of a new :mod:`!annotationlib` module
77-
for introspecting and wrapping annotations (:pep:`649`),
77+
for introspecting and wrapping annotations (:pep:`749`),
7878
a new :mod:`!compression.zstd` module for Zstandard support (:pep:`784`),
7979
plus syntax highlighting in the REPL,
8080
as well as the usual deprecations and removals,
@@ -444,6 +444,10 @@ In particular, do not read annotations directly from the namespace dictionary
444444
attribute of type objects. Use :func:`annotationlib.get_annotate_from_class_namespace`
445445
during class construction and :func:`annotationlib.get_annotations` afterwards.
446446

447+
In previous releases, it was sometimes possible to access class annotations from
448+
an instance of an annotated class. This behavior was undocumented and accidental,
449+
and will no longer work in Python 3.14.
450+
447451
``from __future__ import annotations``
448452
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
449453

@@ -2501,6 +2505,11 @@ Changes in the Python API
25012505
See :ref:`above <whatsnew314-typing-union>` for more details.
25022506
(Contributed by Jelle Zijlstra in :gh:`105499`.)
25032507

2508+
* The runtime behavior of annotations has changed in various ways; see
2509+
:ref:`above <whatsnew314-pep649>` for details. While most code that interacts
2510+
with annotations should continue to work, some undocumented details may behave
2511+
differently.
2512+
25042513

25052514
Build changes
25062515
=============

Include/internal/pycore_global_objects_fini_generated.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_global_strings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ struct _Py_global_strings {
385385
STRUCT_FOR_ID(data)
386386
STRUCT_FOR_ID(database)
387387
STRUCT_FOR_ID(day)
388+
STRUCT_FOR_ID(debug)
388389
STRUCT_FOR_ID(decode)
389390
STRUCT_FOR_ID(decoder)
390391
STRUCT_FOR_ID(default)

Include/internal/pycore_runtime_init_generated.h

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_unicodeobject_generated.h

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Lib/test/test_external_inspection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ def _make_test_script(script_dir, script_basename, source):
3434

3535

3636
def get_stack_trace(pid):
37-
unwinder = RemoteUnwinder(pid, all_threads=True)
37+
unwinder = RemoteUnwinder(pid, all_threads=True, debug=True)
3838
return unwinder.get_stack_trace()
3939

4040

4141
def get_async_stack_trace(pid):
42-
unwinder = RemoteUnwinder(pid)
42+
unwinder = RemoteUnwinder(pid, debug=True)
4343
return unwinder.get_async_stack_trace()
4444

4545

4646
def get_all_awaited_by(pid):
47-
unwinder = RemoteUnwinder(pid)
47+
unwinder = RemoteUnwinder(pid, debug=True)
4848
return unwinder.get_all_awaited_by()
4949

5050

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix performance regression in calling a :mod:`ctypes` function pointer in :term:`free threading`.

0 commit comments

Comments
 (0)