Skip to content

Commit 848a218

Browse files
Merge branch 'main' into gh-134152-fix-unbound-local-error-in-email
2 parents ab4de0d + 3c05251 commit 848a218

42 files changed

Lines changed: 1706 additions & 940 deletions

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,8 @@ Modules/_xxtestfuzz/ @ammaraskar
331331
**/*templateobject* @lysnikolaou
332332
**/*templatelib* @lysnikolaou
333333
**/*tstring* @lysnikolaou
334+
335+
# Remote debugging
336+
Python/remote_debug.h @pablogsal
337+
Python/remote_debugging.c @pablogsal
338+
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/library/copy.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ and only supports named tuples created by :func:`~collections.namedtuple`,
122122
This method should create a new object of the same type,
123123
replacing fields with values from *changes*.
124124

125+
.. versionadded:: 3.13
126+
125127

126128
.. seealso::
127129

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/reference/lexical_analysis.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,9 @@ String literals are described by the following lexical definitions:
489489

490490
.. productionlist:: python-grammar
491491
stringliteral: [`stringprefix`](`shortstring` | `longstring`)
492-
stringprefix: "r" | "u" | "R" | "U" | "f" | "F"
492+
stringprefix: "r" | "u" | "R" | "U" | "f" | "F" | "t" | "T"
493493
: | "fr" | "Fr" | "fR" | "FR" | "rf" | "rF" | "Rf" | "RF"
494+
: | "tr" | "Tr" | "tR" | "TR" | "rt" | "rT" | "Rt" | "RT"
494495
shortstring: "'" `shortstringitem`* "'" | '"' `shortstringitem`* '"'
495496
longstring: "'''" `longstringitem`* "'''" | '"""' `longstringitem`* '"""'
496497
shortstringitem: `shortstringchar` | `stringescapeseq`

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
@@ -383,6 +383,7 @@ struct _Py_global_strings {
383383
STRUCT_FOR_ID(data)
384384
STRUCT_FOR_ID(database)
385385
STRUCT_FOR_ID(day)
386+
STRUCT_FOR_ID(debug)
386387
STRUCT_FOR_ID(decode)
387388
STRUCT_FOR_ID(decoder)
388389
STRUCT_FOR_ID(default)

0 commit comments

Comments
 (0)