gh-133879: Clean up What's New for 3.15 (#140435)

Clean up What's New for 3.15

A bit early but I was reading through it and noticed some issues:

- A few improvements were listed in the removals section
- The "Porting to 3.15" section in the C API chapter had some
  changes that aren't about the C API
- Some other typos and wording fixes
This commit is contained in:
Jelle Zijlstra 2025-11-03 06:54:23 -08:00 committed by GitHub
parent 7a9437d986
commit d590685297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 46 additions and 46 deletions

View file

@ -63,9 +63,9 @@ Pending removal in Python 3.16
* :mod:`logging`:
Support for custom logging handlers with the *strm* argument is deprecated
and scheduled for removal in Python 3.16. Define handlers with the *stream*
argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)
* Support for custom logging handlers with the *strm* argument is deprecated
and scheduled for removal in Python 3.16. Define handlers with the *stream*
argument instead. (Contributed by Mariusz Felisiak in :gh:`115032`.)
* :mod:`mimetypes`:

View file

@ -440,6 +440,14 @@ math
(Contributed by Bénédikt Tran in :gh:`135853`.)
mimetypes
---------
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
* Rename ``application/x-texinfo`` to ``application/texinfo``.
(Contributed by Charlie Lin in :gh:`140165`)
mmap
----
@ -612,6 +620,17 @@ types
as described in :pep:`667`.
unicodedata
-----------
* The Unicode database has been updated to Unicode 17.0.0.
* Add :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`
functions to check whether a character can start or continue a
`Unicode Standard Annex #31 <https://www.unicode.org/reports/tr31/>`_ identifier.
(Contributed by Stan Ulbrych in :gh:`129117`.)
unittest
--------
@ -720,14 +739,6 @@ importlib.resources
(Contributed by Semyon Moroz in :gh:`138044`)
mimetypes
---------
* Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
* Rename ``application/x-texinfo`` to ``application/texinfo``.
(Contributed by Charlie Lin in :gh:`140165`)
pathlib
-------
@ -777,7 +788,7 @@ typing
(Contributed by Bénédikt Tran in :gh:`133817`.)
* Using ``TD = TypedDict("TD")`` or ``TD = TypedDict("TD", None)`` to
construct a :class:`~typing.TypedDict` type with zero field is no
construct a :class:`~typing.TypedDict` type with zero fields is no
longer supported. Use ``class TD(TypedDict): pass``
or ``TD = TypedDict("TD", {})`` instead.
(Contributed by Bénédikt Tran in :gh:`133823`.)
@ -810,17 +821,6 @@ typing
(Contributed by Nikita Sobolev in :gh:`133601`.)
unicodedata
-----------
* The Unicode database has been updated to Unicode 17.0.0.
* Add :func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`
functions to check whether a character can start or continue a
`Unicode Standard Annex #31 <https://www.unicode.org/reports/tr31/>`_ identifier.
(Contributed by Stan Ulbrych in :gh:`129117`.)
wave
----
@ -847,7 +847,7 @@ New deprecations
* CLI:
* Deprecate :option:`-b` and :option:`!-bb` command-line options
and schedule them to become no-op in Python 3.17.
and schedule them to become no-ops in Python 3.17.
These were primarily helpers for the Python 2 -> 3 transition.
Starting with Python 3.17, no :exc:`BytesWarning` will be raised
for these cases; use a type checker instead.
@ -858,8 +858,8 @@ New deprecations
* In hash function constructors such as :func:`~hashlib.new` or the
direct hash-named constructors such as :func:`~hashlib.md5` and
:func:`~hashlib.sha256`, their optional initial data parameter could
also be passed a keyword argument named ``data=`` or ``string=`` in
:func:`~hashlib.sha256`, the optional initial data parameter could
also be passed as a keyword argument named ``data=`` or ``string=`` in
various :mod:`hashlib` implementations.
Support for the ``string`` keyword argument name is now deprecated and
@ -962,31 +962,11 @@ Changed C APIs
Porting to Python 3.15
----------------------
* :class:`sqlite3.Connection` APIs has been cleaned up.
* All parameters of :func:`sqlite3.connect` except *database* are now keyword-only.
* The first three parameters of methods :meth:`~sqlite3.Connection.create_function`
and :meth:`~sqlite3.Connection.create_aggregate` are now positional-only.
* The first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`,
:meth:`~sqlite3.Connection.set_progress_handler` and
:meth:`~sqlite3.Connection.set_trace_callback` is now positional-only.
(Contributed by Serhiy Storchaka in :gh:`133595`.)
* Private functions promoted to public C APIs:
The |pythoncapi_compat_project| can be used to get most of these new
functions on Python 3.14 and older.
* :data:`resource.RLIM_INFINITY` is now always positive.
Passing a negative integer value that corresponded to its old value
(such as ``-1`` or ``-3``, depending on platform) to
:func:`resource.setrlimit` and :func:`resource.prlimit` is now deprecated.
(Contributed by Serhiy Storchaka in :gh:`137044`.)
* :meth:`~mmap.mmap.resize` has been removed on platforms that don't support the
underlying syscall, instead of raising a :exc:`SystemError`.
Removed C APIs
--------------
@ -1106,3 +1086,23 @@ Porting to Python 3.15
This section lists previously described changes and other bugfixes
that may require changes to your code.
* :class:`sqlite3.Connection` APIs has been cleaned up.
* All parameters of :func:`sqlite3.connect` except *database* are now keyword-only.
* The first three parameters of methods :meth:`~sqlite3.Connection.create_function`
and :meth:`~sqlite3.Connection.create_aggregate` are now positional-only.
* The first parameter of methods :meth:`~sqlite3.Connection.set_authorizer`,
:meth:`~sqlite3.Connection.set_progress_handler` and
:meth:`~sqlite3.Connection.set_trace_callback` is now positional-only.
(Contributed by Serhiy Storchaka in :gh:`133595`.)
* :data:`resource.RLIM_INFINITY` is now always positive.
Passing a negative integer value that corresponded to its old value
(such as ``-1`` or ``-3``, depending on platform) to
:func:`resource.setrlimit` and :func:`resource.prlimit` is now deprecated.
(Contributed by Serhiy Storchaka in :gh:`137044`.)
* :meth:`~mmap.mmap.resize` has been removed on platforms that don't support the
underlying syscall, instead of raising a :exc:`SystemError`.