GH-109190: Copyedit 3.12 What's New: Use the present tense (#109754)

This commit is contained in:
Adam Turner 2023-09-25 13:18:22 +01:00 committed by GitHub
parent f08772cfd8
commit 4e478534d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,7 +570,7 @@ asyncio
writing to sockets and uses :meth:`~socket.socket.sendmsg` if the platform writing to sockets and uses :meth:`~socket.socket.sendmsg` if the platform
supports it. (Contributed by Kumar Aditya in :gh:`91166`.) supports it. (Contributed by Kumar Aditya in :gh:`91166`.)
* Added :func:`asyncio.eager_task_factory` and :func:`asyncio.create_eager_task_factory` * Add :func:`asyncio.eager_task_factory` and :func:`asyncio.create_eager_task_factory`
functions to allow opting an event loop in to eager task execution, functions to allow opting an event loop in to eager task execution,
making some use-cases 2x to 5x faster. making some use-cases 2x to 5x faster.
(Contributed by Jacob Bower & Itamar Oren in :gh:`102853`, :gh:`104140`, and :gh:`104138`) (Contributed by Jacob Bower & Itamar Oren in :gh:`102853`, :gh:`104140`, and :gh:`104138`)
@ -666,17 +666,17 @@ inspect
itertools itertools
--------- ---------
* Added :class:`itertools.batched()` for collecting into even-sized * Add :class:`itertools.batched()` for collecting into even-sized
tuples where the last batch may be shorter than the rest. tuples where the last batch may be shorter than the rest.
(Contributed by Raymond Hettinger in :gh:`98363`.) (Contributed by Raymond Hettinger in :gh:`98363`.)
math math
---- ----
* Added :func:`math.sumprod` for computing a sum of products. * Add :func:`math.sumprod` for computing a sum of products.
(Contributed by Raymond Hettinger in :gh:`100485`.) (Contributed by Raymond Hettinger in :gh:`100485`.)
* Extended :func:`math.nextafter` to include a *steps* argument * Extend :func:`math.nextafter` to include a *steps* argument
for moving up or down multiple steps at a time. for moving up or down multiple steps at a time.
(By Matthias Goergens, Mark Dickinson, and Raymond Hettinger in :gh:`94906`.) (By Matthias Goergens, Mark Dickinson, and Raymond Hettinger in :gh:`94906`.)
@ -749,10 +749,10 @@ pdb
random random
------ ------
* Added :func:`random.binomialvariate`. * Add :func:`random.binomialvariate`.
(Contributed by Raymond Hettinger in :gh:`81620`.) (Contributed by Raymond Hettinger in :gh:`81620`.)
* Added a default of ``lamb=1.0`` to :func:`random.expovariate`. * Add a default of ``lamb=1.0`` to :func:`random.expovariate`.
(Contributed by Raymond Hettinger in :gh:`100234`.) (Contributed by Raymond Hettinger in :gh:`100234`.)
shutil shutil
@ -811,7 +811,7 @@ sqlite3
statistics statistics
---------- ----------
* Extended :func:`statistics.correlation` to include as a ``ranked`` method * Extend :func:`statistics.correlation` to include as a ``ranked`` method
for computing the Spearman correlation of ranked data. for computing the Spearman correlation of ranked data.
(Contributed by Raymond Hettinger in :gh:`95861`.) (Contributed by Raymond Hettinger in :gh:`95861`.)
@ -949,7 +949,7 @@ unicodedata
unittest unittest
-------- --------
Added ``--durations`` command line option, showing the N slowest test cases:: Add a ``--durations`` command line option, showing the N slowest test cases::
python3 -m unittest --durations=3 lib.tests.test_threading python3 -m unittest --durations=3 lib.tests.test_threading
..... .....
@ -977,11 +977,11 @@ uuid
Optimizations Optimizations
============= =============
* Removed ``wstr`` and ``wstr_length`` members from Unicode objects. * Remove ``wstr`` and ``wstr_length`` members from Unicode objects.
It reduces object size by 8 or 16 bytes on 64bit platform. (:pep:`623`) It reduces object size by 8 or 16 bytes on 64bit platform. (:pep:`623`)
(Contributed by Inada Naoki in :gh:`92536`.) (Contributed by Inada Naoki in :gh:`92536`.)
* Added experimental support for using the BOLT binary optimizer in the build * Add experimental support for using the BOLT binary optimizer in the build
process, which improves performance by 1-5%. process, which improves performance by 1-5%.
(Contributed by Kevin Modzelewski in :gh:`90536` and tuned by Donghee Na in :gh:`101525`) (Contributed by Kevin Modzelewski in :gh:`90536` and tuned by Donghee Na in :gh:`101525`)
@ -1014,7 +1014,7 @@ CPython bytecode changes
* Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!JUMP_IF_TRUE_OR_POP` * Remove the :opcode:`!JUMP_IF_FALSE_OR_POP` and :opcode:`!JUMP_IF_TRUE_OR_POP`
instructions. (Contributed by Irit Katriel in :gh:`102859`.) instructions. (Contributed by Irit Katriel in :gh:`102859`.)
* Removed the :opcode:`!PRECALL` instruction. (Contributed by Mark Shannon in * Remove the :opcode:`!PRECALL` instruction. (Contributed by Mark Shannon in
:gh:`92925`.) :gh:`92925`.)
* Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the * Add the :opcode:`LOAD_FAST_AND_CLEAR` instruction as part of the
@ -1441,9 +1441,9 @@ imp
loader.exec_module(module) loader.exec_module(module)
return module return module
* Removed :mod:`!imp` functions and attributes with no replacements: * Remove :mod:`!imp` functions and attributes with no replacements:
* undocumented functions: * Undocumented functions:
* ``imp.init_builtin()`` * ``imp.init_builtin()``
* ``imp.load_compiled()`` * ``imp.load_compiled()``
@ -1524,7 +1524,7 @@ ssl
unittest unittest
-------- --------
* Removed many old deprecated :mod:`unittest` features: * Remove many long-deprecated :mod:`unittest` features:
* A number of :class:`~unittest.TestCase` method aliases: * A number of :class:`~unittest.TestCase` method aliases:
@ -1567,7 +1567,7 @@ webbrowser
---------- ----------
* Remove support for obsolete browsers from :mod:`webbrowser`. * Remove support for obsolete browsers from :mod:`webbrowser`.
Removed browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone, The removed browsers include: Grail, Mosaic, Netscape, Galeon, Skipstone,
Iceape, Firebird, and Firefox versions 35 and below (:gh:`102871`). Iceape, Firebird, and Firefox versions 35 and below (:gh:`102871`).
xml.etree.ElementTree xml.etree.ElementTree
@ -1590,8 +1590,8 @@ zipimport
Others Others
------ ------
* Removed the ``suspicious`` rule from the documentation :file:`Makefile`, and * Remove the ``suspicious`` rule from the documentation :file:`Makefile` and
removed ``Doc/tools/rstlint.py``, both in favor of `sphinx-lint :file:`Doc/tools/rstlint.py`, both in favor of `sphinx-lint
<https://github.com/sphinx-contrib/sphinx-lint>`_. <https://github.com/sphinx-contrib/sphinx-lint>`_.
(Contributed by Julien Palard in :gh:`98179`.) (Contributed by Julien Palard in :gh:`98179`.)
@ -1621,7 +1621,7 @@ Changes in the Python API
contain ASCII letters and digits and underscore. contain ASCII letters and digits and underscore.
(Contributed by Serhiy Storchaka in :gh:`91760`.) (Contributed by Serhiy Storchaka in :gh:`91760`.)
* Removed ``randrange()`` functionality deprecated since Python 3.10. Formerly, * Remove ``randrange()`` functionality deprecated since Python 3.10. Formerly,
``randrange(10.0)`` losslessly converted to ``randrange(10)``. Now, it raises a ``randrange(10.0)`` losslessly converted to ``randrange(10)``. Now, it raises a
:exc:`TypeError`. Also, the exception raised for non-integer values such as :exc:`TypeError`. Also, the exception raised for non-integer values such as
``randrange(10.5)`` or ``randrange('10')`` has been changed from :exc:`ValueError` to ``randrange(10.5)`` or ``randrange('10')`` has been changed from :exc:`ValueError` to
@ -1635,7 +1635,7 @@ Changes in the Python API
to :term:`filesystem encoding and error handler`. to :term:`filesystem encoding and error handler`.
Argument files should be encoded in UTF-8 instead of ANSI Codepage on Windows. Argument files should be encoded in UTF-8 instead of ANSI Codepage on Windows.
* Removed the ``asyncore``-based ``smtpd`` module deprecated in Python 3.4.7 * Remove the ``asyncore``-based ``smtpd`` module deprecated in Python 3.4.7
and 3.5.4. A recommended replacement is the and 3.5.4. A recommended replacement is the
:mod:`asyncio`-based aiosmtpd_ PyPI module. :mod:`asyncio`-based aiosmtpd_ PyPI module.
@ -1760,7 +1760,7 @@ New Features
------------ ------------
* :pep:`697`: Introduced the :ref:`Unstable C API tier <unstable-c-api>`, * :pep:`697`: Introduce the :ref:`Unstable C API tier <unstable-c-api>`,
intended for low-level tools like debuggers and JIT compilers. intended for low-level tools like debuggers and JIT compilers.
This API may change in each minor release of CPython without deprecation This API may change in each minor release of CPython without deprecation
warnings. warnings.
@ -1782,7 +1782,7 @@ New Features
(Contributed by Petr Viktorin in :gh:`101101`.) (Contributed by Petr Viktorin in :gh:`101101`.)
* :pep:`697`: Added API for extending types whose instance memory layout is * :pep:`697`: Add an API for extending types whose instance memory layout is
opaque: opaque:
- :c:member:`PyType_Spec.basicsize` can be zero or negative to specify - :c:member:`PyType_Spec.basicsize` can be zero or negative to specify
@ -1797,7 +1797,7 @@ New Features
(Contributed by Petr Viktorin in :gh:`103509`.) (Contributed by Petr Viktorin in :gh:`103509`.)
* Added the new :ref:`limited C API <limited-c-api>` function :c:func:`PyType_FromMetaclass`, * Add the new :ref:`limited C API <limited-c-api>` function :c:func:`PyType_FromMetaclass`,
which generalizes the existing :c:func:`PyType_FromModuleAndSpec` using which generalizes the existing :c:func:`PyType_FromModuleAndSpec` using
an additional metaclass argument. an additional metaclass argument.
(Contributed by Wenzel Jakob in :gh:`93012`.) (Contributed by Wenzel Jakob in :gh:`93012`.)
@ -1836,13 +1836,13 @@ New Features
protocol are now available in the :ref:`Limited API <stable>`. (Contributed protocol are now available in the :ref:`Limited API <stable>`. (Contributed
by Wenzel Jakob in :gh:`98586`.) by Wenzel Jakob in :gh:`98586`.)
* Added two new public functions, * Add two new public functions,
:c:func:`PyEval_SetProfileAllThreads` and :c:func:`PyEval_SetProfileAllThreads` and
:c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling :c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling
functions in all running threads in addition to the calling one. (Contributed functions in all running threads in addition to the calling one. (Contributed
by Pablo Galindo in :gh:`93503`.) by Pablo Galindo in :gh:`93503`.)
* Added new function :c:func:`PyFunction_SetVectorcall` to the C API * Add new function :c:func:`PyFunction_SetVectorcall` to the C API
which sets the vectorcall field of a given :c:type:`PyFunctionObject`. which sets the vectorcall field of a given :c:type:`PyFunctionObject`.
(Contributed by Andrew Frost in :gh:`92257`.) (Contributed by Andrew Frost in :gh:`92257`.)
@ -1852,11 +1852,11 @@ New Features
compilers, or debuggers. compilers, or debuggers.
(Contributed by Carl Meyer in :gh:`91052`.) (Contributed by Carl Meyer in :gh:`91052`.)
* Added :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register * Add :c:func:`PyType_AddWatcher` and :c:func:`PyType_Watch` API to register
callbacks to receive notification on changes to a type. callbacks to receive notification on changes to a type.
(Contributed by Carl Meyer in :gh:`91051`.) (Contributed by Carl Meyer in :gh:`91051`.)
* Added :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher` * Add :c:func:`PyCode_AddWatcher` and :c:func:`PyCode_ClearWatcher`
APIs to register callbacks to receive notification on creation and APIs to register callbacks to receive notification on creation and
destruction of code objects. destruction of code objects.
(Contributed by Itamar Oren in :gh:`91054`.) (Contributed by Itamar Oren in :gh:`91054`.)
@ -1886,8 +1886,8 @@ New Features
to replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by to replace the legacy-api :c:func:`!PyErr_Display`. (Contributed by
Irit Katriel in :gh:`102755`). Irit Katriel in :gh:`102755`).
* :pep:`683`: Introduced Immortal Objects to Python which allows objects * :pep:`683`: Introduce *Immortal Objects*, which allows objects
to bypass reference counts and introduced changes to the C-API: to bypass reference counts, and related changes to the C-API:
- ``_Py_IMMORTAL_REFCNT``: The reference count that defines an object - ``_Py_IMMORTAL_REFCNT``: The reference count that defines an object
as immortal. as immortal.
@ -1904,7 +1904,7 @@ New Features
(Contributed by Eddie Elizondo in :gh:`84436`.) (Contributed by Eddie Elizondo in :gh:`84436`.)
* :pep:`684`: Added the new :c:func:`Py_NewInterpreterFromConfig` * :pep:`684`: Add the new :c:func:`Py_NewInterpreterFromConfig`
function and :c:type:`PyInterpreterConfig`, which may be used function and :c:type:`PyInterpreterConfig`, which may be used
to create sub-interpreters with their own GILs. to create sub-interpreters with their own GILs.
(See :ref:`whatsnew312-pep684` for more info.) (See :ref:`whatsnew312-pep684` for more info.)
@ -1953,7 +1953,7 @@ Porting to Python 3.12
copied as-is to the result string, and any extra arguments discarded. copied as-is to the result string, and any extra arguments discarded.
(Contributed by Serhiy Storchaka in :gh:`95781`.) (Contributed by Serhiy Storchaka in :gh:`95781`.)
* Fixed wrong sign placement in :c:func:`PyUnicode_FromFormat` and * Fix wrong sign placement in :c:func:`PyUnicode_FromFormat` and
:c:func:`PyUnicode_FromFormatV`. :c:func:`PyUnicode_FromFormatV`.
(Contributed by Philip Georgi in :gh:`95504`.) (Contributed by Philip Georgi in :gh:`95504`.)