This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -338,7 +332,7 @@ designed with threading in mind will run faster on multi-core hardware.
expect some bugs and a substantial single-threaded performance hit.
Free-threaded builds of CPython support optionally running with the GIL
enabled at runtime using the environment variable :envvar:`PYTHON_GIL` or
the command-line option :option:`-X gil`.
the command-line option :option:`-X gil=1`.
To check if the current interpreter supports free-threading, :option:`python -VV <-V>`
and :attr:`sys.version` contain "experimental free-threading build".
Expand Down
Expand Up
@@ -439,14 +433,14 @@ Defined mutation semantics for :py:func:`locals`
Historically, the expected result of mutating the return value of
:func:`locals` has been left to individual Python implementations to define.
Starting from Python 3.13, :pep:`667` standardises
the historical behaviour of CPython for most code execution scopes,
the historical behavior of CPython for most code execution scopes,
but changes :term:`optimized scopes <optimized scope>`
(functions, generators, coroutines, comprehensions, and generator expressions)
to explicitly return independent snapshots of the currently assigned local
variables, including locally referenced nonlocal variables captured in closures.
This change to the semantics of :func:`locals` in optimized scopes also
affects the default behaviour of code execution functions that implicitly
affects the default behavior of code execution functions that implicitly
target :func:`!locals` if no explicit namespace is provided
(such as :func:`exec` and :func:`eval`).
In previous versions, whether or not changes could be accessed by calling
Expand Down
Expand Up
@@ -610,6 +604,9 @@ Other Language Changes
the value of the *optimize* argument.
(Contributed by Irit Katriel in :gh:`108113`).
* Add a :attr:`~property.__name__` attribute on :class:`property` objects.
(Contributed by Eugene Toder in :gh:`101860`.)
* Add :exc:`PythonFinalizationError`, a new exception derived from
:exc:`RuntimeError` and used to signal when operations are blocked
during :term:`finalization <interpreter shutdown>`.
Expand All
@@ -636,9 +633,6 @@ Other Language Changes
the :mod:`bz2`, :mod:`lzma`, :mod:`tarfile`, and :mod:`zipfile` modules.
(Contributed by Serhiy Storchaka in :gh:`115961`.)
* Add a :attr:`~property.__name__` attribute on :class:`property` objects.
(Contributed by Eugene Toder in :gh:`101860`.)
New Modules
===========
Expand Down
Expand Up
@@ -678,7 +672,7 @@ ast
* The constructors of node types in the :mod:`ast` module are now
stricter in the arguments they accept,
with more intuitive behaviour when arguments are omitted.
with more intuitive behavior when arguments are omitted.
If an optional field on an AST node is not included as an argument when
constructing an instance, the field will now be set to ``None``. Similarly,
Expand Down
Expand Up
@@ -889,7 +883,7 @@ email
return ``('', '')`` pairs in more situations where invalid email addresses
are encountered instead of potentially inaccurate values.
The two functions have a new optional *strict* parameter (default ``True``).
To get the old behaviour (accepting malformed input), use ``strict=False``.
To get the old behavior (accepting malformed input), use ``strict=False``.
``getattr(email.utils, 'supports_strict_parsing', False)`` can be used
to check if the *strict* parameter is available.
(Contributed by Thomas Dwyer and Victor Stinner for :gh:`102988` to improve
Expand Down
Expand Up
@@ -2055,7 +2049,7 @@ New Features
(Contributed by Victor Stinner and Petr Viktorin in :gh:`110850`.)
* Add the :c:func:`PyDict_ContainsString` function
with the same behaviour as :c:func:`PyDict_Contains`,
with the same behavior as :c:func:`PyDict_Contains`,
but *key* is specified as a :c:expr:`const char*` UTF-8 encoded bytes string,
rather than a :c:expr:`PyObject*`.
(Contributed by Victor Stinner in :gh:`108314`.)
Expand Down
Expand Up
@@ -2584,7 +2578,7 @@ Changes in the Python API
* Calling :func:`locals` in an :term:`optimized scope` now produces an
independent snapshot on each call, and hence no longer implicitly updates
previously returned references. Obtaining the legacy CPython behaviour now
previously returned references. Obtaining the legacy CPython behavior now
requires explicit calls to update the initially returned dictionary with the
results of subsequent calls to :func:`!locals`. Code execution functions that
implicitly target :func:`!locals` (such as ``exec`` and ``eval``) must be
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GH-109975: Copyedit 3.13 What's New: Trivia #124348
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
GH-109975: Copyedit 3.13 What's New: Trivia #124348
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing