mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
Python 3.12.8
This commit is contained in:
parent
49da170709
commit
2dc476bcb9
110 changed files with 1656 additions and 516 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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
1101
Misc/NEWS.d/3.12.8.rst
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,2 +0,0 @@
|
|||
Improve detection of float word ordering on Linux when link-time optimizations
|
||||
are enabled.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Hard-code float word ordering as little endian on WASM.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Removed debug build assertions related to interning strings, which were
|
||||
falsely triggered by stable ABI extensions.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed a bug in ``reprlib.repr`` where it incorrectly called the repr method on shadowed Python built-in types.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix bug where SSLProtocol.connection_lost wasn't getting called when OSError was thrown on writing to socket.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix :func:`tokenize.untokenize` producing invalid syntax for
|
||||
double braces preceded by certain escape characters.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Provide better error location when attempting to use a :term:`future
|
||||
statement <__future__>` with an unknown future feature.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Now :exc:`ValueError` is raised instead of :exc:`SystemError` when trying to iterate over a released :class:`memoryview` object.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix possible undefined behavior division by zero in :class:`complex`'s
|
||||
:c:func:`_Py_c_pow`.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Include the :class:`object` type in the lists of documented types.
|
||||
Change by Furkan Onder and Martin Panter.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Writers of CPython's documentation can now use ``next`` as the version for
|
||||
the ``versionchanged``, ``versionadded``, ``deprecated`` directives.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Require Sphinx 7.2.6 or later to build the Python documentation.
|
||||
Patch by Adam Turner.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Increase currently inadequate vertical spacing for the IDLE browsers (path,
|
||||
module, and stack) on high-resolution monitors.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix :mod:`argparse` metavar processing to allow positional arguments to have a
|
||||
tuple metavar.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Strip :class:`unittest.IsolatedAsyncioTestCase` stack frames from reported
|
||||
stacktraces.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix a race condition in :class:`multiprocessing.pool.Pool`.
|
||||
|
|
@ -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`.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix SystemError when match regular expression pattern containing some
|
||||
combination of possessive quantifier, alternative and capture group.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Always use :func:`str` to print ``choices`` in :mod:`argparse`.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Always return an absolute path for :func:`os.path.abspath` on Windows.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix the canvas not clearing after running turtledemo clock.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Remove broken :func:`time.thread_time` and :func:`time.thread_time_ns` on NetBSD.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix a crash related to an integer overflow in :func:`curses.resizeterm`
|
||||
and :func:`curses.resize_term`.
|
||||
|
|
@ -1 +0,0 @@
|
|||
All :mod:`asyncio` REPL prompts run in the same :class:`context <contextvars.Context>`. Contributed by Bartosz Sławecki.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Properly quote template strings in :mod:`venv` activation scripts.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed :exc:`AssertionError` when using :func:`!asyncio.staggered.staggered_race` with :attr:`asyncio.eager_task_factory`.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix reference cycles left in tracebacks in :func:`asyncio.open_connection` when used with ``happy_eyeballs_delay``
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix detection of the minimal Queue API needed by the :mod:`logging` module.
|
||||
Patch by Bénédikt Tran.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix refcycles in exceptions raised from :class:`asyncio.TaskGroup` and the python implementation of :class:`asyncio.Future`
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Don't copy arbitrary values to :c:expr:`_Bool` in the :mod:`struct` module.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix a bug where ArgumentError includes the incorrect ambiguous option in :mod:`argparse`.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed the bug where :mod:`pdb` will be stuck in an infinite loop when debugging an empty file.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed the bug where :mod:`pdb` and :mod:`bdb` can step into the bottom caller frame.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Improve traceback if :func:`importlib.reload` is called with an object that
|
||||
is not a module. Patch by Alex Waygood.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix the notes removal logic for errors thrown in enum initialization.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Reject invalid unicode escapes for Python implementation of :func:`json.loads`.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Reject non-ASCII digits in the Python implementation of :func:`json.loads`
|
||||
conforming to the JSON specification.
|
||||
|
|
@ -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().
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixed the bug for :mod:`pdb` where it can't set breakpoints on functions with certain annotations.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix a use-after-free crash in :meth:`asyncio.Future.remove_done_callback`.
|
||||
Patch by Bénédikt Tran.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fixes a possible ``NULL`` pointer dereference in :mod:`ssl`.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix a crash in :mod:`ast` when the :attr:`ast.AST._fields` attribute is deleted.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix crash in :class:`!cProfile.Profile` and :class:`!_lsprof.Profiler` when their
|
||||
callbacks were directly called with 0 arguments.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Fix pickling and copying of :class:`os.sched_param` objects.
|
||||
|
|
@ -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`.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
The :class:`multiprocessing.Lock` and :class:`multiprocessing.RLock`
|
||||
``repr`` values no longer say "unknown" on macOS.
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Improve performances of :meth:`zipfile.Path.open` for non-reading modes.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix issue where :func:`urllib.request.pathname2url` mishandled Windows paths
|
||||
with embedded forward slashes.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
Allow :class:`collections.abc.AsyncIterator` to be a base for Protocols.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix issue where :func:`urllib.request.url2pathname` failed to discard two
|
||||
leading slashes introducing an empty authority section.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Update bundled pip to 24.3.1
|
||||
|
|
@ -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`.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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`.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix the representation of :class:`itertools.count` objects when the count
|
||||
value is :data:`sys.maxsize`.
|
||||
|
|
@ -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``).
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix issue where :func:`urllib.request.url2pathname` failed to discard any
|
||||
'localhost' authority present in the URL.
|
||||
|
|
@ -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.
|
||||
|
|
@ -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.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix :func:`urllib.request.pathname2url` for paths starting with multiple
|
||||
slashes on Posix.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix :meth:`!io.StringIO.__setstate__` crash, when :const:`None` was passed as
|
||||
the first value.
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Fix faulthandler for trampoline frames. If the top-most frame is a
|
||||
trampoline frame, skip it. Patch by Victor Stinner.
|
||||
|
|
@ -1 +0,0 @@
|
|||
Publicly expose :data:`~token.EXACT_TOKEN_TYPES` in :attr:`!token.__all__`.
|
||||
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue