Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 26 additions & 23 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Other Language Changes
``python -O -c 'assert (__debug__ := 1)'`` now produces a
:exc:`SyntaxError`. (Contributed by Irit Katriel in :gh:`122245`.)

* Added class methods :meth:`float.from_number` and :meth:`complex.from_number`
* Add class methods :meth:`float.from_number` and :meth:`complex.from_number`
to convert a number to :class:`float` or :class:`complex` type correspondingly.
They raise an error if the argument is a string.
(Contributed by Serhiy Storchaka in :gh:`84978`.)
Expand All @@ -206,7 +206,7 @@ Improved Modules
ast
---

* Added :func:`ast.compare` for comparing two ASTs.
* Add :func:`ast.compare` for comparing two ASTs.
(Contributed by Batuhan Taskaya and Jeremy Hylton in :issue:`15987`.)

* Add support for :func:`copy.replace` for AST nodes.
Expand All @@ -215,6 +215,9 @@ ast
* Docstrings are now removed from an optimized AST in optimization level 2.
(Contributed by Irit Katriel in :gh:`123958`.)

* The ``repr()`` output for AST nodes now includes more information.
(Contributed by Tomas R in :gh:`116022`.)


ctypes
------
Expand All @@ -233,9 +236,9 @@ ctypes
dis
---

* Added support for rendering full source location information of
* Add support for rendering full source location information of
:class:`instructions <dis.Instruction>`, rather than only the line number.
This feature is added to the following interfaces via the ``show_positions``
This feature is added to the following interfaces via the *show_positions*
keyword argument:

- :class:`dis.Bytecode`,
Expand All @@ -250,15 +253,15 @@ dis
fractions
---------

Added support for converting any objects that have the
:meth:`!as_integer_ratio` method to a :class:`~fractions.Fraction`.
(Contributed by Serhiy Storchaka in :gh:`82017`.)
* Add support for converting any objects that have the
:meth:`!as_integer_ratio` method to a :class:`~fractions.Fraction`.
(Contributed by Serhiy Storchaka in :gh:`82017`.)


functools
---------

* Added support to :func:`functools.partial` and
* Add support to :func:`functools.partial` and
:func:`functools.partialmethod` for :data:`functools.Placeholder` sentinels
to reserve a place for positional arguments.
(Contributed by Dominykas Grigonis in :gh:`119127`.)
Expand All @@ -267,27 +270,27 @@ functools
http
----

Directory lists and error pages generated by the :mod:`http.server`
module allow the browser to apply its default dark mode.
(Contributed by Yorik Hansen in :gh:`123430`.)
* Directory lists and error pages generated by the :mod:`http.server`
module allow the browser to apply its default dark mode.
(Contributed by Yorik Hansen in :gh:`123430`.)


json
----

Add notes for JSON serialization errors that allow to identify the source
of the error.
(Contributed by Serhiy Storchaka in :gh:`122163`.)
* Add notes for JSON serialization errors that allow to identify the source
of the error.
(Contributed by Serhiy Storchaka in :gh:`122163`.)

Enable :mod:`json` module to work as a script using the :option:`-m` switch: ``python -m json``.
See the :ref:`JSON command-line interface <json-commandline>` documentation.
(Contributed by Trey Hunner in :gh:`122873`.)
* Enable the :mod:`json` module to work as a script using the :option:`-m` switch: ``python -m json``.
See the :ref:`JSON command-line interface <json-commandline>` documentation.
(Contributed by Trey Hunner in :gh:`122873`.)


operator
--------

* Two new functions ``operator.is_none`` and ``operator.is_not_none``
* Two new functions :func:`operator.is_none` and :func:`operator.is_not_none`
have been added, such that ``operator.is_none(obj)`` is equivalent
to ``obj is None`` and ``operator.is_not_none(obj)`` is equivalent
to ``obj is not None``.
Expand All @@ -297,13 +300,13 @@ operator
datetime
--------

Add :meth:`datetime.time.strptime` and :meth:`datetime.date.strptime`.
(Contributed by Wannes Boeykens in :gh:`41431`.)
* Add :meth:`datetime.time.strptime` and :meth:`datetime.date.strptime`.
(Contributed by Wannes Boeykens in :gh:`41431`.)

os
--

* Added the :data:`os.environ.refresh() <os.environ>` method to update
* Add the :data:`os.environ.refresh() <os.environ>` method to update
:data:`os.environ` with changes to the environment made by :func:`os.putenv`,
by :func:`os.unsetenv`, or made outside Python in the same process.
(Contributed by Victor Stinner in :gh:`120057`.)
Expand Down Expand Up @@ -333,7 +336,7 @@ pdb
:pdbcmd:`commands` are preserved across hard-coded breakpoints.
(Contributed by Tian Gao in :gh:`121450`.)

* Added a new argument ``mode`` to :class:`pdb.Pdb`. Disabled ``restart``
* Add a new argument *mode* to :class:`pdb.Pdb`. Disable the ``restart``
command when :mod:`pdb` is in ``inline`` mode.
(Contributed by Tian Gao in :gh:`123757`.)

Expand Down Expand Up @@ -437,7 +440,7 @@ ast
user-defined ``visit_Num``, ``visit_Str``, ``visit_Bytes``,
``visit_NameConstant`` and ``visit_Ellipsis`` methods on custom
:class:`ast.NodeVisitor` subclasses will no longer be called when the
``NodeVisitor`` subclass is visiting an AST. Define a ``visit_Constant``
:class:`!NodeVisitor` subclass is visiting an AST. Define a ``visit_Constant``
method instead.

Also, remove the following deprecated properties on :class:`ast.Constant`,
Expand Down
Loading