Replace the builtin :mod:`hashlib` implementations of SHA2-224 and SHA2-256 originally from LibTomCrypt with formally verified, side-channel resistant code from the HACL* project. The builtins remain a fallback only used when OpenSSL does not provide them.
Fix the defs and kwdefs arguments to :c:func:`PyEval_EvalCodeEx` and
a reference leak in that function.
The GILState API is now partially compatible with subinterpreters.
Previously, PyThreadState_GET() and PyGILState_GetThisThreadState()
would get out of sync, causing inconsistent behavior and crashes.
Fix wrong lineno in exception message on :keyword:`continue` or :keyword:`break` which are not in a loop. Patch by Donghee Na.
Fix :func:`~unicodedata.is_normalized` to properly handle the UCD 3.2.0 cases. Patch by Donghee Na.
Fix :func:`sys.getsizeof` reporting for :class:`int` subclasses.
Refactor the PyLongObject struct into a normal Python object header and
a PyLongValue struct.
Fix a possible memory leak in the parser when raising :exc:`MemoryError`. Patch by Pablo Galindo
Fix potential memory underallocation issue for instances of :class:`int` subclasses with value zero.
Record the (virtual) exception block depth in the oparg of
:opcode:`YIELD_VALUE`. Use this to avoid the expensive throw() when
closing generators (and coroutines) that can be closed trivially.
Adds a new :opcode:`COMPARE_AND_BRANCH` instruction. This is a bit more efficient when performing a comparison immediately followed by a branch, and restores the design intent of PEP 659 that specializations are local to a single instruction.
Fixed segfault in property.getter/setter/deleter that occurred when a
property subclass overrode the __new__ method to return a non-property
instance.
Remove the mask cache entry for the :opcode:`COMPARE_OP` instruction and
embed the mask into the oparg.
Fix race while iterating over thread states in clearing :class:`threading.local`. Patch by Kumar Aditya.
Fix a case where re-entrant imports could corrupt the import deadlock detection code and cause a :exc:`KeyError` to be raised out of :mod:`importlib/_bootstrap`. In addition to the straightforward cases, this could also happen when garbage collection leads to a warning being emitted -- as happens when it collects an open socket or file)
Optimize construction of range object for medium size integers.
Added option to build cpython with specialization disabled, by setting
ENABLE_SPECIALIZATION=False in :mod:`opcode`, followed by make
regen-all.
Inter-field padding is now inserted into the PEP3118 format strings obtained from :class:`ctypes.Structure` objects, reflecting their true representation in memory.
[Enum] - fix psuedo-flag creation
Upgrade pip wheel bundled with ensurepip (pip 23.0)
Fix a bug where errors where not thrown by zlib._ZlibDecompressor if encountered during decompressing.
Add ssl_shutdown_timeout parameter for :meth:`asyncio.StreamWriter.start_tls`.
Fix regression when passing None as second or third argument to
FutureIter.throw.
Adapt the _elementtree extension module to multi-phase init
(PEP 489). Patches by Erlend E. Aasland.
Avoid potential unexpected freeaddrinfo call (double free) in
:mod:`socket` when when a libc getaddrinfo() implementation leaves
garbage in an output pointer when returning an error. Original patch by
Sergey G. Brester.
Remove unused references to :class:`~asyncio.TimerHandle` in
asyncio.base_events.BaseEventLoop._add_callback.
Make :func:`zipfile.Path.open` and :func:`zipfile.Path.read_text` also
accept encoding as a positional argument. This was the behavior in
Python 3.9 and earlier. 3.10 introduced a regression where supplying it as
a positional argument would lead to a :exc:`TypeError`.
Group-related variables of _posixsubprocess module are renamed to stress
that supplimentary group affinity is added to a fork, not replace the
inherited ones. Patch by Oleg Iarygin.
Fix :func:`typing.get_type_hints` on '*tuple[...]' and *tuple[...].
It must not drop the Unpack part.
Add :func:`os.path.splitroot()`, which splits a path into a 3-item tuple
(drive, root, tail). This new function is used by :mod:`pathlib` to
improve the performance of path construction by up to a third.
Fix a Windows :mod:`asyncio` bug with named pipes where a client doing
os.stat() on the pipe would cause an error in the server that disabled
serving future requests.
:func:`warnings.warn` now has the ability to skip stack frames based on code
filename prefix rather than only a numeric stacklevel via the new
skip_file_prefixes keyword argument.
pass encoding kwarg to subprocess in platform
Emit a deprecation warning in :meth:`asyncio.DefaultEventLoopPolicy.get_event_loop` if there is no current event loop set and it decides to create one.
Fix handling of partial and invalid UNC drives in ntpath.splitdrive(),
and in ntpath.normpath() on non-Windows systems. Paths such as
'\server' and '\' are now considered by splitdrive() to contain only a
drive, and consequently are not modified by normpath() on non-Windows
systems. The behaviour of normpath() on Windows systems is unaffected,
as native OS APIs are used. Patch by Eryk Sun, with contributions by Barney
Gale.
Fix a reference undercounting issue in :class:`ctypes.Structure` with
from_param() results larger than a C pointer.
Add float-style formatting support for :class:`fractions.Fraction` instances.
Preserve more detailed error messages in :mod:`ctypes`.
Ensure runtime-created collections have the correct module name using the newly added (internal) :func:`sys._getframemodulename`.
:mod:`uuid` now has a command line interface. Try python -m uuid -h.
:data:`ctypes.wintypes.BYTE` definition changed from :data:`~ctypes.c_byte` to :data:`~ctypes.c_ubyte` to match Windows SDK. Patch by Anatoly Techtonik and Oleg Iarygin.
_posixsubprocess now initializes all UID and GID variables using a
reserved -1 value instead of a separate flag. Patch by Oleg Iarygin.
The :mod:`xml.etree.ElementTree` module now emits :exc:`DeprecationWarning` when testing the truth value of an :class:`xml.etree.ElementTree.Element`. Before, the Python implementation emitted :exc:`FutureWarning`, and the C implementation emitted nothing.
Convert :mod:`elementtree` types to heap types. Patch by Erlend E. Aasland.
Fix a bug where :class:`pathlib.Path` accepted and ignored keyword arguments. Patch provided by Yurii Karabas.
:class:`ctypes.CDLL`, :class:`ctypes.OleDLL`, :class:`ctypes.WinDLL`, and
:class:`ctypes.PyDLL` now accept :term:`path-like objects <path-like
object>` as their name argument. Patch by Robert Hoelzl.
Reword :mod:`subprocess` to emphasize default behavior of stdin, stdout, and stderr arguments. Remove inaccurate statement about child file handle inheritance.
test_tarfile has been updated to pass when run as a high UID.
Update BOLT configration not to use depreacted usage of --split
functions. Patch by Donghee Na.
Allow overriding Windows dependencies versions and paths using MSBuild properties.
Minor fixes to allow building with PlatformToolset=ClangCL on Windows.
In accordance with PEP 699, the ma_version_tag field in
:c:type:`PyDictObject` is deprecated for extension modules. Accessing this
field will generate a compiler warning at compile time. This field will be
removed in Python 3.14.
Allows -Wno-int-conversion for wasm-sdk 17 and onwards, thus enables building WASI builds once against the latest sdk.
Conditionally add -fno-reorder-blocks-and-partition in configure.
Effectively fixes --enable-bolt when using Clang, as this appears to be
a GCC-only flag.
__bool__ is defined in AIX system header files which breaks the build in
AIX, so undefine it.
Fix a regression in detecting gdbm_compat library for the _gdbm
module build.
_aix_support now uses a simple code to get platform details rather than
the now non-existent _bootsubprocess during bootstrap.
Ensure the install path in the registry is only used when the standard library hasn't been located in any other way.
The py.exe launcher now correctly filters when only a single runtime is
installed. It also correctly handles prefix matches on tags so that -3.1
does not match 3.11, but would still match 3.1-32.
Updates bundled copy of Tcl/Tk to 8.6.13.0
Restore ability to launch older 32-bit versions from the :file:`py.exe` launcher when both 32-bit and 64-bit installs of the same version are available.
Fixed an issue where writing more than 32K of Unicode output to the console screen in one go can result in mojibake.
Ensures the PythonPath registry key from an install is used when
launching from a different copy of Python that relies on an existing install
to provide a copy of its modules and standard library.
Restores support for the :file:`py.exe` launcher finding shebang commands in its configuration file using the full command name.