mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-133879: Copyedit "What's new in Python 3.15" (#141717)
This commit is contained in:
parent
b420f6be53
commit
f46785f8bc
2 changed files with 19 additions and 19 deletions
|
|
@ -76,7 +76,7 @@ although there is currently no date scheduled for their removal.
|
||||||
* :mod:`mailbox`: Use of StringIO input and text mode is deprecated, use
|
* :mod:`mailbox`: Use of StringIO input and text mode is deprecated, use
|
||||||
BytesIO and binary mode instead.
|
BytesIO and binary mode instead.
|
||||||
|
|
||||||
* :mod:`os`: Calling :func:`os.register_at_fork` in multi-threaded process.
|
* :mod:`os`: Calling :func:`os.register_at_fork` in a multi-threaded process.
|
||||||
|
|
||||||
* :class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is
|
* :class:`!pydoc.ErrorDuringImport`: A tuple value for *exc_info* parameter is
|
||||||
deprecated, use an exception instance.
|
deprecated, use an exception instance.
|
||||||
|
|
|
||||||
|
|
@ -316,9 +316,7 @@ Other language changes
|
||||||
and compression. Common code patterns which can be optimized with
|
and compression. Common code patterns which can be optimized with
|
||||||
:func:`~bytearray.take_bytes` are listed below.
|
:func:`~bytearray.take_bytes` are listed below.
|
||||||
|
|
||||||
(Contributed by Cody Maloney in :gh:`139871`.)
|
.. list-table:: Suggested optimizing refactors
|
||||||
|
|
||||||
.. list-table:: Suggested Optimizing Refactors
|
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
|
|
||||||
* - Description
|
* - Description
|
||||||
|
|
@ -387,10 +385,12 @@ Other language changes
|
||||||
buffer.resize(n)
|
buffer.resize(n)
|
||||||
data = buffer.take_bytes()
|
data = buffer.take_bytes()
|
||||||
|
|
||||||
|
(Contributed by Cody Maloney in :gh:`139871`.)
|
||||||
|
|
||||||
* Many functions related to compiling or parsing Python code, such as
|
* Many functions related to compiling or parsing Python code, such as
|
||||||
:func:`compile`, :func:`ast.parse`, :func:`symtable.symtable`,
|
:func:`compile`, :func:`ast.parse`, :func:`symtable.symtable`,
|
||||||
and :func:`importlib.abc.InspectLoader.source_to_code`, now allow to pass
|
and :func:`importlib.abc.InspectLoader.source_to_code`, now allow the module
|
||||||
the module name. It is needed to unambiguous :ref:`filter <warning-filter>`
|
name to be passed. It is needed to unambiguously :ref:`filter <warning-filter>`
|
||||||
syntax warnings by module name.
|
syntax warnings by module name.
|
||||||
(Contributed by Serhiy Storchaka in :gh:`135801`.)
|
(Contributed by Serhiy Storchaka in :gh:`135801`.)
|
||||||
|
|
||||||
|
|
@ -776,6 +776,17 @@ unittest
|
||||||
(Contributed by Garry Cairns in :gh:`134567`.)
|
(Contributed by Garry Cairns in :gh:`134567`.)
|
||||||
|
|
||||||
|
|
||||||
|
venv
|
||||||
|
----
|
||||||
|
|
||||||
|
* On POSIX platforms, platlib directories will be created if needed when
|
||||||
|
creating virtual environments, instead of using ``lib64 -> lib`` symlink.
|
||||||
|
This means purelib and platlib of virtual environments no longer share the
|
||||||
|
same ``lib`` directory on platforms where :data:`sys.platlibdir` is not
|
||||||
|
equal to ``lib``.
|
||||||
|
(Contributed by Rui Xi in :gh:`133951`.)
|
||||||
|
|
||||||
|
|
||||||
warnings
|
warnings
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|
@ -788,17 +799,6 @@ warnings
|
||||||
(Contributed by Serhiy Storchaka in :gh:`135801`.)
|
(Contributed by Serhiy Storchaka in :gh:`135801`.)
|
||||||
|
|
||||||
|
|
||||||
venv
|
|
||||||
----
|
|
||||||
|
|
||||||
* On POSIX platforms, platlib directories will be created if needed when
|
|
||||||
creating virtual environments, instead of using ``lib64 -> lib`` symlink.
|
|
||||||
This means purelib and platlib of virtual environments no longer share the
|
|
||||||
same ``lib`` directory on platforms where :data:`sys.platlibdir` is not
|
|
||||||
equal to ``lib``.
|
|
||||||
(Contributed by Rui Xi in :gh:`133951`.)
|
|
||||||
|
|
||||||
|
|
||||||
xml.parsers.expat
|
xml.parsers.expat
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
@ -1242,7 +1242,7 @@ Porting to Python 3.15
|
||||||
This section lists previously described changes and other bugfixes
|
This section lists previously described changes and other bugfixes
|
||||||
that may require changes to your code.
|
that may require changes to your code.
|
||||||
|
|
||||||
* :class:`sqlite3.Connection` APIs has been cleaned up.
|
* :class:`sqlite3.Connection` APIs have been cleaned up.
|
||||||
|
|
||||||
* All parameters of :func:`sqlite3.connect` except *database* are now keyword-only.
|
* All parameters of :func:`sqlite3.connect` except *database* are now keyword-only.
|
||||||
* The first three parameters of methods :meth:`~sqlite3.Connection.create_function`
|
* The first three parameters of methods :meth:`~sqlite3.Connection.create_function`
|
||||||
|
|
@ -1262,7 +1262,7 @@ that may require changes to your code.
|
||||||
* :meth:`~mmap.mmap.resize` has been removed on platforms that don't support the
|
* :meth:`~mmap.mmap.resize` has been removed on platforms that don't support the
|
||||||
underlying syscall, instead of raising a :exc:`SystemError`.
|
underlying syscall, instead of raising a :exc:`SystemError`.
|
||||||
|
|
||||||
* Resource warning is now emitted for unclosed
|
* A resource warning is now emitted for an unclosed
|
||||||
:func:`xml.etree.ElementTree.iterparse` iterator if it opened a file.
|
:func:`xml.etree.ElementTree.iterparse` iterator if it opened a file.
|
||||||
Use its :meth:`!close` method or the :func:`contextlib.closing` context
|
Use its :meth:`!close` method or the :func:`contextlib.closing` context
|
||||||
manager to close it.
|
manager to close it.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue