Python 3.13.0a5

This commit is contained in:
Thomas Wouters 2024-03-12 18:34:05 +01:00
parent f6e7a6ce65
commit 076d169ebb
117 changed files with 1231 additions and 293 deletions

1163
Misc/NEWS.d/3.13.0a5.rst Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
Makefile targets were added to support compiling an iOS-compatible framework
build.

View file

@ -1,2 +0,0 @@
The install name for libPython is now correctly set for non-framework macOS
builds.

View file

@ -1 +0,0 @@
Link extension modules against libpython on Android.

View file

@ -1 +0,0 @@
Fix building ctypes module with -DWIN32_LEAN_AND_MEAN defined

View file

@ -1 +0,0 @@
A testbed project was added to run the test suite on iOS.

View file

@ -1 +0,0 @@
Fix several Android build issues

View file

@ -1,2 +0,0 @@
Backport ``libb2``'s PR #42 to fix compiling CPython on 32-bit Windows
with ``clang-cl``.

View file

@ -1 +0,0 @@
Change Android's :data:`sys.platform` from ``"linux"`` to ``"android"``.

View file

@ -1 +0,0 @@
Get WASI builds to work under wasmtime 18 w/ WASI 0.2/preview2 primitives.

View file

@ -1,2 +0,0 @@
Add :c:macro:`PyHASH_MODULUS`, :c:macro:`PyHASH_BITS`, :c:macro:`PyHASH_INF`
and :c:macro:`PyHASH_IMAG` C macros. Patch by Sergey B Kirpichev.

View file

@ -1,4 +0,0 @@
Add again ``_PyCFunctionFastWithKeywords`` name, removed in Python 3.13
alpha 4 by mistake. Keep the old private ``_PyCFunctionFastWithKeywords``
name (Python 3.7) as an alias to the new public name
``PyCFunctionFastWithKeywords`` (Python 3.13a4). Patch by Victor Stinner.

View file

@ -1,2 +0,0 @@
Fix incorrect resolution of mangled class variables used in assignment
expressions in comprehensions.

View file

@ -1 +0,0 @@
Expose ``__name__`` attribute on property.

View file

@ -1,8 +0,0 @@
Improve the constructors for :mod:`ast` nodes. Arguments of list types now
default to an empty list if omitted, and optional fields default to ``None``.
AST nodes now have an
``__annotations__`` attribute with the expected types of their attributes.
Passing unrecognized extra arguments to AST nodes is deprecated and will
become an error in Python 3.15. Omitting a required argument to an AST node
is deprecated and will become an error in Python 3.15. Patch by Jelle
Zijlstra.

View file

@ -1,2 +0,0 @@
The multiprocessing resource tracker now exits with non-zero status code if a resource
leak was detected. It still exits with status code 0 otherwise.

View file

@ -1 +0,0 @@
Add ability to force alignment of :mod:`ctypes.Structure` by way of the new ``_align_`` attribute on the class.

View file

@ -1,2 +0,0 @@
Fix a bug that was causing the :func:`tokenize.untokenize` function to
handle unicode named literals incorrectly. Patch by Pablo Galindo

View file

@ -1 +0,0 @@
Every ``PyThreadState`` now has its own ``eval_breaker``, allowing specific threads to be interrupted.

View file

@ -1,2 +0,0 @@
Make error message more meaningful for when :meth:`bytearray.extend` is
called with a :class:`str` object.

View file

@ -1,2 +0,0 @@
Fix bug where docstring was replaced by a redundant NOP when Python is run
with ``-OO``.

View file

@ -1 +0,0 @@
The regen-cases build stage now works on Windows.

View file

@ -1 +0,0 @@
Fix crash when calling ``next()`` on exhausted list iterators.

View file

@ -1 +0,0 @@
Add ``tierN`` annotation for instruction definition in interpreter DSL.

View file

@ -1,3 +0,0 @@
Properly calculate error ranges in the parser when raising
:exc:`SyntaxError` exceptions caused by invalid byte sequences. Patch by
Pablo Galindo

View file

@ -1 +0,0 @@
Fix possible refleak in :meth:`!object.__reduce__` internal error handling.

View file

@ -1 +0,0 @@
Add specialization for ``CONTAINS_OP``.

View file

@ -1 +0,0 @@
:class:`list` is now compatible with the implementation of :pep:`703`.

View file

@ -1,3 +0,0 @@
Respect the status of the garbage collector when indirect calls are made via
:c:func:`PyErr_CheckSignals` and the evaluation breaker. Patch by Pablo
Galindo

View file

@ -1 +0,0 @@
Improve import time of :mod:`uuid` on Linux.

View file

@ -1 +0,0 @@
Document CVE-2023-52425 of Expat <2.6.0 under "XML vulnerabilities".

View file

@ -1,2 +0,0 @@
On macOS show a proxy icon in the title bar of editor windows to match
platform behaviour.

View file

@ -1 +0,0 @@
Add 'default' and 'version' help text for localization in argparse.

View file

@ -1,3 +0,0 @@
The asyncio REPL now runs :data:`sys.__interactivehook__` on startup. The
default implementation of :data:`sys.__interactivehook__` provides
auto-completion to the asyncio REPL. Patch contributed by Rémi Lapeyre.

View file

@ -1,3 +0,0 @@
Failing to pass arguments properly to :func:`functools.singledispatchmethod`
now throws a TypeError instead of hitting an index out of bounds
internally.

View file

@ -1,2 +0,0 @@
linecache: get module name from ``__spec__`` if available. This allows getting
source code for the ``__main__`` module when a custom loader is used.

View file

@ -1,2 +0,0 @@
Fix :meth:`multiprocessing.connection.Listener.accept()` to accept empty bytes
as authkey. Not accepting empty bytes as key causes it to hang indefinitely.

View file

@ -1 +0,0 @@
Add missing call to localization function in :mod:`argparse`.

View file

@ -1 +0,0 @@
Add Z85 encoding to ``base64``.

View file

@ -1 +0,0 @@
Fixed a bug in :class:`logging.handlers.TimedRotatingFileHandler` where multiple rotating handler instances pointing to files with the same name but different extensions would conflict and not delete the correct files.

View file

@ -1,2 +0,0 @@
Fix a traceback in :mod:`argparse` when all options in a mutually exclusive
group are suppressed.

View file

@ -1,4 +0,0 @@
Fix :func:`io.BufferedReader.tell`, :func:`io.BufferedReader.seek`,
:func:`_pyio.BufferedReader.tell`, :func:`io.BufferedRandom.tell`,
:func:`io.BufferedRandom.seek` and :func:`_pyio.BufferedRandom.tell`
being able to return negative offsets.

View file

@ -1,2 +0,0 @@
email: fix misfolding of comma in address-lists over multiple lines in
combination with unicode encoding.

View file

@ -1,2 +0,0 @@
Update HTTPSConnection to consistently wrap IPv6 Addresses when using a
proxy.

View file

@ -1,2 +0,0 @@
:func:`functools.partial`s of :func:`repr` has been improved to include the
:term:`module` name. Patched by Furkan Onder and Anilyka Barry.

View file

@ -1 +0,0 @@
Add ``windows_31j`` to aliases for ``cp932`` codec

View file

@ -1 +0,0 @@
Fix ArgumentParser inconsistent with parse_known_args.

View file

@ -1 +0,0 @@
Add :data:`socket.SO_BINDTOIFINDEX` constant.

View file

@ -1 +0,0 @@
:meth:`Profile.print_stats` has been improved to accept multiple sort arguments. Patched by Chiu-Hsiang Hsu and Furkan Onder.

View file

@ -1,3 +0,0 @@
Add option for *non-shallow* comparisons to :class:`filecmp.dircmp` like
:func:`filecmp.cmp`. Original patch by Steven Ward. Enhanced by
Tobias Rautenkranz

View file

@ -1,3 +0,0 @@
Fix incorrect output of ``help(x)`` where ``x`` is a :keyword:`lambda`
function, which has an ``__annotations__`` dictionary attribute with a
``"return"`` key.

View file

@ -1,4 +0,0 @@
Raise :exc:`configparser.ParsingError` from :meth:`~configparser.ConfigParser.read`
and :meth:`~configparser.ConfigParser.read_file` methods of
:class:`configparser.ConfigParser` if a key without a corresponding value
is continued (that is, followed by an indented line).

View file

@ -1 +0,0 @@
Make .pdbrc and -c work with any valid pdb commands.

View file

@ -1,2 +0,0 @@
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
added missed ``stream`` argument.

View file

@ -1,2 +0,0 @@
Allow creating :ref:`union of types<types-union>` for
:class:`typing.Annotated` with unhashable metadata.

View file

@ -1,2 +0,0 @@
Add :data:`ssl.VERIFY_X509_PARTIAL_CHAIN` and :data:`VERIFY_X509_STRICT`
to the default SSL context created with :func:`ssl.create_default_context`.

View file

@ -1,4 +0,0 @@
Fix bug where :meth:`pathlib.PurePath.with_stem` converted a non-empty path
suffix to a stem when given an empty *stem* argument. It now raises
:exc:`ValueError`, just like :meth:`pathlib.PurePath.with_suffix` does when
called on a path with an empty stem, given a non-empty *suffix* argument.

View file

@ -1,5 +0,0 @@
:func:`posixpath.commonpath()` now raises a :exc:`ValueError` exception when
passed an empty iterable. Previously, :exc:`IndexError` was raised.
:func:`posixpath.commonpath()` now raises a :exc:`TypeError` exception when
passed ``None``. Previously, :exc:`ValueError` was raised.

View file

@ -1,3 +0,0 @@
Protect modules loaded with :class:`importlib.util.LazyLoader` from race
conditions when multiple threads try to access attributes before the loading
is complete.

View file

@ -1,3 +0,0 @@
:meth:`DatagramTransport.sendto` will now send zero-length datagrams if
called with an empty bytes object. The transport flow control also now
accounts for the datagram header when calculating the buffer size.

View file

@ -1,2 +0,0 @@
``urllib.request`` no longer resolves the hostname before checking it
against the system's proxy bypass list on macOS and Windows.

View file

@ -1,5 +0,0 @@
Added DeprecationWarning when accessing the tarfile attribute of TarInfo
objects. The attribute is never used internally and is only attached to
TarInfos when the tarfile is opened in write-mode, not read-mode. The
attribute creates an unnecessary reference cycle which may cause
corruption when not closing the handle after writing a tarfile.

View file

@ -1,2 +0,0 @@
:mod:`pydoc` no longer skips global functions implemented as builtin methods,
such as :class:`~type.MethodDescriptorType` and :class:`~type.WrapperDescriptorType`.

View file

@ -1 +0,0 @@
Isolate :mod:`_lsprof` (apply :pep:`687`).

View file

@ -1,4 +0,0 @@
Support callables with the ``__call__()`` method and types with
``__new__()`` and ``__init__()`` methods set to class methods, static
methods, bound methods, partial functions, and other types of methods and
descriptors in :meth:`inspect.Signature.from_callable`.

View file

@ -1,3 +0,0 @@
Fix :func:`inspect.unwrap` for types with the ``__wrapper__`` data
descriptor. Fix :meth:`inspect.Signature.from_callable` for builtins
:func:`classmethod` and :func:`staticmethod`.

View file

@ -1,2 +0,0 @@
Refactor :class:`dis.ArgResolver` to make it possible to subclass and change
the way jump args are interpreted.

View file

@ -1,3 +0,0 @@
Fix improper decreasing the reference count for ``None`` argument in
:class:`property` methods :meth:`~property.getter`, :meth:`~property.setter`
and :meth:`~property.deleter`.

View file

@ -1,2 +0,0 @@
Fix a bug in :meth:`asyncio.BaseEventLoop.shutdown_default_executor` to
ensure the timeout passed to the coroutine behaves as expected.

View file

@ -1,2 +0,0 @@
Fix an issue where an abandoned :class:`StreamWriter` would not be garbage
collected.

View file

@ -1,2 +0,0 @@
Stop logging potentially sensitive callback arguments in :mod:`asyncio`
unless debug mode is active.

View file

@ -1 +0,0 @@
Fixed :func:`ast.unparse` to handle format_spec with ``"``, ``'`` or ``\\``. Patched by Frank Hoffmann.

View file

@ -1,4 +0,0 @@
Restore support of space delimiter with ``skipinitialspace=True`` in
:mod:`csv`. :func:`csv.writer()` now quotes empty fields if delimiter is a
space and skipinitialspace is true and raises exception if quoting is not
possible.

View file

@ -1,2 +0,0 @@
:func:`csv.writer` now always quotes or escapes ``'\r'`` and ``'\n'``,
regardless of *lineterminator* value.

View file

@ -1,3 +0,0 @@
:mod:`urllib.parse` functions :func:`~urllib.parse.parse_qs` and
:func:`~urllib.parse.parse_qsl` now support bytes arguments containing raw
and percent-encoded non-ASCII data.

View file

@ -1,4 +0,0 @@
Improve algorithm for computing which rolled-over log files to delete in
:class:`logging.TimedRotatingFileHandler`. It is now reliable for handlers
without ``namer`` and with arbitrary deterministic ``namer`` that leaves the
datetime part in the file name unmodified.

View file

@ -1,4 +0,0 @@
On WASI, the :mod:`time` module no longer get process time using ``times()``
or ``CLOCK_PROCESS_CPUTIME_ID``, system API is that is unreliable and is
likely to be removed from WASI. The affected clock functions fall back to
calling ``clock()``.

View file

@ -1 +0,0 @@
Add kernel density estimation to the statistics module.

View file

@ -1,2 +0,0 @@
Fix silent truncation of the name with an embedded null character in
:class:`multiprocessing.shared_memory.SharedMemory`.

View file

@ -1,4 +0,0 @@
Fix issue where :func:`ast.parse` would incorrectly flag conditional context
managers (such as ``with (x() if y else z()): ...``) as invalid syntax if
``feature_version=(3, 8)`` was passed. This reverts changes to the
grammar made as part of gh-94949.

View file

@ -1 +0,0 @@
Fixed :func:`unittest.mock.create_autospec` to pass the call through to the wrapped object to return the real result.

View file

@ -1,2 +0,0 @@
Use the ``XDG_CURRENT_DESKTOP`` environment variable in :mod:`webbrowser` to check desktop.
Prefer it to the deprecated ``GNOME_DESKTOP_SESSION_ID`` for GNOME detection.

View file

@ -1,2 +0,0 @@
[Enum] Improve error message when calling super().__new__() in custom
__new__.

View file

@ -1 +0,0 @@
[Enum] fix by-value calls when second value is falsey; e.g. Cardinal(1, 0)

View file

@ -1 +0,0 @@
Improve the ``less`` prompt in :mod:`pydoc`.

View file

@ -1 +0,0 @@
Add support for nested typing special forms like Final[ClassVar[int]].

View file

@ -1,4 +0,0 @@
Fix UnicodeEncodeError in :meth:`email.Message.as_string` that results when
a message that claims to be in the ascii character set actually has non-ascii
characters. Non-ascii characters are now replaced with the U+FFFD replacement
character, like in the ``replace`` error handler.

View file

@ -1 +0,0 @@
Set ``__main__.__spec__`` to ``None`` when running a script with :mod:`pdb`

View file

@ -1,6 +0,0 @@
Fix the computation of the next rollover time in the
:class:`logging.TimedRotatingFileHandler` handler. :meth:`!computeRollover`
now always returns a timestamp larger than the specified time and works
correctly during the DST change. :meth:`!doRollover` no longer overwrite the
already rolled over file, saving from data loss when run at midnight or
during repeated time at the DST change.

View file

@ -1,4 +0,0 @@
Disable preadv(), readv(), pwritev(), and writev() on WASI.
Under wasmtime for WASI 0.2, these functions don't pass test_posix
(https://github.com/bytecodealliance/wasmtime/issues/7830).

View file

@ -1 +0,0 @@
When ``asyncio.TaskGroup.create_task`` is called on an inactive ``asyncio.TaskGroup``, the given coroutine will be closed (which prevents a ``RuntimeWarning``).

View file

@ -1,2 +0,0 @@
:mod:`typing`: raise :exc:`SyntaxError` instead of :exc:`AttributeError`
on forward references as empty strings.

View file

@ -1,2 +0,0 @@
:mod:`typing`: implement :pep:`705` which adds :data:`typing.ReadOnly`
support to :class:`typing.TypedDict`.

View file

@ -1,3 +0,0 @@
Fix a race in pydoc ``_start_server``, eliminating a window in which
``_start_server`` can return a thread that is "serving" but without a
``docserver`` set.

View file

@ -1,3 +0,0 @@
:func:`platform.java_ver` is deprecated and will be removed in 3.15.
It was largely untested, had a confusing API,
and was only useful for Jython support.

View file

@ -1 +0,0 @@
Fix :func:`repr` for global :class:`~enum.Flag` members.

View file

@ -1,4 +0,0 @@
:meth:`ssl.SSLContext.cert_store_stats` and
:meth:`ssl.SSLContext.get_ca_certs` now correctly lock access to the
certificate store, when the :class:`ssl.SSLContext` is shared across
multiple threads.

View file

@ -1,8 +0,0 @@
Allow controlling Expat >=2.6.0 reparse deferral (CVE-2023-52425) by adding
five new methods:
* :meth:`xml.etree.ElementTree.XMLParser.flush`
* :meth:`xml.etree.ElementTree.XMLPullParser.flush`
* :meth:`xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
* :meth:`xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
* :meth:`xml.sax.expatreader.ExpatParser.flush`

View file

@ -1 +0,0 @@
Fix segfault in ``_testinternalcapi.compiler_codegen`` on bad input.

View file

@ -1,2 +0,0 @@
Fix translation of exception hander targets by
``_testinternalcapi.optimize_cfg``.

Some files were not shown because too many files have changed in this diff Show more