mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
GH-109190: Copyedit 3.12 What's New: Other Language Changes (#109660)
This commit is contained in:
parent
405b06375a
commit
cade5960ae
1 changed files with 8 additions and 8 deletions
|
@ -459,12 +459,12 @@ and others in :gh:`103764`.)
|
||||||
Other Language Changes
|
Other Language Changes
|
||||||
======================
|
======================
|
||||||
|
|
||||||
* Add :ref:`perf_profiling` through the new
|
* Add :ref:`support for the perf profiler <perf_profiling>` through the new
|
||||||
environment variable :envvar:`PYTHONPERFSUPPORT`,
|
environment variable :envvar:`PYTHONPERFSUPPORT`
|
||||||
the new command-line option :option:`-X perf <-X>`,
|
and command-line option :option:`-X perf <-X>`,
|
||||||
as well as the new :func:`sys.activate_stack_trampoline`,
|
as well as the new :func:`sys.activate_stack_trampoline`,
|
||||||
:func:`sys.deactivate_stack_trampoline`,
|
:func:`sys.deactivate_stack_trampoline`,
|
||||||
and :func:`sys.is_stack_trampoline_active` APIs.
|
and :func:`sys.is_stack_trampoline_active` functions.
|
||||||
(Design by Pablo Galindo. Contributed by Pablo Galindo and Christian Heimes
|
(Design by Pablo Galindo. Contributed by Pablo Galindo and Christian Heimes
|
||||||
with contributions from Gregory P. Smith [Google] and Mark Shannon
|
with contributions from Gregory P. Smith [Google] and Mark Shannon
|
||||||
in :gh:`96123`.)
|
in :gh:`96123`.)
|
||||||
|
@ -473,7 +473,7 @@ Other Language Changes
|
||||||
have a new a *filter* argument that allows limiting tar features than may be
|
have a new a *filter* argument that allows limiting tar features than may be
|
||||||
surprising or dangerous, such as creating files outside the destination
|
surprising or dangerous, such as creating files outside the destination
|
||||||
directory.
|
directory.
|
||||||
See :ref:`tarfile-extraction-filter` for details.
|
See :ref:`tarfile extraction filters <tarfile-extraction-filter>` for details.
|
||||||
In Python 3.14, the default will switch to ``'data'``.
|
In Python 3.14, the default will switch to ``'data'``.
|
||||||
(Contributed by Petr Viktorin in :pep:`706`.)
|
(Contributed by Petr Viktorin in :pep:`706`.)
|
||||||
|
|
||||||
|
@ -501,8 +501,8 @@ Other Language Changes
|
||||||
* A backslash-character pair that is not a valid escape sequence now generates
|
* A backslash-character pair that is not a valid escape sequence now generates
|
||||||
a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`.
|
a :exc:`SyntaxWarning`, instead of :exc:`DeprecationWarning`.
|
||||||
For example, ``re.compile("\d+\.\d+")`` now emits a :exc:`SyntaxWarning`
|
For example, ``re.compile("\d+\.\d+")`` now emits a :exc:`SyntaxWarning`
|
||||||
(``"\d"`` is an invalid escape sequence), use raw strings for regular
|
(``"\d"`` is an invalid escape sequence, use raw strings for regular
|
||||||
expression: ``re.compile(r"\d+\.\d+")``.
|
expression: ``re.compile(r"\d+\.\d+")``).
|
||||||
In a future Python version, :exc:`SyntaxError` will eventually be raised,
|
In a future Python version, :exc:`SyntaxError` will eventually be raised,
|
||||||
instead of :exc:`SyntaxWarning`.
|
instead of :exc:`SyntaxWarning`.
|
||||||
(Contributed by Victor Stinner in :gh:`98401`.)
|
(Contributed by Victor Stinner in :gh:`98401`.)
|
||||||
|
@ -531,7 +531,7 @@ Other Language Changes
|
||||||
when summing floats or mixed ints and floats.
|
when summing floats or mixed ints and floats.
|
||||||
(Contributed by Raymond Hettinger in :gh:`100425`.)
|
(Contributed by Raymond Hettinger in :gh:`100425`.)
|
||||||
|
|
||||||
* Exceptions raised in a typeobject's ``__set_name__`` method are no longer
|
* Exceptions raised in a class or type's ``__set_name__`` method are no longer
|
||||||
wrapped by a :exc:`RuntimeError`. Context information is added to the
|
wrapped by a :exc:`RuntimeError`. Context information is added to the
|
||||||
exception as a :pep:`678` note. (Contributed by Irit Katriel in :gh:`77757`.)
|
exception as a :pep:`678` note. (Contributed by Irit Katriel in :gh:`77757`.)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue