Python 3.12.8

This commit is contained in:
Thomas Wouters 2024-12-03 19:40:02 +01:00
parent 49da170709
commit 2dc476bcb9
110 changed files with 1656 additions and 516 deletions

View file

@ -931,7 +931,7 @@ always available.
This function should be used for specialized purposes only.
It is not guaranteed to exist in all implementations of Python.
.. versionchanged:: next
.. versionchanged:: 3.12.8
The result may include objects from other interpreters.

View file

@ -18,12 +18,12 @@
/*--start constants--*/
#define PY_MAJOR_VERSION 3
#define PY_MINOR_VERSION 12
#define PY_MICRO_VERSION 7
#define PY_MICRO_VERSION 8
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
#define PY_RELEASE_SERIAL 0
/* Version as a string */
#define PY_VERSION "3.12.7+"
#define PY_VERSION "3.12.8"
/*--end constants--*/
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.

File diff suppressed because it is too large Load diff

1101
Misc/NEWS.d/3.12.8.rst Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
Improve detection of float word ordering on Linux when link-time optimizations
are enabled.

View file

@ -1 +0,0 @@
Hard-code float word ordering as little endian on WASM.

View file

@ -1,2 +0,0 @@
Removed debug build assertions related to interning strings, which were
falsely triggered by stable ABI extensions.

View file

@ -1 +0,0 @@
Fixed a bug in ``reprlib.repr`` where it incorrectly called the repr method on shadowed Python built-in types.

View file

@ -1 +0,0 @@
Fix bug where SSLProtocol.connection_lost wasn't getting called when OSError was thrown on writing to socket.

View file

@ -1 +0,0 @@
If :func:`!_thread.start_new_thread` fails to start a new thread, it deletes its state from interpreter and thus avoids its repeated cleanup on finalization.

View file

@ -1,5 +0,0 @@
Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.

View file

@ -1,3 +0,0 @@
Fix a crash in the :meth:`~object.__str__` method of :exc:`UnicodeError`
objects when the :attr:`UnicodeError.start` and :attr:`UnicodeError.end`
values are invalid or out-of-range. Patch by Bénédikt Tran.

View file

@ -1,2 +0,0 @@
Fix :func:`tokenize.untokenize` producing invalid syntax for
double braces preceded by certain escape characters.

View file

@ -1,2 +0,0 @@
Provide better error location when attempting to use a :term:`future
statement <__future__>` with an unknown future feature.

View file

@ -1,3 +0,0 @@
Fix :mod:`importlib` to not write an incomplete .pyc files when a ulimit or some
other operating system mechanism is preventing the write to go through
fully.

View file

@ -1 +0,0 @@
Now :exc:`ValueError` is raised instead of :exc:`SystemError` when trying to iterate over a released :class:`memoryview` object.

View file

@ -1,2 +0,0 @@
Fix possible undefined behavior division by zero in :class:`complex`'s
:c:func:`_Py_c_pow`.

View file

@ -1,2 +0,0 @@
Include the :class:`object` type in the lists of documented types.
Change by Furkan Onder and Martin Panter.

View file

@ -1,2 +0,0 @@
Writers of CPython's documentation can now use ``next`` as the version for
the ``versionchanged``, ``versionadded``, ``deprecated`` directives.

View file

@ -1,4 +0,0 @@
The :mod:`importlib.metadata` documentation now includes semantic
cross-reference targets for the significant documented APIs. This means
intersphinx references like :func:`importlib.metadata.version` will
now work as expected.

View file

@ -1,2 +0,0 @@
Require Sphinx 7.2.6 or later to build the Python documentation.
Patch by Adam Turner.

View file

@ -1,2 +0,0 @@
Increase currently inadequate vertical spacing for the IDLE browsers (path,
module, and stack) on high-resolution monitors.

View file

@ -1,2 +0,0 @@
Fix :mod:`argparse` metavar processing to allow positional arguments to have a
tuple metavar.

View file

@ -1,2 +0,0 @@
Strip :class:`unittest.IsolatedAsyncioTestCase` stack frames from reported
stacktraces.

View file

@ -1 +0,0 @@
Fix a race condition in :class:`multiprocessing.pool.Pool`.

View file

@ -1,2 +0,0 @@
Fixed :class:`multiprocessing.Process` reporting a ``.exitcode`` of 1 even on success when
using the ``"fork"`` start method while using a :class:`concurrent.futures.ThreadPoolExecutor`.

View file

@ -1,2 +0,0 @@
Fix SystemError when match regular expression pattern containing some
combination of possessive quantifier, alternative and capture group.

View file

@ -1 +0,0 @@
Always use :func:`str` to print ``choices`` in :mod:`argparse`.

View file

@ -1 +0,0 @@
Always return an absolute path for :func:`os.path.abspath` on Windows.

View file

@ -1 +0,0 @@
Fixed an issue where :func:`inspect.getclosurevars` would incorrectly classify an attribute name as a global variable when the name exists both as an attribute name and a global variable.

View file

@ -1 +0,0 @@
Update unbounded ``read`` calls in :mod:`zipfile` to specify an explicit ``size`` putting a limit on how much data they may read. This also updates handling around ZIP max comment size to match the standard instead of reading comments that are one byte too long.

View file

@ -1 +0,0 @@
Fix the canvas not clearing after running turtledemo clock.

View file

@ -1,2 +0,0 @@
Fix possible crash (in debug build), incorrect output or returning incorrect
value from raw binary ``write()`` when writing to console on Windows.

View file

@ -1 +0,0 @@
Remove broken :func:`time.thread_time` and :func:`time.thread_time_ns` on NetBSD.

View file

@ -1,4 +0,0 @@
Fixed bug in itertools.tee() handling of other tee inputs (a tee in a tee).
The output now has the promised *n* independent new iterators. Formerly,
the first iterator was identical (not independent) to the input iterator.
This would sometimes give surprising results.

View file

@ -1,2 +0,0 @@
Fix a crash related to an integer overflow in :func:`curses.resizeterm`
and :func:`curses.resize_term`.

View file

@ -1 +0,0 @@
All :mod:`asyncio` REPL prompts run in the same :class:`context <contextvars.Context>`. Contributed by Bartosz Sławecki.

View file

@ -1 +0,0 @@
Properly quote template strings in :mod:`venv` activation scripts.

View file

@ -1 +0,0 @@
Fixed :exc:`AssertionError` when using :func:`!asyncio.staggered.staggered_race` with :attr:`asyncio.eager_task_factory`.

View file

@ -1 +0,0 @@
Fix reference cycles left in tracebacks in :func:`asyncio.open_connection` when used with ``happy_eyeballs_delay``

View file

@ -1,2 +0,0 @@
Fix detection of the minimal Queue API needed by the :mod:`logging` module.
Patch by Bénédikt Tran.

View file

@ -1,2 +0,0 @@
Allow calling :func:`os.path.exists` and :func:`os.path.lexists` with
keyword arguments on Windows. Fixes a regression in 3.12.4.

View file

@ -1,5 +0,0 @@
Fix :func:`time.strptime` for ``%c`` and ``%x`` formats in many locales:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.

View file

@ -1 +0,0 @@
Fix refcycles in exceptions raised from :class:`asyncio.TaskGroup` and the python implementation of :class:`asyncio.Future`

View file

@ -1,4 +0,0 @@
Fix ``locale.nl_langinfo(locale.ALT_DIGITS)`` on platforms with glibc.
Now it returns a string consisting of up to 100 semicolon-separated symbols
(an empty string in most locales) on all Posix platforms.
Previously it only returned the first symbol or an empty string.

View file

@ -1,4 +0,0 @@
Fix an issue where providing a :class:`pathlib.PurePath` object as an
initializer argument to a second :class:`~pathlib.PurePath` object with a
different flavour resulted in arguments to the former object's initializer
being joined by the latter object's flavour.

View file

@ -1 +0,0 @@
Don't copy arbitrary values to :c:expr:`_Bool` in the :mod:`struct` module.

View file

@ -1,8 +0,0 @@
Fix encoding issues in :func:`time.strftime`, the
:meth:`~datetime.datetime.strftime` method of the :mod:`datetime` classes
:class:`~datetime.datetime`, :class:`~datetime.date` and
:class:`~datetime.time` and formatting of these classes. Characters not
encodable in the current locale are now acceptable in the format string.
Surrogate pairs and sequence of surrogatescape-encoded bytes are no longer
recombinated. Embedded null character no longer terminates the format
string.

View file

@ -1,4 +0,0 @@
Fix inheritance of nested mutually exclusive groups from parent parser in
:class:`argparse.ArgumentParser`. Previously, all nested mutually exclusive
groups lost their connection to the group containing them and were displayed
as belonging directly to the parser.

View file

@ -1 +0,0 @@
Fix a bug where ArgumentError includes the incorrect ambiguous option in :mod:`argparse`.

View file

@ -1,2 +0,0 @@
Fix :func:`time.strptime` for ``%c``, ``%x`` and ``%X`` formats in many
locales that use non-ASCII digits, like Persian, Burmese, Odia and Shan.

View file

@ -1 +0,0 @@
Fixed the bug where :mod:`pdb` will be stuck in an infinite loop when debugging an empty file.

View file

@ -1 +0,0 @@
Fixed the bug where :mod:`pdb` and :mod:`bdb` can step into the bottom caller frame.

View file

@ -1,2 +0,0 @@
Fix deadlock when :class:`concurrent.futures.ProcessPoolExecutor` shuts down
concurrently with an error when feeding a job to a worker process.

View file

@ -1,2 +0,0 @@
Improve traceback if :func:`importlib.reload` is called with an object that
is not a module. Patch by Alex Waygood.

View file

@ -1 +0,0 @@
Fix the notes removal logic for errors thrown in enum initialization.

View file

@ -1 +0,0 @@
Reject invalid unicode escapes for Python implementation of :func:`json.loads`.

View file

@ -1,2 +0,0 @@
Reject non-ASCII digits in the Python implementation of :func:`json.loads`
conforming to the JSON specification.

View file

@ -1,7 +0,0 @@
Fix several bugs in :meth:`argparse.ArgumentParser.parse_intermixed_args`.
* The parser no longer changes temporarily during parsing.
* Default values are not processed twice.
* Required mutually exclusive groups containing positional arguments are now supported.
* The missing arguments report now includes the names of all required optional and positional arguments.
* Unknown options can be intermixed with positional arguments in parse_known_intermixed_args().

View file

@ -1 +0,0 @@
Fixed the bug for :mod:`pdb` where it can't set breakpoints on functions with certain annotations.

View file

@ -1,4 +0,0 @@
Fix an issue in :meth:`email.policy.EmailPolicy.header_source_parse` and
:meth:`email.policy.Compat32.header_source_parse` that introduced spurious
leading whitespaces into header values when the header includes a newline
character after the header name delimiter (``:``) and before the value.

View file

@ -1 +0,0 @@
Fix possible crash when mutating list of callbacks returned by :attr:`!asyncio.Future._callbacks`. It now always returns a new copy in C implementation :mod:`!_asyncio`. Patch by Kumar Aditya.

View file

@ -1,2 +0,0 @@
Fix a use-after-free crash in :meth:`asyncio.Future.remove_done_callback`.
Patch by Bénédikt Tran.

View file

@ -1,2 +0,0 @@
Fix an out-of-bounds crash when an evil :meth:`asyncio.loop.call_soon`
mutates the length of the internal callbacks list. Patch by Bénédikt Tran.

View file

@ -1,3 +0,0 @@
Fix use-after-free crashes on :class:`asyncio.Future` objects for which the
underlying event loop implements an evil :meth:`~object.__getattribute__`.
Reported by Nico-Posada. Patch by Bénédikt Tran.

View file

@ -1 +0,0 @@
Fixed a reference leak in :class:`asyncio.Task` objects when reinitializing the same object with a non-``None`` context. Patch by Nico Posada.

View file

@ -1,3 +0,0 @@
Fix a use-after-free crash on :class:`asyncio.Task` objects for which the
underlying event loop implements an evil :meth:`~object.__getattribute__`.
Reported by Nico-Posada. Patch by Bénédikt Tran.

View file

@ -1 +0,0 @@
Fixes a possible ``NULL`` pointer dereference in :mod:`ssl`.

View file

@ -1 +0,0 @@
Fix a crash in :mod:`ast` when the :attr:`ast.AST._fields` attribute is deleted.

View file

@ -1,2 +0,0 @@
Fix issue where :func:`urllib.request.pathname2url` generated URLs beginning
with four slashes (rather than two) when given a Windows UNC path.

View file

@ -1,3 +0,0 @@
Fix issue where :func:`urllib.request.pathname2url` and
:func:`~urllib.request.url2pathname` removed slashes from Windows DOS drive
paths and URLs.

View file

@ -1,2 +0,0 @@
Fix crash in :class:`!cProfile.Profile` and :class:`!_lsprof.Profiler` when their
callbacks were directly called with 0 arguments.

View file

@ -1,3 +0,0 @@
Fix a use-after-free crash on :class:`asyncio.Task` objects
whose underlying coroutine yields an object that implements
an evil :meth:`~object.__getattribute__`. Patch by Nico Posada.

View file

@ -1 +0,0 @@
Fix pickling and copying of :class:`os.sched_param` objects.

View file

@ -1,3 +0,0 @@
The Python implementation of :mod:`pickle` no longer calls
:meth:`pickle.Pickler.persistent_id` for the result of
:meth:`!persistent_id`.

View file

@ -1,2 +0,0 @@
Raise :class:`calendar.IllegalMonthError` (now a subclass of :class:`IndexError`) for :func:`calendar.month`
when the input month is not correct.

View file

@ -1,2 +0,0 @@
The :class:`multiprocessing.Lock` and :class:`multiprocessing.RLock`
``repr`` values no longer say "unknown" on macOS.

View file

@ -1,17 +0,0 @@
Fixed the :mod:`multiprocessing` ``"forkserver"`` start method forkserver
process to correctly inherit the parent's :data:`sys.path` during the importing
of :func:`multiprocessing.set_forkserver_preload` modules in the same manner as
:data:`sys.path` is configured in workers before executing work items.
This bug caused some forkserver module preloading to silently fail to preload.
This manifested as a performance degration in child processes when the
``sys.path`` was required due to additional repeated work in every worker.
It could also have a side effect of ``""`` remaining in :data:`sys.path` during
forkserver preload imports instead of the absolute path from :func:`os.getcwd`
at multiprocessing import time used in the worker ``sys.path``.
The ``sys.path`` differences between phases in the child process could
potentially have caused preload to import incorrect things from the wrong
location. We are unaware of that actually having happened in practice.

View file

@ -1,4 +0,0 @@
Fix bugs in compiling case-insensitive :mod:`regular expressions <re>` with
character classes containing non-BMP characters: upper-case non-BMP
character did was ignored and the ASCII flag was ignored when
matching a character range whose upper bound is beyond the BMP region.

View file

@ -1 +0,0 @@
Improve performances of :meth:`zipfile.Path.open` for non-reading modes.

View file

@ -1,2 +0,0 @@
Fix issue where :func:`urllib.request.pathname2url` mishandled Windows paths
with embedded forward slashes.

View file

@ -1,2 +0,0 @@
Fix a crash when instantiating :class:`itertools.count` with an initial
count of :data:`sys.maxsize` on debug builds. Patch by Bénédikt Tran.

View file

@ -1,3 +0,0 @@
Limit starting a patcher (from :func:`unittest.mock.patch` or
:func:`unittest.mock.patch.object`) more than
once without stopping it

View file

@ -1 +0,0 @@
Allow :class:`collections.abc.AsyncIterator` to be a base for Protocols.

View file

@ -1,3 +0,0 @@
``locale.nl_langinfo(locale.ERA)`` now returns multiple era description
segments separated by semicolons. Previously it only returned the first
segment on platforms with Glibc.

View file

@ -1,2 +0,0 @@
Fix issue where :func:`urllib.request.url2pathname` failed to discard two
leading slashes introducing an empty authority section.

View file

@ -1 +0,0 @@
Update bundled pip to 24.3.1

View file

@ -1,4 +0,0 @@
Fixed the values of :py:func:`sysconfig.get_config_vars`,
:py:func:`sysconfig.get_paths`, and their siblings when the :py:mod:`site`
initialization happens after :py:mod:`sysconfig` has built a cache for
:py:func:`sysconfig.get_config_vars`.

View file

@ -1,2 +0,0 @@
Fix memory leaks when :mod:`regular expression <re>` matching terminates
abruptly, either because of a signal or because memory allocation fails.

View file

@ -1,4 +0,0 @@
Fix issue where :func:`urllib.request.url2pathname` and
:func:`~urllib.request.pathname2url` always used UTF-8 when quoting and
unquoting file URIs. They now use the :term:`filesystem encoding and error
handler`.

View file

@ -1,2 +0,0 @@
Fix the representation of :class:`itertools.count` objects when the count
value is :data:`sys.maxsize`.

View file

@ -1,3 +0,0 @@
Fix support of STRING and GLOBAL opcodes with non-ASCII arguments in
:mod:`pickletools`. :func:`pickletools.dis` now outputs non-ASCII bytes in
STRING, BINSTRING and SHORT_BINSTRING arguments as escaped (``\xXX``).

View file

@ -1,2 +0,0 @@
Fix issue where :func:`urllib.request.url2pathname` failed to discard any
'localhost' authority present in the URL.

View file

@ -1,2 +0,0 @@
Fix issue where :func:`urllib.request.url2pathname` failed to discard an
extra slash before a UNC drive in the URL path on Windows.

View file

@ -1,4 +0,0 @@
Fix :mod:`shutil.which` on Windows. Now it looks at direct match if and only
if the command ends with a PATHEXT extension or X_OK is not in mode. Support
extensionless files if "." is in PATHEXT. Support PATHEXT extensions that end
with a dot.

View file

@ -1,2 +0,0 @@
Fix :func:`urllib.request.pathname2url` for paths starting with multiple
slashes on Posix.

View file

@ -1,2 +0,0 @@
Fix :meth:`!io.StringIO.__setstate__` crash, when :const:`None` was passed as
the first value.

View file

@ -1,2 +0,0 @@
Fix faulthandler for trampoline frames. If the top-most frame is a
trampoline frame, skip it. Patch by Victor Stinner.

View file

@ -1 +0,0 @@
Publicly expose :data:`~token.EXACT_TOKEN_TYPES` in :attr:`!token.__all__`.

View file

@ -1 +0,0 @@
Upgrade libexpat to 2.6.4

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