./lang/python314, Interpreted, interactive, object-oriented programming language

[ Image CVSweb ] [ Image Homepage ] [ Image RSS ] [ Image Required by ]


Branch: CURRENT, Version: 3.14.10, Package name: python314-3.14.10, Maintainer: pkgsrc-users

Python is an interpreted, interactive, object-oriented
programming language that combines remarkable power with
very clear syntax. For an introduction to programming in
Python you are referred to the Python Tutorial. The
Python Library Reference documents built-in and standard
types, constants, functions and modules. Finally, the
Python Reference Manual describes the syntax and semantics
of the core language in (perhaps too) much detail.

Python's basic power can be extended with your own modules
written in C or C++. On most systems such modules may be
dynamically loaded. Python is also adaptable as an exten-
sion language for existing applications. See the internal
documentation for hints.

This package provides Python version 3.14.x.



Package options: readline, x11

Master sites:

Filesize: 23672.258 KB

Version history: (Expand)


CVS history: (Expand)


   2026-10-26 13:53:07 by Adam Ciarcinski | Files touched by this commit (6) | Package updated
Log message:
python314 py314-html-docs: updated to 3.14.10

Python 3.14.10

Security

gh-160300: Fix http.cookiejar.DefaultCookiePolicy accepting and returning \ 
cookies with a negative Version attribute without checking their domain against \ 
the request host. Such cookies are now ignored.
CVE 2026-114583, gh-160097: tarfile.tar_filter() now rejects link members whose \ 
path resolves to the destination directory itself, as tarfile.data_filter() \ 
already did.
CVE 2026-115557, gh-160040: ssl now rejects TLS certificate chains that contain \ 
any of a set of compromised eMudhra intermediate CA keys. This is an \ 
extraordinary measure and a last line of defense: removing trust is primarily \ 
the job of the platform root store, and the built-in denylist only blocks \ 
connections while that update has not yet reached the OS, a container image, or \ 
a bundled trust store in various Python packages. Entries are added to the \ 
denylist only under a very high threshold. The denylist matches on the public \ 
key (the SHA-256 digest of the RFC 5280 SubjectPublicKeyInfo), so it also covers \ 
the cross-signed certificates that reuse one of the distrusted keys.

Core and Builtins

gh-160491: Fix the location reported for invalid escape sequences in f-strings \ 
and t-strings. The SyntaxError now points at the literal part that contains the \ 
escape, instead of at the closing quote.
gh-160268: Fix a crash in tokenize when a mismatched closing bracket follows the \ 
opening brace of an f-string or t-string replacement field, as in \ 
f'{]a'. It now raises the same “unmatched” error as the parser.
gh-106045: Fix venv path discovery when the base executable resolves to a \ 
location outside the installation pointed to by the home key in pyvenv.cfg. The \ 
standard library is now found from home, and extension modules from the resolved \ 
executable’s installation, instead of falling back to the compiled-in prefix.
gh-160162: Fix a crash on 32-bit platforms when left shifting an int by a count \ 
close to sys.maxsize * sys.int_info.bits_per_digit. OverflowError is now raised, \ 
as for other too large counts.
gh-160179: Fix bytearray.__init__() leaving uninitialized memory in the object \ 
when it fails on a list or tuple containing an integer not in range(256). The \ 
object is now empty after the failed call.
gh-159739: Fix a possible crash when assigning metadata to classmethod or \ 
staticmethod objects.
gh-159739: Fix a race in list.__sizeof__() when a list is concurrently resized \ 
on a free-threaded build.
gh-159739: Fix a reference leak when the value of a type alias is evaluated \ 
recursively or concurrently.
gh-159739: Fix a crash in free-threaded builds when codecs.unregister() is \ 
called concurrently.
gh-159739: Fix reference leaks when free-threaded garbage collection aborts \ 
early because of an allocation error.
gh-159739: Prevent free-threaded builds from interning and immortalizing complex \ 
subclasses in code object constants.
gh-159739: Fix a reference leak in binary, ternary, and comparison operations on \ 
weak reference proxies when another operand is a dead proxy.
gh-159739: Fix a crash when constructing an error for invalid generic alias \ 
arguments.
gh-159739: Allow the garbage collector to break reference cycles involving \ 
property accessors or names.
gh-159739: Fix a crash in warnings.warn() when skip_file_prefixes is an empty \ 
tuple subclass. Propagate allocation errors when creating the fallback filename.
gh-159431: Fix an assertion failure, or an immortal object becoming mortal, on \ 
the free threaded build when an object passed to the internal delayed decref \ 
mechanism is immortal or becomes immortal before the delayed decref is processed \ 
by the garbage collector.
gh-159294: Fix a crash in a debug build when creating an ExceptionGroup or \ 
BaseExceptionGroup fails with MemoryError. Patch by Christian Aurich Zanettini \ 
Martins.
gh-159244: Fix a crash in dict and dict.update() in the free-threaded build when \ 
another thread concurrently mutates a list used as a key/value pair. Patch by \ 
Christian Aurich Zanettini Martins.
gh-159111: Update mimalloc version from 2.1.2 to 2.5.2. Patch by Donghee Na.
gh-156459: Fix cleanup on error in compiler_set_qualname. Previously it was \ 
called in _PyCompile_EnterScope, after the scope had been entered, and this was \ 
not reversed in case of an error.
gh-154318: Fix a crash when hashing a deeply nested tuple. A RecursionError is \ 
now raised instead of overflowing the C stack.
Library
gh-160549: Fix a crash when a compression.zstd.ZstdCompressor that uses worker \ 
threads and a ZstdDict is deallocated, or the interpreter exits, while data \ 
passed to compress() is still being compressed.
gh-160535: Fix a crash in compression.zstd when the garbage collector frees a \ 
ZstdCompressor that uses worker threads together with its ZstdDict before the \ 
compression of already submitted data has finished.
gh-160520: Fix asyncio SSL transports not applying ssl_shutdown_timeout when the \ 
peer has sent EOF but does not read the data still queued for it. Closing such a \ 
connection could wait indefinitely; it is now aborted with TimeoutError once the \ 
timeout expires.
gh-160326: Raise ValueError for a NaN timeout in threading.Condition.wait() and \ 
the blocking calls built on it, such as threading.Event.wait(), \ 
threading.Semaphore.acquire() and queue.Queue.get(), instead of returning at \ 
once or looping without ever timing out.
gh-159739: Fix crashes in xml.parsers.expat when a character data callback \ 
disables buffering or clears another handler during a flush, or when interning \ 
an attribute name changes ordered_attributes.
gh-160299: Fix symtable.Symbol.is_referenced() for local and nonlocal symbols in \ 
function scopes when their only uses are in inlined comprehensions.
gh-159739: Fix a crash when a ctypes structure subclass cannot be created due to \ 
an allocation failure.
gh-159739: Fix clearing a pickle.Unpickler memo so that the unpickler can be \ 
reused for independent records. Preserve a valid memo if allocation fails or \ 
releasing an old entry runs a destructor that accesses the memo.
gh-160171: On the server side, ssl.SSLSocket.get_unverified_chain() now returns \ 
the client’s certificate when the session was resumed from a session ticket, \ 
instead of an empty list, and returns an empty list instead of raising \ 
AttributeError when the client sent no certificate.
gh-159739: Fix a possible crash in abc.ABCMeta instance checks when a \ 
subclass-checking callback changes the instance’s class.
gh-159739: Fix the truncate method on io.BytesIO when converting its size \ 
argument closes the stream or exports its buffer.
gh-159739: Raise TypeError if a string subclass returns a non-string during \ 
newline translation in io.TextIOWrapper. Recheck the stream state if the \ 
replacement callback closes, detaches or reinitializes the stream.
gh-159739: Fix contextvars.ContextVar returning a stale value after a reentrant \ 
finalizer changes it during reset().
gh-159739: Detect recursive _as_parameter_ chains for ctypes calls without \ 
argument types.
gh-159739: Fix a possible crash when a list of sqlite3 parameters is modified \ 
concurrently on a free-threaded build.
gh-159739: Avoid a crash when a threading.local subclass finalizer accesses \ 
attributes after construction fails.
gh-159739: Avoid a crash when a queue.SimpleQueue subclass finalizer adds an \ 
item after construction fails.
gh-100609: str() of a zipfile.Path whose underlying zipfile has no filename, \ 
such as one constructed from an io.BytesIO, now renders that filename as \ 
:zipfile: instead of raising TypeError. The root of a zipfile is also no longer \ 
rendered with a trailing slash. Synchronized with zipp 3.23.1.
gh-159864: Fix a crash in syslog.openlog() under the free-threaded build when \ 
sys.argv is modified concurrently.
gh-159690: Fix logging.handlers.TimedRotatingFileHandler permanently stopping \ 
rollover after a rollover failed or its backup file already existed, for example \ 
at a DST change.
gh-159739: Fix allocation error handling in the fallback implementation of \ 
getaddrinfo().
gh-159739: Fix a double free if remote unwinder initialization runs out of memory.
gh-159739: Fix io.IOBase.readline() returning more bytes than requested when a \ 
stream supports peek() and returns short reads.
gh-159739: Fix multibyte encoders silently consuming a non-BMP character when \ 
looking up a two-character mapping.
gh-159739: Fix off-by-one output buffer checks in the fallback implementation of \ 
getnameinfo().
gh-159706: Fix the pure-Python zoneinfo.ZoneInfo setting fold=0 in fromutc() for \ 
times in the fold created by the only transition of a zone with a single \ 
transition.
gh-159714: Fix zoneinfo.ZoneInfo interpreting the Julian day rule J59 as \ 
February 29 in leap years instead of February 28.
gh-158287: Fix a bug in asyncio where stopping a child process (such as with \ 
SIGSTOP) on macOS caused the event loop to block indefinitely.
gh-130698: Fix PyREPL to convert sys.ps1 and sys.ps2 to strings before use, and \ 
fall back to the default prompts if the conversion raises.
gh-158126: Speed up pickle.dumps() and creating a pickle.Pickler by avoiding the \ 
creation of an AttributeError when looking up the optional reducer_override and \ 
dispatch_table attributes.
gh-157880: Fix mailbox.Babyl to write the visible headers of a \ 
mailbox.BabylMessage to the mailbox file.
gh-157621: Fix a crash when a weak-reference callback is attached to a \ 
typing.ParamSpecArgs or typing.ParamSpecKwargs instance.
gh-156078: zipfile.ZipFile.mkdir() now raises ValueError when the archive is \ 
closed or when a writable member handle is open.
gh-155428: Ensure that hmac.digest() and hmac.HMAC.digest() output identical \ 
values when using a digest’s block size smaller than 16. Patch by Bénédikt \ 
Tran.
gh-153679: zipimport.zipimporter now raises zipimport.ZipImportError instead of \ 
UnicodeDecodeError for a UTF-8-flagged file name that is not valid UTF-8. Patch \ 
by tonghuaroot.
gh-149816: hashlib: fix a crash arising from a race condition when looking up an \ 
OpenSSL hash algorithm by name the first time. Patch by Bénédikt Tran.
gh-127636: Fix tarfile.TarFile.extract() to accept archive member names with a \ 
trailing forward slash, including those returned by tarfile.TarFile.getnames(). \ 
Contributed by Xiao Yuan.
gh-149527: multiprocessing: fix creation of temporary socket files following \ 
gh-137335.
gh-146169: xml.parsers.expat: raise RuntimeError when an Expat handler calls \ 
parser.Parse or parser.ParseFile on the parser that called the handler. Patch by \ 
Bénédikt Tran.
gh-140036: Avoid hanging in floor division of pure Python decimal.Decimal \ 
instances when the context precision is very large. Patch by Bénédikt Tran.

Build

gh-128883: Fix crashes with -X perf and -X perf_jit in BOLT builds. The ELF perf \ 
trampoline templates now use read-only data sections.
gh-160004: Fix the paths in the PEP 739 build-details.json file generated by \ 
Tools/build/generate-build-details.py with both --relative-paths and \ 
--config-file-path. Previously, every path except base_prefix was wrong and \ 
depended on the directory the script was run from.
gh-159998: Fix libpython.dynamic in the PEP 739 build-details.json file for \ 
macOS and iOS framework builds. It now points at the framework’s library \ 
instead of a nonexistent path under lib/.
gh-144942: Fix the macOS shared library and framework builds not linking the \ 
libraries required by built-in modules, such as the HACL* objects needed by \ 
_blake2 when it is built in via Modules/Setup.local.
gh-159819: Fix the shell version of python3-config (used on all POSIX platforms \ 
except macOS) when the installation prefix contains spaces or other characters \ 
special to the shell or sed: it printed an empty --prefix and wrong \ 
--includes/--ldflags paths while exiting successfully. The script now also exits \ 
with status 1 if it cannot determine its installation prefix.
gh-157354: Fix the --with-name-sanitizer=no and --without-name-sanitizer \ 
configure options enabling the sanitizer instead of disabling it.
gh-155813: On macOS, LIBFFI_CFLAGS and LIBFFI_LIBS are no longer ignored when \ 
the SDK provides libffi, so ctypes can again be built against a different \ 
libffi. Patch by Advit Arora.

C API

gh-159739: Avoid a crash if a context watcher is cleared while other context \ 
watchers are being notified.
   2026-10-22 10:01:58 by Adam Ciarcinski | Files touched by this commit (6) | Package updated
Log message:
python314 py314-html-docs: updated to 3.14.9

Python 3.14.9

Security

gh-159894: Bump the version of pip bundled in ensurepip to version 26.2.2.
gh-159428: mimetypes no longer reads the files listed in mimetypes.knownfiles by \ 
default on Windows, and uses only the registry.
gh-157265: In tarfile, when extracting a link falls back to extracting a member \ 
of the archive, skip the member when the filter function returns None when \ 
called with the extracted member’s name replaced with the link’s.
gh-157953: Update bundled libexpat to version 2.9.0.
gh-157579: Fix a race condition in the cleanup of tempfile.TemporaryDirectory. \ 
When working around file system permission errors, files are now removed \ 
relative to open directory file descriptors instead of resolving their path \ 
again, so that replacing a directory of the tree with a symbolic link can no \ 
longer make the cleanup delete files outside of the temporary directory. This \ 
addresses CVE 2026-12345.

Core and Builtins

gh-159739: Avoid a crash if allocation fails while creating a \ 
string.templatelib.Template iterator.
gh-159739: Propagate errors during generic class construction.
gh-159739: Raise OverflowError when the absolute value of a dynamic printf-style \ 
formatting width is too large.
gh-159739: Fix a reference leak in gc.get_objects() and gc.get_referrers() when \ 
an internal allocation fails in the free-threaded build.
gh-159739: Fix memory leaks during interpreter startup when a path configuration \ 
file is empty or too large, or when an audit hook rejects a command.
gh-159739: Avoid a crash when an interpreter configuration string cannot be \ 
encoded as UTF-8.
gh-159739: Preserve the original SyntaxError if allocating optional error \ 
metadata fails.
gh-159739: Avoid a crash if formatting an integer with the c presentation type \ 
runs out of memory.
gh-159739: Avoid a crash when a module filename cannot be encoded as UTF-8.
gh-159430: Report the correct exception if looking up __bytes__() raises an \ 
exception while performing %-formatting of bytes.
gh-159320: Add dynamic detection of stack sizes on Android, allowing safer deep \ 
recursion.
gh-159041: Fix a use-after-free in asyncio task bookkeeping when a finalizer \ 
creates a task during thread shutdown.
gh-158973: Reset the warnings lock in the child after os.fork(), before clearing \ 
other threads’ states, to avoid deadlocks when their finalizers issue \ 
warnings. Preserve the lock’s recursion depth if the forking thread owns it.
gh-158918: Reduce C stack usage of _PyModule_IsPossiblyShadowing, which could \ 
potentially cause stack overflows during module attribute access while deeply \ 
recursing in agressively optimized builds.
gh-158803: Fix a crash in bytes.join() and bytearray.join() in the free-threaded \ 
build when another thread concurrently mutates the list being joined. Patch by \ 
Christian Aurich Zanettini Martins.
gh-158592: Skip the array reallocation when shrinking a small list. Patch by \ 
Donghee Na.
gh-158583: bytes.fromhex() and bytearray.fromhex(): Fix uninitialized memory \ 
read. Patch by Victor Stinner.
gh-158592: del list[index] now triggers shrinking the list’s internal array.
gh-158121: Fix missing sys.monitoring INSTRUCTION events when a LINE callback \ 
returns sys.monitoring.DISABLE.
gh-106045: Fix standard library discovery in virtual environments created from a \ 
Python executable symlink located outside its base installation.
gh-156204: Fix a crash in PyErr_GivenExceptionMatches() when evaluating deeply \ 
nested exception tuples. The recursion is now bounded, and exceeding the limit \ 
is reported as an unraisable exception.
gh-152075: Reduced lock contention during LOAD_GLOBAL bytecode specialization \ 
under free threading.
gh-149816: Fix a Use-After-Free race condition in subtype_getweakref() during \ 
concurrent weakref creation and destruction in the free-threading build.
gh-149816: Fix race conditions in invoke_gc_callback iterating gc.callbacks in \ 
free-threading mode.
Library
gh-138641: Ignore pdb.set_trace() when called directly at the pdb prompt.
gh-159811: Fix a crash in hashlib when the OpenSSL routine used by hash.update() \ 
or by hash object constructors fails on data larger than 2048 bytes. Patch by \ 
Bénédikt Tran.
gh-159739: Fix copying collections.deque subclasses with a large maximum length.
gh-159739: Allow cyclic garbage collection to reclaim group records returned by grp.
gh-159739: Fix io.BytesIO reads into overlapping views of the same buffer.
gh-159739: Avoid a crash when memory allocation fails while creating a \ 
collections.OrderedDict items iterator.
gh-159739: Avoid reading past the end of an encoding name when the surrogatepass \ 
error handler receives a truncated UTF-16 or UTF-32 name.
gh-159739: Fix incorrect ctypes scalar values after ctypes.resize() enlarges the \ 
object.
gh-159739: Fix a memory leak when Unicode normalization cannot grow its \ 
temporary buffer.
gh-159739: Fix resource leaks in ssl when certificate conversion or key log \ 
setup fails.
gh-149015: Fix bdb.Bdb.clear_all_file_breaks() leaving breakpoints behind when \ 
multiple breakpoints are set on the same line.
gh-159620: Fix python -m asyncio ps and pstree stacks stopping at asynchronous \ 
generators. Patch by Timofei Ivankov.
gh-159458: Fix a ThreadSanitizer data race on the static cache in \ 
normalize_century() of the datetime module under the free-threaded build.
gh-159430: Report the correct exception if looking up __name__ raises an \ 
exception when calling repr() on a weakref.ref.
gh-159304: Fix AttributeError in email.message.EmailMessage.get_body() when a \ 
nested multipart part is malformed and its payload is a string.
gh-159225: Prevent input calls in PyREPL from modifying readline history.
gh-159044: Restore the previous behaviour of \ 
http.client.HTTPConnection.set_tunnel() where header values that are not strings \ 
(such as None, int or other objects) are converted with str instead of raising \ 
AttributeError when the request is sent.
gh-159184: Fix marshal.dumps() raising MemoryError for a set or frozenset \ 
containing several complex NaNs, which also made it impossible to write a .pyc \ 
file for source code containing such a constant.
gh-159185: Fix a crash in marshal.dumps() and marshal.dump() when a set is \ 
modified while its elements are serialized, for example by the __buffer__() \ 
method of one of its elements. RuntimeError is now raised.
gh-159049: Fix reference cycles in asyncio.loop.create_connection() and \ 
asyncio.loop.start_tls() after a failed TLS handshake. Patch by Timofei Ivankov.
gh-87720: Fixed error in email new policies where header folding failed to \ 
detect the need to re-quote text obtained from encoded words in certain cases.
gh-158929: Fix crash when calling syslog.syslog() while a subinterpreter in \ 
another thread calls syslog.openlog() or syslog.closelog().
gh-158893: Make os.strerror() thread-safe: use the reentrant strerror_r() \ 
function if available. Patch by Victor Stinner.
gh-158539: Fix macOS runtime section lookup for remote debugging when virtual \ 
memory region sizes differ from Mach-O segment file sizes.
gh-156321: Fix asyncio.shield() reporting an exception from the inner future \ 
through the loop exception handler as soon as it completes after the shield was \ 
cancelled, even when the exception is retrieved afterwards. The exception is now \ 
reported only if it is never retrieved, as with any other future.
gh-158563: Fix turtle.undo() after turtle.teleport() and after an exception in \ 
turtle.circle(), turtle.dot() or turtle.write(). Fix turtle.stamp(), \ 
turtle.clearstamp(), turtle.clear() and turtle.reset() when the undo buffer is \ 
disabled.
gh-158004: Fix asyncio.as_completed() to continue yielding every awaitable after \ 
a pending iteration step is cancelled.
gh-157364: Fix a use-after-free in io.TextIOWrapper when a call to the \ 
underlying buffer reentrantly detaches it. Patched by Shamil Abdulaev.
gh-157242: io.BytesIO is no longer closed on write() and truncate() failure \ 
(MemoryError). Patch by Victor Stinner.
gh-157146: linecache can now read the source of a module that was imported from \ 
a zip archive on sys.path when given only the file name, as pdb, warnings and \ 
doctest do.
gh-156920: Fix asyncio on Windows: closing a DatagramTransport under \ 
ProactorEventLoop while datagrams were still queued, or while an in-flight write \ 
failed right as close() was draining the buffer, could strand the queued data \ 
and never call connection_lost(), hanging the close indefinitely.
gh-156698: Fix asyncio.ProactorEventLoop UDP transports so that a write error no \ 
longer strands a paused protocol: the write loop is now rescheduled when data \ 
remains buffered, and the protocol is resumed when the buffer has drained.
gh-156568: zipapp.create_archive() now correctly sets the executable bit on the \ 
target archive when copying a zipapp where the target is a path-like object.
gh-155843: hmac: ensure that HMAC objects are properly initialized to prevent \ 
rare crashes on allocation failures. Patch by Bénédikt Tran.
gh-155835: hashlib: Fix data races when accessing digest_size and block_size on \ 
SHA-3 objects. Patch by Bénédikt Tran.
gh-155833: Ensure that MD5 and SHA* objects are properly GC-untracked before \ 
freeing their internal HACL* state. Patch by Bénédikt Tran.
gh-155830: _blake2: Ensure that BLAKE-2 objects are correctly initialized before \ 
being tracked by the garbage collector. Patch by Bénédikt Tran.
gh-155717: multiprocessing’s default start method is now “spawn” instead \ 
of "forkserver" when there is no writable temporary directory, such as \ 
on a read-only file system. Previously starting a process failed with an OSError \ 
there. Patch by Bénédikt Tran.
gh-150449: Fix sqlite3.Blob slices with a negative step. Reading or writing such \ 
a slice raised SystemError. It now raises ValueError.
gh-155426: Make sure that the pure Python fallback of hmac.digest() rejects keys \ 
that are neither bytes or bytearray. Previously, an AttributeError was raised \ 
instead of TypeError. Patch by Bénédikt Tran.
gh-154523: Fixed data-race when calling io.TextIOBase.detach() in free-threaded \ 
build.
gh-82535: logging.handlers.SysLogHandler no longer fails if the address cannot \ 
be resolved when the handler is created. The address is resolved again when a \ 
record is emitted.
gh-154194: Fix the sampling profiler dropping entire samples when a non-fatal \ 
read fails; frames now keep any readable metadata, and long funcnames and \ 
filenames are truncated instead. Patch by Maurycy Pawłowski-Wieroński.
gh-152754: Fix a crash when the same os.scandir() iterator is used concurrently \ 
from multiple threads. It no longer releases the directory handle while another \ 
thread is reading from it. Sharing an iterator between threads remains subject \ 
to race conditions: which entries each thread receives is unspecified.
gh-153364: Make frame, coroutine and task-waiter walks iterative and bounded, \ 
avoiding potential hangs and stack overflows. Fix asyncio task inspection when \ 
awaited-by sets contain removed entries. Patch by Maurycy Pawłowski-Wieroński.
gh-152692: Fix annotationlib.type_repr() returning a string such as \ 
None.list.append for bound built-in methods, whose __module__ is None. It now \ 
returns the qualified name, as it already did for other builtins.
gh-152490: Fix TypeError when formatting a SyntaxError raised with \ 
NotImplemented as its argument, which caused unexpected REPL exit and IDLE Shell \ 
restart.
gh-152373: Fix the pdb until command not stepping over a list comprehension when \ 
a breakpoint is set on it. Patch by tonghuaroot.
gh-133998: Fix tarfile.open() in streaming write mode (w|gz) raising \ 
struct.error when given an mtime outside the range of the gzip header’s 32-bit \ 
timestamp field. Out-of-range values are now stored as 0, matching gzip.
gh-151179: Fix a pidfd leak in _PidfdChildWatcher on Linux: the watcher no \ 
longer leaks the process file descriptor when waitpid() fails with an error \ 
other than ChildProcessError.
gh-143008: Fix race conditions when re-initializing a io.TextIOWrapper object.
gh-143376: concurrent.interpreters: fix a crash when internal cross-interpreter \ 
channel ends have incorrect channel IDs. Patch by Bénédikt Tran.
gh-146065: Fix a crash in asyncio.Future iterator when send() is called after \ 
throw() or close().
gh-143008: Fix crash in io.TextIOWrapper when reentrant io.TextIOBase.detach() \ 
is called reentrantly from the underlying buffer.
gh-133998: Fix struct.error exception when creating a file with gzip.GzipFile or \ 
compressing data with gzip.compress() if the system time is outside the range \ 
00:00:00 UTC, January 1, 1970 through 06:28:15 UTC, February 7, 2106, or \ 
explicitly passed mtime argument is outside the range 0 to 2**32-1.
gh-129605: Improve exception handling when computing suggestions in \ 
traceback.py. This fixes a bug that could cause PyREPL to exit unexpectedly.

Documentation

gh-142083: Document the 'w' type code in the array.array docstring, so \ 
that it lists the same type codes as array.typecodes and the array module \ 
documentation.

Tests

gh-159293: Restore the recursion limit after the free-threading recursion-limit \ 
race test to avoid failures in subsequent tests run in the same process.
gh-159211: The iOS testbed no longer gathers simulator diagnostics when a test \ 
run fails.
gh-157628: In regrtest, only consider that a test leaks if all test runs leak at \ 
least one file descriptor. For example, ignore “[0, 1, -1] file descriptors, \ 
sum=0” deltas, instead of reporting a leak. Patch by Victor Stinner.
gh-75876: A test decorated with bigmemtest() now runs in a subprocess if it \ 
really allocates the memory it asks for (that is, if the -M option is used), so \ 
that the memory it uses and the address space it fragments are released when it \ 
ends. A dummy run stays in the process. The separate memory watchdog process is \ 
no longer used.

Build

gh-159759: Fix the libpython.static path in PEP 739 build-details.json, which \ 
pointed to a file that is not installed when building with --enable-shared, and \ 
no longer list a static library for framework builds, which do not install one.
gh-159440: The version string reported by sys.version no longer carries a \ 
spurious -dirty suffix when CPython is built out-of-tree from a clean git \ 
checkout: the build stamp now checks the source tree instead of the build \ 
directory.
gh-158683: Fix the Modules/Setup entry for the _zstd module by adding missing \ 
source files.

Windows

gh-159880: Fix a key handle leak in winreg.CreateKey(), winreg.CreateKeyEx() and \ 
winreg.OpenKey() when the winreg.OpenKey/result audit hook fails.
gh-157906: Fix an incorrect architecture macro check that prevented CPU \ 
prefetching in the free-threaded garbage collector on 32-bit Windows builds.
gh-157789: Use compiler option -Og in case of clang-cl debug builds on Windows \ 
to reduce stack usage. Patch by Chris Eibl.

macOS

gh-159739: Propagate errors that occur while converting macOS system proxy settings.

IDLE

gh-159517: Fix the completion list and the call tip grabbing the focus on macOS \ 
with Tcl/Tk 9.1.

C API

gh-159739: Fix a crash in _PyTuple_Resize() when resizing a non-empty tuple to a \ 
negative or too large size. It now raises SystemError or MemoryError \ 
respectively.
gh-159739: PyInitConfig_SetStr() now releases a previously configured value and \ 
preserves it if conversion of the replacement fails.
gh-159739: Fix a reference leak when _PyTuple_Resize() fails.
gh-158810: Fix Py_ARRAY_LENGTH() macro on C++: do not use \ 
__builtin_types_compatible_p() on C++. Patch by Victor Stinner.
gh-158451: Fix _PyUnicodeWriter_WriteLatin1String() when the writer buffer kind \ 
is UCS-2 or UCS-4. Patch by Victor Stinner.
gh-142217: Add tests on the undocumented and deprecated _Py_Identifier C API. \ 
Patch by Victor Stinner.
   2026-10-01 09:09:41 by Adam Ciarcinski | Files touched by this commit (6) | Package updated
Log message:
python314 py314-html-docs: updated to 3.14.8

3.14.8

Security

gh-158446: Fix a crash or incorrect output that could occur when formatting a \ 
float or complex with a precision close to the platform’s INT_MAX. \ 
PyOS_double_to_string() now raises ValueError for any precision of that \ 
magnitude, regardless of presentation type or value, as the format string \ 
parsers already did for precisions above INT_MAX.

gh-156793: asyncio: loop.start_tls() and loop.create_connection() now validate \ 
the server_hostname argument if an ssl.SSLContext is passed with check_hostname \ 
set to True.

gh-156793: ssl.SSLContext.wrap_bio() now validates its server_side, \ 
server_hostname and session arguments similar to ssl.SSLContext.wrap_socket().

In particular, a context with check_hostname enabled and no server_hostname \ 
passed to wrap_bio() now raises ValueError instead of completing a handshake \ 
that verified the certificate chain without verifying the peer’s identity, \ 
with no indication that the check had been skipped.

gh-157953: Update bundled libexpat to version 2.8.5.

gh-156002: Bound the amount of data zipfile decompresses per read for members \ 
compressed with bzip2, LZMA, or Zstandard, matching the existing limit for \ 
deflate. A small archive member could previously expand into an unbounded \ 
allocation even when read in small chunks.

gh-155999: Fix the tarfile tar and data extraction filters creating directories \ 
outside the destination for members whose name leaves the destination and \ 
returns to it, such as ../evil/../dest/sub/file. The containment check used the \ 
resolved path, but intermediate directories were created from the name as given.

gh-156293: Fix a crash in ssl when an sni_callback switches a connection to \ 
another SSLContext and the context that carries the callback is no longer \ 
referenced by the application. Servers that keep their sni_callback context \ 
alive (the usual case when it wraps the listening socket or is stored on the \ 
server object) were not affected. This addresses CVE 2026-19445.

gh-155292: Change the stringprep module and encodings.idna codec to not consider \ 
Unicode codepoint attributes beyond those defined in RFC 3454.

gh-155694: Fix CVE 2026-15806 by scoping HTTPPasswordMgr credentials to the URL \ 
scheme, preventing credentials stored for an HTTPS URL from being used for a \ 
matching HTTP URL, while URIs without a scheme continue to match any scheme.
Core and Builtins
gh-158364: Fix crash when sys._current_frames() or sys._current_exceptions() is \ 
called while another interpreter is running.
gh-158254: Reverse iterators over a dict and its views now raise RuntimeError if \ 
the dictionary’s keys change during iteration, like forward iterators, instead \ 
of yielding entries for the new keys.
gh-157838: Merge biased reference counts on behalf of threads that are detached \ 
instead of waiting for them to attach again, in the free-threaded build.
gh-157378: Fix SyntaxError.offset and SyntaxError.end_offset for the \ 
“Non-UTF-8 code starting with …” error when a non-ASCII character precedes \ 
the invalid byte on the same line. Patch by Shamil Abdulaev.
gh-156762: Fix undefined behaviour in operator.methodcaller: its tp_clear slot \ 
function returned void instead of int, so the garbage collector called it \ 
through an incompatible function type. Patched by Shamil Abdulaev.
gh-157377: Fix gc.get_count() on the free-threaded build resetting the \ 
thread-local allocation counter that schedules automatic garbage collection. A \ 
thread that called it while allocating could prevent cyclic garbage from ever \ 
being collected.
gh-156091: Fix a crash when compiling deeply nested inlined list, set, or dict \ 
comprehensions. A SyntaxError is now raised when the nesting exceeds the \ 
compiler’s static block limit.
gh-156894: Fix the position of syntax errors which cover a range if the line \ 
contains non-ASCII characters before the error.
gh-155525: Fix quadratic-time tokenization of modules containing many f-strings \ 
or t-strings.
gh-156689: Fix an out-of-bounds read in compile() and ast.parse() when an AST \ 
object is passed with mode='func_type'.
gh-156371: Fix missing PyRefTracer_DESTROY events for trashcan deferred objects. \ 
Patch by Donghee Na.
gh-156114: Fix a crash in the perf trampoline when a code object has a name or \ 
filename that cannot be encoded to UTF-8. Patched by Shamil Abdulaev.
gh-156126: Fix a crash when importing a module whose name contains characters \ 
that cannot be encoded to UTF-8 (such as lone surrogates) while -X importtime is \ 
enabled.
gh-155752: Fix a crash when a types.GenericAlias argument gains a \ 
__typing_subst__ hook after the alias parameters have been cached.
gh-155504: Fix a crash when thread state creation fails before the thread state \ 
is fully initialized.
gh-155526: Fix spurious OverflowError for abs(nanj) in case errno was previously \ 
set to ERANGE by some library call. Patch by Sergey B Kirpichev.
gh-129752: Don’t update adaptive counters in the free-threaded build when \ 
thread-local bytecode is disabled (-X tlbc=0). Patch by Donghee Na.
gh-155515: Track the internal HAMT iterators, which back iteration over a \ 
contextvars.Context, with the garbage collector. A reference cycle running \ 
through such an iterator was never collected, leaking the whole context it \ 
iterated over.
gh-154937: Fix a data race on thread handle identifiers when _thread._shutdown() \ 
runs concurrently with the startup of non-daemon threads in the free-threaded \ 
build.
gh-154902: Fix a crash when __conditional_annotations__ is rebound to a non-set \ 
object.
gh-151464: Exclude invalid token <> from tokenize output. SyntaxError for \ 
<> now suggests !=.
gh-154719: Trailing whitespace in a t-string interpolation expression is now \ 
preserved in string.templatelib.Interpolation.expression, up to the closing } or \ 
the conversion (!), format (:), or debug (=) delimiter. Explicit line \ 
continuations following a debug = remain part of the debug text and are excluded \ 
from expression. Escaped quotes are now preserved while reconstructing t-string \ 
interpolation metadata and f-string debug text containing comments.
gh-153578: Fix an out-of-bounds write in bytearray.extend() when the bytearray \ 
is resized while the argument’s __buffer__() is being acquired, for example by \ 
another thread. Patch by tonghuaroot.
gh-148817: Fold large constant list and set literals used as the iterable of a \ 
for loop or in/not in test into a constant tuple or frozenset, restoring an \ 
optimization previously done by the AST optimizer that was lost when constant \ 
folding moved to the CFG.
gh-146096: Fixed segmentation fault when called repr for BaseExceptionGroup with \ 
empty or 1-size tuple args.
gh-85260: compile() now raises ValueError instead of crashing on a debug build \ 
if an identifier field of an AST node (such as the name of a function, a class, \ 
an imported module or a caught exception) is "None", "True" \ 
or "False".

Library

gh-158169: Fix zlib.Decompress.unconsumed_tail duplicating unused_data after end \ 
of stream when max_length was used.
gh-157788: Fix python -m asyncio ps failing on a process that has a task with a \ 
name longer than 255 characters.
gh-157660: Fix _remote_debugging reporting errors or incorrect line numbers in \ 
free-threaded builds when a thread-local bytecode array grows or gains entries \ 
after being cached.
gh-157672: Fix tkinter on macOS: creating a Tk instance no longer replaces the \ 
Python handlers of SIGINT, SIGHUP and SIGTERM with Tk’s handler which exits \ 
the process, so Ctrl-C raises KeyboardInterrupt again.
gh-157639: Fix a crash in cProfile when an external timer re-enters the \ 
profiler. Profiling events raised while the external timer runs are now ignored.
gh-69919: code.InteractiveInterpreter.runsource() and the REPL now report any \ 
exception raised by compiling the source, such as MemoryError or RecursionError \ 
for too deeply nested source, instead of propagating it or printing a traceback \ 
of the REPL internals.
gh-157451: Fix gettext plural form selection when the Plural-Forms expression \ 
combines the unary ! operator with a binary operator, for example !n + 1 or 2 * \ 
!n. The latter raised SyntaxError.
gh-157335: Fix out-of-bounds write in mmap.mmap.__setitem__ that could occur \ 
when converting the index or the assigned value (via __index__() for a single \ 
item, or via the buffer protocol for a slice) resized or closed the mmap object \ 
during the assignment.
gh-157406: Fix the Python implementation of xml.etree.ElementTree.XMLParser: the \ 
doctype() method of the target is now called for a document type declaration \ 
without an external identifier, like <!DOCTYPE html>, as in the C \ 
implementation.
gh-128509: marshal.load() and marshal.loads() can now get 1-byte string \ 
singletons. Patch by Victor Stinner.
gh-157325: Fix an out-of-bounds read in the hz incremental decoder when the \ 
input ends with ~.
gh-157213: Fix asyncio.gather() leaving stale await-graph edges on children that \ 
outlive it.
gh-156002: zipfile again reads members through a third-party decompressor \ 
installed by monkey-patching the private _get_decompressor() to return an object \ 
that only implements old BZ2Decompressor API from Python 3.3. Note that \ 
decompressors without needs_input and two-argument decompress() are vulnerable \ 
to CVE 2026-15310.
gh-157159: The usage message printed by python -m tabnanny when no arguments are \ 
given now suggests python -m instead of the source file.
gh-123018: Fix readline.write_history_file() and readline.append_history_file() \ 
producing a history file that readline.read_history_file() could not load when a \ 
limit was set with readline.set_history_length() and Python was built against \ 
libedit. This works around NetBSD PR 60322.
gh-157058: asyncio.wait_for() with a non-positive timeout now records the waiter \ 
in the call graph.
gh-156933: Fix incorrect integer return values from ctypes callbacks on some \ 
platforms, such as s390x.
gh-157048: Preserve the position and contents of io.BytesIO when \ 
BytesIO.__init__() fails because a buffer is exported.
gh-156961: Fix tkinter.font.nametofont() and the tkinter.font.Font constructor \ 
for a font name returned by Tk as a Tcl object, for example by \ 
ttk.Style.lookup().
gh-156988: asyncio.print_call_graph() no longer truncates the call stack at a \ 
synchronous generator.
gh-156970: Set the docstring of unittest.mock.Mock.return_value.
gh-156946: Fix a crash in curses.panel when the finalizer of a panel’s user \ 
pointer runs while the panel is being deallocated. The panel is now taken off \ 
the panel stack before its user pointer is dropped.
gh-156797: Fix xml.sax.saxutils.XMLGenerator: the namespace URI is now escaped \ 
in the namespace declaration. Previously a URI containing &, < or a quote \ 
character produced a document which cannot be parsed.
gh-83895: xml.etree.ElementTree now accepts input larger than 2 GiB in the C \ 
implementation. The data is fed to Expat in chunks, as xml.parsers.expat already \ 
did, instead of raising OverflowError.
gh-99064: Fix xml.etree.ElementTree.parse() with a text file or other source of \ 
str data in the C implementation. The encoding declared in the document was \ 
applied to the already decoded text, which produced mojibake. It is now ignored, \ 
as when parsing with XMLParser.feed() or fromstring().
gh-156713: Fix nturl2path.pathname2url() and nturl2path.url2pathname(): the \ 
filesystem encoding and error handler are now used for percent-encoding and \ 
decoding, as in urllib.request. Previously paths containing surrogate characters \ 
raised UnicodeEncodeError.
gh-127057: Fix asyncio.ProactorEventLoop UDP transports so that a \ 
ConnectionResetError raised by WSARecvFrom no longer stops the read loop.
gh-156658: xml.dom and xml.etree.ElementTree no longer treat characters which \ 
are not white space in XML (such as U+00A0) as white space. Previously they \ 
could be lost in indent(), canonicalize() with strip_text=True, and when parsing \ 
with the whitespace-in-element-content feature turned off.
gh-156512: Fix asyncio losing a connection twice when resume_writing() closes \ 
the transport.
gh-156523: Fix asyncio.as_completed() not recording the awaiting task in the \ 
call graph.
gh-156476: The pure Python implementation of queue.SimpleQueue.get() now ignores \ 
timeout when block is false, matching the documented behavior and the C \ 
implementation. It previously raised ValueError.
gh-156444: Fix matching of a negated character set in a bytes pattern compiled \ 
with both re.IGNORECASE and re.LOCALE. The case closure is now applied to the \ 
members of the set, so that [^bc] no longer matches b'B'.
gh-156408: Fix asyncio.print_call_graph() raising AttributeError when called on \ 
a task that has already finished.
gh-156353: Fix configparser parsing when using whitespace in delimiters.
gh-156166: ssl: A failed assignment or deletion of the _msg_callback attribute \ 
of ssl.SSLContext no longer removes the current callback. Deleting it now raises \ 
AttributeError instead of TypeError.
gh-156173: Calling zlib.Decompress.flush() on invalid compressed data now raises \ 
zlib.error instead of being silently ignored.
gh-152817: sqlite3: Disallow removing the row_factory attribute of a cursor to \ 
prevent a crash on a query.
gh-156124: Fix a crash in the free-threaded build when deleting the contents \ 
attribute of a ctypes pointer.
gh-156112: _ios_support no longer fails to import when \ 
ctypes.util.find_library() cannot resolve the ObjC runtime through the dyld \ 
shared cache, as is the case on iOS 13. The runtime is now loaded by name, which \ 
dyld resolves against the cache directly.
gh-156101: Fix sqlite3.Cursor.arraysize being set to 0 if the assigned value is \ 
too large. The attribute is now left unchanged if the assignment fails.
gh-156100: Fix crashes in sqlite3.Connection when deleting the autocommit \ 
attribute or setting it to an integer which does not fit in C long. Both now \ 
raise an exception.
gh-156099: Fix a crash when deleting the keylog_filename attribute of \ 
ssl.SSLContext. It now raises AttributeError.
gh-156067: Fix error handling in the zoneinfo accelerator module when a \ 
transition index is -1 or a TZ string’s __bool__ raises.
gh-155997: Fix concurrent.interpreters.list_all(). It failed if an interpreter \ 
was destroyed during the call, in particular by a garbage collection which \ 
finalized the object owning the last reference to it.
gh-155941: Fix asyncio.start_server() when a plain-function client_connected_cb \ 
raises: the error is now reported like the coroutine case and the transport is \ 
closed, instead of leaving the connection open forever (which also made \ 
asyncio.Server.wait_closed() hang).
gh-155952: Fix the signatures of sqlite3.Connection.execute(), warnings.warn() \ 
and locale.setlocale() which rendered <unrepresentable> instead of the \ 
correct defaults for parameters.
gh-155888: Fix asyncio.WriteTransport.writelines() hanging the transport when \ 
the last data chunk is empty.
gh-155775: Fix a regression in imaplib introduced in the fix for gh-63121: \ 
refreshing the capabilities after a successful login() or authenticate() \ 
consumed the CAPABILITY response, so it could no longer be read with response().
gh-113318: Fix crashes when deleting an attribute whose setter is generated by \ 
Argument Clinic and is not prepared for deletion, among them \ 
frame.f_trace_opcodes and the context, owner and session attributes of \ 
_ssl._SSLSocket. Deleting such attribute now raises AttributeError.
gh-155468: Fix netrc to distinguish empty quoted tokens from end-of-file, so \ 
malformed files no longer cause the remaining content to be silently ignored.
gh-155519: Avoid a data-race in free-threaded builds when reading and writing \ 
context variables from different threads.
gh-155336: Fix error handling in socket.gethostbyaddr() and \ 
socket.gethostbyname_ex() when hostname resolution fails.
gh-102475: Fix os.path.realpath() on Windows: the unresolved part of the path is \ 
now appended, not joined, so a file name which looks like a drive (e.g. \ 
spam:eggs) no longer discards the resolved part. A path relative to another \ 
drive is now resolved against the root directory of that drive.
gh-89760: Fix os.path.realpath() on Windows: the \\?\ prefix is no longer \ 
stripped from a volume GUID path, which made the result invalid.
gh-84419: Fix os.stat() on Windows: trailing dots and spaces, which are ignored \ 
by the operating system, are no longer taken into account when the execute \ 
permissions are guessed from the file extension.
gh-155319: warnings.warn_explicit() now displays the source line taken from the \ 
loader of the module whose globals are passed as module_globals. It also no \ 
longer raises IndexError if lineno is out of the range of the module source.
gh-123011: warnings.warn_explicit() no longer emits a spurious \ 
DeprecationWarning or raises ImportError when it is called with the globals of \ 
the __main__ module.
gh-69370: python -m inspect --details no longer fails with UnicodeEncodeError if \ 
the path of the module contains characters unencodable in the encoding of \ 
sys.stdout. Such characters are now escaped with backslashes.
gh-69371: Fix pydoc for modules whose path contains undecodable bytes. \ 
pydoc.writedoc() and the pydoc HTTP server no longer fail with \ 
UnicodeEncodeError: the file URL is now percent-encoded using the filesystem \ 
encoding, and characters unencodable in the generated HTML page are escaped with \ 
backslashes.
gh-155143: Fix asyncio.shield() leaking the calling task via the await-graph and \ 
callbacks when called on a future that never resolves.
gh-154871: Fixed a crash in asyncio.Task.get_context() when called on an \ 
uninitialized task.
gh-154855: Fix curses.window.instr() returning one character too few when the \ 
curses module is built against a curses library that counts the terminator in \ 
the requested length, such as the NetBSD one.
gh-135683: logging.FileHandler and logging.handlers.WatchedFileHandler now honor \ 
logging.raiseExceptions for errors that occur while opening the file, like for \ 
other errors during logging.
gh-153970: Calling str() on a subprocess.CalledProcessError no longer raises \ 
TypeError when its returncode is not an integer, such as None.
gh-153005: concurrent.interpreters.Queue.get() and \ 
concurrent.interpreters.Queue.put() now compute their timeout deadline from \ 
time.monotonic() instead of the wall clock, so adjusting the system clock during \ 
the call no longer makes them over- or under-wait.
gh-153772: isinstance() checks against collections.abc classes such as Mapping \ 
no longer raise AttributeError when the instance has no __class__. The abstract \ 
base class machinery now falls back to the object’s type in that case, \ 
matching the behaviour of the built-in isinstance().
gh-81241: Fix OSError when importing ctypes from a statically linked interpreter.
gh-153603: Fix a crash in the ISO-2022 decoders when decoding a byte after an \ 
unknown charset designation is set via the decoder’s setstate method. Patch by \ 
tonghuaroot.
gh-153539: Fix a crash in the C implementation of io.TextIOWrapper.tell() when \ 
the decoder’s getstate method triggers a reentrant seek, or when another \ 
thread seeks the same stream concurrently. Patch by tonghuaroot.
gh-152907: Restore cooked-mode terminal output flags around PyOS_InputHook \ 
callbacks in the new REPL (_pyrepl), so that output written by an input hook \ 
(for example a GUI toolkit event loop) is no longer emitted with OPOST disabled \ 
and keeps its carriage returns.
gh-153319: The turtledemo viewer now reads each demo script as UTF-8 instead of \ 
the locale encoding.
gh-153133: Fix a socket leak in asyncio.loop.create_connection() when the \ 
transport cannot be created.
gh-152068: Fixes a bug when a line was split (particularly on macOS \ 
Terminal.app) in the middle of a colorized keyword, causing the ANSI Color Reset \ 
sequence (ESC0m) to not be properly printed, causing the output to be colored \ 
when it shouldn’t
gh-152204: Fix the pure-Python implementations of datetime.date.fromisoformat(), \ 
datetime.time.fromisoformat() and datetime.datetime.fromisoformat() silently \ 
accepting some malformed ISO 8601 strings, such as non-ASCII digits or a sign in \ 
a fixed-width field (for example '2020+12' or \ 
'20201212T0102٣٤'). Each field is now required to be exactly N ASCII \ 
digits, matching the C implementation.
gh-151955: Allow more types to be used in the bound argument to typing.ParamSpec.
gh-150771: Fix serialization of email messages using the shift_jis or euc-jp \ 
charsets: set_content() now encodes the payload using the output charset, so \ 
str(m) no longer raises UnicodeEncodeError.
gh-145856: Fix plistlib.dumps() and plistlib.dump() so that skipkeys=True \ 
together with sort_keys=True correctly drops non-string keys when the dictionary \ 
contains a mix of string and non-string keys. Previously the sort ran before the \ 
filter and raised TypeError.
gh-140729: Fix a pickling error in the cProfile module when profiling a script \ 
that uses multiprocessing.Process with the spawn and forkserver start methods.
gh-113329: Fix OSError being raised when trying to run doctests on a class \ 
objects in the REPL. Patch by Sten Wessel.
gh-102967: A bug in doctest._SpoofOut.truncate() was causing None to be passed \ 
to StringIO.seek() when no size was given. A simple fix skips the seek call when \ 
no size is given so the buffer can be truncated from the current position.
gh-82039: http.cookiejar.FileCookieJar.load() now checks the first, format \ 
signature line in a case-insensitive manner. Patch by Ashley Harvey.
gh-70758: Creating a new turtle screen after the previous one was closed no \ 
longer raises turtle.Terminator on the first turtle command.
bpo-44012: The exploded attribute of ipaddress.IPv6Address and \ 
ipaddress.IPv6Interface now supports addresses with a scope ID (link-local \ 
addresses). Previously the former raised AddressValueError and the latter \ 
omitted the scope ID.
gh-83869: Fix tarfile reading an archive with a GNU sparse 1.0 member whose size \ 
is set in the pax extended header. The offset of the next header was computed \ 
from the offset of the data, which is already past the sparse map, and from the \ 
size of the member, which can be the apparent size of the sparse file. All \ 
following members were unreachable.
gh-61366: http.cookiejar.MozillaCookieJar now reads session cookies written by \ 
curl and Wget, which use 0 in the expiration time field. Contributed by \ 
Jérémie Detrey.

Documentation

gh-57491: Reduce the depth of the table of contents in the EPUB documentation \ 
from three levels to two, making it much shorter and easier to navigate in \ 
e-book readers.
   2026-08-05 17:56:04 by Adam Ciarcinski | Files touched by this commit (9) | Package updated
Log message:
python314 py314-html-docs: updated to 3.14.7

Python 3.14.7 final

Security
gh-153030: Fixed quadratic complexity in incremental parsing of long \ 
unterminated constructs (such as tags or comments) in html.parser.HTMLParser, \ 
which could be exploited for a denial of service.
gh-152674: The xml.etree.ElementTree.Element methods findall(), iterfind() and \ 
find() avoid quadratic behavior when using XPath index predicates ([1], \ 
[last()], [last()-N]) on XML documents with many same-tag siblings.
gh-152216: Update bundled libexpat to version 2.8.2.
gh-151987: The tarfile.TarFile.extract() method now applies the given filter \ 
when it extracts a link target from the archive as a fallback.
gh-151981: In tarfile, seeking a stream now stops when end of the stream is reached.
gh-151544: Modules/Setup.local is no longer used as a landmark to discover \ 
whether Python is running in a source tree, as it could potentially affect \ 
actual installs. The pybuilddir.txt file is now the sole indicator of running in \ 
a source tree.
gh-151558: Fixed an vulnerability in the tarfile data and tar extraction filters \ 
where crafted archives could create a symlink pointing outside the destination \ 
directory. This was a bypass of CVE 2025-4330.
gh-150743: http.client now limits the number of chunked-response trailer lines \ 
it will read to 100, and the number of interim (1xx) responses it will skip to \ 
100. A malicious or broken server could previously stream trailer lines or 100 \ 
Continue responses forever, hanging the client even when a socket timeout was in \ 
use. Reported by @YLChen-007 via GHSA-w4q2-g22w-6fr4.
gh-143927: Normalize all line endings (CR, CRLF, and LF) to LF+TAB when writing \ 
multi-line configparser values.
gh-143921: Reject NUL, CR and LF characters in IMAP commands. Other control \ 
characters are allowed and sent quoted.
Core and Builtins
gh-133931: Fix data races when setting attributes of function objects on the \ 
free threaded build.

gh-154709: Fix an out-of-bounds access in reverse dictionary iterators when the \ 
underlying dictionary is cleared and modified after the iterator is created.

gh-154695: Fix asyncio.Task raising AttributeError when created with \ 
eager_start=True and no explicit loop argument.

gh-153809: Fix interpreter crash while deallocating objects of asyncio.Task on \ 
free-threaded builds. Contributed by Sergey Miryanov.

gh-154275: Fix a crash when getting deeply nested __parameters__ from a \ 
types.GenericAlias objects.

gh-153932: Fix thread safety issue in the __reduce__ method of enumerate.

gh-153298: Fixes a data race in types.GenericAlias __parameters__ initialization \ 
on free-threading builds.

gh-153205: Fix a potential SystemError during vector calls when memory \ 
allocation fails. A MemoryError is now raised instead.

gh-152682: Fix NULL pointer dereference in compile() when a reserved name (e.g. \ 
__classdict__) is used as a type parameter name and memory allocation fails \ 
while formatting the error message.

gh-152635: Fix a crash caused when running out of memory creating a \ 
_interpchannels channel. Now a MemoryError is correctly raised.

gh-152375: Fix undefined behaviour when a sys.monitoring callback raised an \ 
exception while the program was following a branch or loop.

gh-152235: Defer GC tracking of set.intersection(), set.difference(), \ 
set.symmetric_difference(), set.union() and set.__sub__. Patch by Donghee Na.

gh-152235: Defer GC tracking of a set or frozenset to the end of its \ 
construction from iterable. Patch by Donghee Na.

gh-152228: Fix an assertion failure when python is built in a debug mode that \ 
happened in str.replace() under a limited memory situation.

gh-151763: Fixes possible crash on types.CodeType deallocation.

gh-152020: On the free-threaded build, asyncio.all_tasks() no longer loses \ 
eager-started tasks when called from a thread other than the one running the \ 
event loop.

gh-151763: Fix a potential crash in compile(), exec(), eval() and ast.parse() \ 
when an allocation fails: the parser or compiler could return without setting an \ 
exception.

gh-151912: Fixed a crash in type() when selecting a metaclass whose tp_new slot \ 
is NULL. Such metaclasses are now rejected with TypeError instead of causing a \ 
NULL pointer dereference.

gh-151905: Fix OOM error handling in PyFrame_GetBack() to propagate exceptions \ 
instead of masking them as None.

gh-151773: Fix a crash in contextvars.ContextVar.set() when memory allocation fails.

gh-151126: Fix a crash when sharing memoryview objects between interpreters \ 
fails due to running out of memory. It now raises a proper MemoryError.

gh-151644: Fix a data race in sys.setdlopenflags() and sys.getdlopenflags() when \ 
called concurrently in the free-threaded build. The underlying \ 
_PyImport_GetDLOpenFlags and _PyImport_SetDLOpenFlags functions now use atomic \ 
load/store operations.

gh-151126: Avoid possible crash in _winapi.c where a device has no memory left. \ 
Now it properly raises a MemoryError. Patch by Ivy Xu.

gh-151546: Fix the stack limit check if Python is linked to musl (ex: Alpine \ 
Linux). Use the stack size set by the linker to compute the stack limits. Patch \ 
by Victor Stinner.

gh-151461: Fix direct execution of files with invalid source encodings to report \ 
the underlying codec lookup or decoding error instead of the generic \ 
SyntaxError: encoding problem message. Patch by Bartosz Sławecki.

gh-151218: PyConfig_Set() and sys.set_int_max_str_digits() now replace sys.flags \ 
(create a new object), instead of modifying sys.flags in-place. Patch by Victor \ 
Stinner.

gh-151253: If import encodings (first import) fails at Python startup, dump the \ 
Python path configuration to help users debugging their configuration. Patch by \ 
Victor Stinner.

gh-151238: Fix a crash when compiling a concatenated f-string or t-string if an \ 
error occurs when processing one of it’s parts.

gh-151126: Fix a crash, when there’s no memory left on a device, which \ 
happened in _interpchannels module.

Now it raises proper MemoryError errors.

gh-150902: Apply an existing optimization of PyCriticalSection (single mutex) to \ 
PyCriticalSection2: avoid acquiring the same locks that the current CS has \ 
already acquired.

gh-151065: Fix memory leak when using the mimalloc memory allocator.

gh-151029: On Linux, fix sys.remote_exec() unable to find remote writable memory \ 
when libpython replaced on disk.

gh-150988: Fix a reference leak in OSError when attributes are set before \ 
super().__init__().

gh-144774: Fix data race in BaseException when an exception is copied while \ 
being mutated.

gh-150411: Fix a data race in the free-threaded build when gc.get_count() reads \ 
the young generation allocation count while another thread updates it.

gh-149689: Fix missing error propagation in parser action helpers when memory \ 
allocation fails. Patch by Thomas Kowalski.

gh-149162: Fix a potential deadlock in PyUnicode_InternFromString() and other \ 
interning functions in the free-threaded build when called from C++ static local \ 
initializers.
Library
gh-155009: Fix argparse.ArgumentParser to preserve the program name from \ 
sys.argv[0] when a named module is executed as the main program without \ 
replacing sys.argv[0].

gh-155063: Bump the version of pip bundled in ensurepip to version 26.2.1

gh-155063: Bump the version of pip bundled in ensurepip to version 26.2

gh-154936: Fix the pure Python json decoder to report the correct position for \ 
invalid literal control characters in JSON strings.

gh-154892: Fix a bug in the C accelerator for zoneinfo where datetime.datetime \ 
subclasses returning -1 for hour, minute, or second could incorrectly raise a \ 
SystemError.

gh-154848: The pickle C accelerator now enforces frame boundaries when \ 
unpickling, as the pure Python implementation already did. An argument that \ 
straddles a frame boundary, or a frame that begins before the previous one has \ 
ended, now raises pickle.UnpicklingError instead of being silently read across \ 
the boundary. This prevents the loaded data from diverging from the pickletools \ 
disassembly of the same pickle.

gh-109638: Fix exponential time in csv.Sniffer.sniff() for a sample which \ 
contains many quote characters. A doubled quote character is now also detected \ 
in a field which contains the delimiter or a line break.

gh-98820: Fix quadratic time in csv.Sniffer.sniff() for a sample which contains \ 
quoted fields, in particular for a single column of quoted fields.

gh-154738: Fix ExternalEntityParserCreate() not propagating the reparse-deferral \ 
setting to the subparser, which left GetReparseDeferralEnabled() returning an \ 
uninitialized value. Patch by tonghuaroot.

gh-93251: Fix UnicodeDecodeError in socket functions (such as getaddrinfo() and \ 
gethostbyaddr()) when the localized error message of the C library is not UTF-8: \ 
decode it from the locale encoding.

gh-154551: Fix ctypes.util.find_library() returning None in non-UTF-8 locales.

gh-79366: Fixed a race condition in logging: if a handler was removed while a \ 
record was being emitted, the following handlers of the same logger could be \ 
skipped.

gh-73458: Fix logging.config.listen(): it left the caller waiting for the ready \ 
event forever if the server could not be started, for example if the port was \ 
invalid or already in use. It now also binds to an IPv6 address if the host has \ 
no IPv4 address, for example if localhost is only aliased to ::1.

gh-154460: Fix time.strftime() and datetime.datetime.strftime() returning a \ 
wrong ISO 8601 week number (%V) on OpenBSD.

gh-154435: Fix os.posix_fadvise() and os.posix_fallocate() on DragonFly BSD: \ 
they raised OSError with a meaningless error code, because these functions \ 
return -1 and set errno there.

gh-154399: Fix venv activation in a non-interactive csh: activate.csh no longer \ 
fails when the prompt variable is not set.

gh-154389: Fix uuid.uuid1() on OpenBSD: it returned a version 4 UUID, because \ 
uuid_create() generates random UUIDs on this platform.

gh-154324: Fix os.sendfile() on illumos: it no longer reports a successful \ 
transfer when the underlying system call failed without writing any data.

gh-154307: Fix tempfile.TemporaryDirectory.cleanup() on DragonFly BSD, where \ 
removing a file with the UF_NOUNLINK flag failed with EISDIR instead of EPERM.

gh-154291: Fix socket.has_dualstack_ipv6() to return False on platforms such as \ 
DragonFly BSD where setting IPV6_V6ONLY to 0 silently has no effect.

gh-154283: On DragonFly BSD, threading.get_native_id() now returns a value that \ 
is unique across processes, matching the other platforms.

gh-154258: Fix a crash in mmap.mmap.resize() on NetBSD when growing a shared \ 
anonymous mapping. resize() now raises ValueError in this case, as it already \ 
did on Linux.

gh-131565: ctypes.util.dllist() now works on NetBSD. It is implemented in the \ 
_ctypes extension module so that dl_iterate_phdr() reports all loaded shared \ 
libraries: on NetBSD it only reports the link-map group of the calling object, \ 
which excluded them when called through ctypes.

gh-154225: Fix os.openpty() on Solaris and illumos: it no longer leaves the \ 
pseudo-terminal as the controlling terminal of the calling process.

gh-154227: Fix os.posix_openpt() on OpenBSD, where it rejected the O_CLOEXEC flag.

gh-145030: Fix asyncio write pipe transports for named FIFOs on macOS and \ 
Solaris. Unread data sitting in the FIFO made the transport misinterpret a poll \ 
event as the reader disconnecting, wrongly closing the transport.

gh-154001: Fix random.binomialvariate() raising ZeroDivisionError when \ 
random.random() returns zero.

gh-153908: Fix data race when calling repr() on itertools.count under the \ 
free-threaded build.

gh-153896: Deduplicate unhashable args in typing.Literal.

gh-153864: On a wide curses build, curses.window.insch() now inserts a non-ASCII \ 
byte as the character it encodes in the window’s encoding, consistently with \ 
addch(), instead of its code point.

gh-153862: On a wide curses build, curses.window.inch() now returns the \ 
locale-encoded byte of a non-ASCII character, matching instr(), instead of the \ 
low byte of its code point.

gh-146011: Fix a heap-use-after-free in the C implementation of decimal when \ 
calling repr() after deleting the Context.

gh-153761: Fix cancelling asyncio.loop.sock_accept() dropping a pending connection.

gh-153695: Hashing a sqlite3.Row that contains an unhashable value now raises \ 
TypeError instead of SystemError. Patch by tonghuaroot.

gh-127049: Fix a race condition in asyncio on Unix where \ 
asyncio.subprocess.Process.send_signal(), terminate() or kill() could signal an \ 
unrelated process that was recycled onto the PID of the already-reaped child \ 
when ThreadedChildWatcher is used. Patch by Kumar Aditya.

gh-153658: Fix sqlite3.Connection.iterdump() raising sqlite3.OperationalError \ 
when a table name contains a single quote. Patch by tonghuaroot.

gh-85943: Fix struct functions raising BytesWarning under the -bb command line \ 
option when a str format is used after an equal bytes format (or vice versa). \ 
The internal format cache no longer mixes str and bytes keys.

gh-153404: urllib.robotparser.RobotFileParser now silently ignores a Crawl-delay \ 
or Request-rate value written with non-decimal digits (such as U+00B2 \ 
SUPERSCRIPT TWO) instead of raising ValueError and aborting the parse of the \ 
whole robots.txt file.

gh-153417: Error messages from imaplib.IMAP4.select() and imaplib.IMAP4.uid() no \ 
longer raise BytesWarning under -bb when the mailbox or command argument is \ 
bytes.

gh-153406: email.utils.parsedate_to_datetime() now raises ValueError instead of \ 
OverflowError when the parsed year or timezone offset is out of range, matching \ 
its documented behavior.

gh-153083: Defer GC tracking of an array.array to the end of its construction. \ 
Patch by Donghee Na.

gh-153292: Fix data race in repr of threading.RLock in free-threading build.

gh-143990: A tkinter.font.Font created from a named font, including by copy(), \ 
now copies its configured options rather than the options resolved by Tcl’s \ 
font actual, preserving a size specified in pixels (a negative size).

gh-148286: Fix undefined behavior in \ 
compression.zstd.ZstdDecompressor.unused_data when a complete frame was \ 
decompressed in a single call.

gh-153210: Fix crash on array import under a memory pressure.

gh-153200: Fix math.isqrt() returning an incorrect result for arguments not less \ 
than 2**64 that are instances of an int subclass with an overridden comparison \ 
operator.

gh-153068: Fix cProfile.Profile.enable() to no longer overwrite errors from \ 
sys.monitoring.

gh-153062: Fix a crash when concurrently iterating an itertools.tee() iterator \ 
on the free-threaded build.

gh-153056: Fix string.Template raising a spurious ValueError when the pattern \ 
attribute is a compiled regular expression object, which the documentation \ 
allows. On the free-threaded build this also occurred as a data race on the \ 
first concurrent use.

gh-153037: Fix ZstdFile raising AttributeError instead of \ 
io.UnsupportedOperation when iterating over a file that is not open for reading.

gh-135661: Fix html.parser.HTMLParser: an abruptly closed empty comment \ 
(<!--> or <!--->) no longer extends up to a later --> in the same \ 
feed() call.

gh-152851: Prevent a crash when allocation fails while copying a BLAKE-2s/2b \ 
object. Patch by Bénédikt Tran.

gh-54930: Error responses of http.server.BaseHTTPRequestHandler to malformed \ 
request lines now include a status line and headers instead of being sent in the \ 
bare HTTP/0.9 style. Only a valid HTTP/0.9 request (a two-word GET request line) \ 
now receives an HTTP/0.9 style response.

gh-119592: Fix concurrent.futures.ProcessPoolExecutor stranding submitted work \ 
forever when a worker process exited upon reaching its max_tasks_per_child limit \ 
after shutdown() was called with wait=False: a replacement worker is now spawned \ 
and the remaining work executed as documented. If the executor has instead been \ 
garbage collected without shutdown() (gh-152967), or a replacement worker cannot \ 
be started, the remaining futures now fail with BrokenProcessPool instead of \ 
never resolving. A worker exit racing shutdown(wait=False) can also no longer \ 
crash the executor management thread.

gh-152951: collections.deque prevent rare crash when calling extend under high \ 
memory pressure conditions.

gh-150880: Normalize non-extended Windows paths before appending the wildcard \ 
used by os.listdir() and os.scandir(), making paths with trailing spaces behave \ 
consistently with other filesystem APIs.

gh-152849: Out-of-range float and integer timestamps now raise OverflowError \ 
with the same message. Patch by tonghuaroot.

gh-152847: Reject a POSIX TZ transition rule with non-digit characters in the \ 
day-of-year field in the pure-Python zoneinfo parser. Patch by tonghuaroot.

gh-108280: Connecting imaplib to a server that does not send a valid IMAP4 \ 
greeting (for example a POP3 server answering on the IMAP port) now raises an \ 
error reporting the server’s response instead of imaplib.IMAP4.error: None.

gh-63121: imaplib now refreshes the cached capability list after a successful \ 
login() or authenticate(), using the CAPABILITY response sent by the server or, \ 
if none was sent, by querying it, so that capabilities that become available \ 
only after authentication (such as ENABLE on Gmail) are recognized. Capabilities \ 
advertised in the server greeting are now also used, avoiding a redundant \ 
CAPABILITY command.

gh-88574: imaplib no longer fails when a server sends a spurious blank line \ 
after the counted data of a literal, including after a literal that terminates a \ 
response (such as a mailbox name returned by LIST). Such blank lines are now \ 
skipped without swallowing the following line.

gh-152502: Detect the curses mouse interface (getmouse(), the BUTTON* constants, \ 
and others) with a configure capability probe or library macros instead of \ 
gating it on ncurses-specific macros. It is now also available with other curses \ 
implementations that provide it, such as NetBSD curses and PDCurses (the latter \ 
underpins windows-curses).

gh-151842: Fix a crash in _interpreters.capture_exception() when MemoryError \ 
happens. Patch by Amrutha Modela.

gh-40038: imaplib now again quotes command arguments when necessary, for example \ 
mailbox names containing a space. Such quoting was inadvertently disabled when \ 
the module was ported to Python 3, and the arguments are now quoted according to \ 
the RFC 3501 grammar. For backward compatibility, an argument already enclosed \ 
in double quotes is left unchanged, so code that quotes arguments itself keeps \ 
working.

gh-50966: Fix unbounded recursion in turtle when a mouse event handler that \ 
moves the turtle is reentered while the screen is being redrawn, for example \ 
with screen.ondrag(turtle.goto). This could previously crash the interpreter.

gh-152569: Fix asyncio.wait() leaking waiting tasks via the await-graph when \ 
racing a future that never resolves. The waiting task is now discarded from \ 
every future’s awaited_by set once wait() returns, even for pending futures.

gh-78335: Update the docstrings of tkinter and tkinter.ttk widget classes to \ 
list all supported widget options, including options added in Tk 9.0 and 9.1. \ 
tkinter.Menubutton and tkinter.Message previously had no option list at all.

gh-152431: Fix asyncio.StreamWriter.start_tls() to keep the linked StreamReader \ 
transport in sync with the upgraded transport.

gh-151126: Fix two crashes in tkinter and socket modules initialization under a \ 
memory pressure. Sets missing MemoryError.

gh-133031: curses.textpad.Textbox now enters and reads back the non-ASCII \ 
characters of an 8-bit locale encoding, instead of mangling them with a 7-bit \ 
mask.

gh-71880: curses.textpad.Textbox now lets the lower-right cell of the window be \ 
edited. Writing it with addch() would move the cursor past the end of the \ 
window, raising an error and scrolling a scrollable window, so it is now written \ 
with insch(), which keeps the cursor in place.

gh-83274: Deallocating a tkinter application from a thread other than the one it \ 
was created in no longer crashes the interpreter. The underlying Tcl interpreter \ 
is leaked instead, and a RuntimeWarning is reported.

gh-152305: Fix the pure-Python datetime.time.strftime() implementation raising \ 
AttributeError for the year directives. Patch by tonghuaroot.

gh-88758: tkinter.Misc.focus_get(), focus_displayof(), focus_lastfor() and \ 
winfo_containing() now return None instead of raising KeyError when the widget \ 
was not created by tkinter (for example a torn-off menu).

gh-38464: tkinter.Misc.nametowidget() now resolves the auto-generated names of \ 
cloned menus (a menu used as a menubar or a cascade) back to the original \ 
widget.

gh-152248: Make the C and pure-Python zoneinfo parsers validate POSIX TZ \ 
abbreviations consistently, rejecting unquoted abbreviations with non-letter \ 
characters and empty quoted abbreviations. Patch by tonghuaroot.

gh-80937: Fix a memory leak in tkinter when a Tcl command created with \ 
createcommand was not explicitly removed before the interpreter was deleted. The \ 
command no longer keeps the interpreter alive through a reference cycle.

gh-152246: Fix the pure-Python zoneinfo parser accepting an invalid POSIX TZ \ 
transition rule with a non-period separator. Patch by tonghuaroot.

gh-139816: Fix a hang in tkinter on interactive Python built without readline. \ 
An exception raised in a callback no longer causes the event loop to stop and \ 
wait for the user to press Enter; pending callbacks now keep running until input \ 
is actually available on stdin.

gh-139145: Fix a busy loop in tkinter on interactive Python. When a Tcl command \ 
running its own event loop (such as vwait or wait_variable()) was active and \ 
input arrived on stdin, the event loop kept spinning at 100% CPU. The stdin file \ 
handler is now removed as soon as input is available. Based on a patch by \ 
Michiel de Hoon.

gh-152212: Fix the pure-Python zoneinfo parser accepting a POSIX TZ string with \ 
a std abbreviation but no offset. This is invalid per POSIX and now raises \ 
ValueError, matching the C accelerator. Patch by tonghuaroot.

gh-152156: Fix a possible crash in concurrent.interpreters.create() under \ 
limited memory conditions.

gh-152157: The C implementations of fromisoformat() and fromisoformat() now \ 
reject a decimal separator that is not followed by any fractional digit before a \ 
timezone designator.

gh-151763: Fix crash in _interpqueues.create() whe MemoryError happens on queue \ 
creation.

gh-105895: Add match and case to the list of supported topics by help().

gh-152079: Fix datetime.datetime.fromisoformat() in the C implementation \ 
dropping the sub-second part of a UTC offset whose whole-second part is zero, \ 
matching the pure-Python implementation.

gh-152052: The json C accelerator now correctly reports an unterminated string \ 
for a \uXXXX escape at the end of the input.

gh-152060: Fix datetime.datetime.fromisoformat() raising AssertionError instead \ 
of ValueError for some malformed strings in the pure-Python implementation, \ 
matching the C implementation.

gh-126219: Fixed a crash in tkinter.Tk when className contains a non-BMP \ 
character and tkinter is built against Tcl/Tk 8.x. Such a name is now rejected \ 
with a ValueError.

gh-86165: Fix imaplib.Time2Internaldate() to use the local timezone offset for \ 
time.struct_time values with tm_gmtoff set to None, as returned by \ 
datetime.datetime.timetuple(). Contributed by Xiao Yuan.

gh-151814: Fix unbounded memory growth in io.TextIOWrapper when repeatedly \ 
writing an empty string.

gh-151770: Fix datetime.datetime.fromisoformat() raising AssertionError instead \ 
of ValueError for an out-of-range month combined with a 24:00 time.

gh-151665: inspect.signature() now works on the lazy evaluators of type aliases \ 
and type parameters instead of raising ValueError.

gh-151695: Fix a use-after-free in the curses module. The encoding of the \ 
initial screen, used by curses.unctrl() and curses.ungetch() to encode non-ASCII \ 
characters, is now kept as a private copy instead of a borrowed pointer to a \ 
window object that may be deallocated.

gh-151596: Add missing size positional argument to the pure-Python \ 
implementation of io.TextIOBase.readline().

gh-151640: Fix a data race in io.BytesIO in free-threaded builds when \ 
whole-buffer reads or peeks, or getvalue(), share the internal buffer with \ 
concurrent writes.

gh-148660: Fix a crash in collections.OrderedDict.copy() when a key’s __eq__ \ 
or a subclass method mutates the dict during the copy. Now raises RuntimeError \ 
instead, as iteration does.

gh-151497: Opening a tarfile archive no longer attempts to pre-allocate a huge \ 
buffer when a crafted or truncated member claims an oversized extended header (a \ 
GNU long name/link or a pax header). The extended header is now read in bounded \ 
chunks, so its size field can no longer trigger memory exhaustion.

gh-151403: Fixed a crash in subprocess.Popen (and _posixsubprocess.fork_exec) \ 
when an argv item’s __fspath__() concurrently mutates the args sequence being \ 
converted.

gh-151390: Colorize match in the REPL when followed by a unary + or - operator. \ 
Patch by Bartosz Sławecki.

gh-151126: Fix crash on unset MemoryError on allocation failure in \ 
ctypes.get_errno().

gh-151416: Fix a crash in os.spawnv() and os.spawnve() when an argv item’s \ 
__fspath__() method mutates the argv list during argument conversion. \ 
os.spawnv() argument conversion errors other than TypeError, such as the \ 
ValueError for an embedded null, are no longer replaced with a generic \ 
TypeError.

gh-151337: Avoid possible memory leak in tkinter.c on Windows.

gh-151126: Fix a crash when MemoryError in os._path_splitroot() was not set properly.

gh-151126: Fix a crash, when there’s no memory left on a device, which \ 
happened in _interpchannels module.

Now it raises proper MemoryError errors.

gh-119710: Fix asyncio subprocess wait() hanging when the process has exited but \ 
one of its pipes is kept open by an inherited child process (so the pipe never \ 
reaches EOF). wait() now returns as soon as the process exits, regardless of the \ 
pipes’ state.

gh-151295: Fixed a crash (use-after-free) in bytes.join() and bytearray.join() \ 
that could occur if an item’s __buffer__() concurrently mutates the sequence \ 
being joined. The mutation is now reported as a RuntimeError instead.

gh-109940: Fix Windows venv activation in cmd.exe to respect \ 
VIRTUAL_ENV_DISABLE_PROMPT.

gh-117807: Fix mimetypes initialization from MIME map files containing invalid \ 
UTF-8 bytes.

gh-150583: Correctly set the default compression level in compression.zstd when \ 
passing a digested dictionary during compression.

gh-150641: Fix bug where typing.evaluate_forward_ref() with the STRING format \ 
could leak internal names used by the annotation machinery.

gh-150484: Fix unittest.mock.mock_open() __exit__ raising TypeError when used \ 
with contextlib.ExitStack.

gh-149816: Fix a potential use after free condition in pickle.dumps() in \ 
free-threaded mode when serializing lists.

gh-149319: The asyncio REPL now ignores PYTHONSTARTUP and PYTHON_BASIC_REPL when \ 
-E or -I is used. Patch by Jonathan Dung.

gh-47005: Fix urllib.request.AbstractHTTPHandler.do_open() to give regular \ 
headers set via add_header() priority over unredirected headers, consistent with \ 
get_header() and header_items().

gh-123471: Make concurrent iteration over itertools.zip_longest safe under \ 
free-threading.

gh-123720: asyncio: Fix asyncio.Server.serve_forever() shutdown regression. \ 
Since 3.12, cancelling serve_forever() could hang waiting for a handler blocked \ 
on a read from a client that never closed (effectively requiring two interrupts \ 
to stop); the shutdown sequence now ensures client streams are closed so \ 
serve_forever() exits promptly and handlers observe EOF.

gh-123471: Make concurrent iteration over itertools.accumulate safe under \ 
free-threading.

gh-123471: Make concurrent iteration over \ 
itertools.combinations_with_replacement and itertools.permutations safe under \ 
free-threading.

gh-143988: Fixed crashes in socket.socket.sendmsg() and \ 
socket.socket.recvmsg_into() that could occur if buffer sequences are \ 
concurrently mutated.

gh-130796: Undeprecate the locale.getdefaultlocale() function. Patch by Victor \ 
Stinner.

gh-115634: Fix a deadlock in concurrent.futures.ProcessPoolExecutor when using \ 
max_tasks_per_child, present since the feature was introduced in Python 3.11. \ 
The executor stopped scheduling queued tasks after a worker process exited upon \ 
reaching its task limit. Based on a fix proposed by Tabrez Mohammed.

gh-140326: Fix the asyncio REPL namespace so that relative imports no longer \ 
resolve against the asyncio package and __file__ is no longer set.

gh-79638: Disallow all access in urllib.robotparser if the robots.txt file is \ 
unreachable due to server or network errors.

gh-123471: Make concurrent iterations over itertools.chain safe under free threading.

gh-123471: Make concurrent iterations over itertools.combinations and \ 
itertools.product safe under free-threading.

gh-123471: Make concurrent iterations over itertools.cycle safe under free-threading.

gh-120665: Fixed an issue where unittest loaders would load and instantiate \ 
unittest.TestCase-derived subclasses that are also abstract base classes, which \ 
can’t be instantiated.

gh-105708: Accept an uppercase V prefix in IPvFuture addresses in \ 
urllib.parse.urlsplit().

gh-103925: Fix csv.Sniffer.sniff() for a sample with \r\n line endings in which \ 
a quoted field ends a line: a letter could be detected as the delimiter.

gh-101267: When a worker process terminates unexpectedly, \ 
concurrent.futures.ProcessPoolExecutor now sets a separate BrokenProcessPool \ 
exception on each pending future instead of sharing a single instance among them \ 
all. Sharing one exception produced malformed tracebacks: each Future.result() \ 
call re-raised the same object, appending another copy of the traceback to it.
Documentation
gh-118150: Clarify in the difflib documentation what junk actually does, its \ 
drawbacks, and how to control it.
gh-86726: Greatly expand the tkinter documentation to cover the full public API \ 
of the package and its submodules. The descriptions are oriented towards Python \ 
rather than Tcl/Tk, with corrected return types and versionadded/versionchanged \ 
information.
Tests
gh-155109: Add test.support.run_with_limited_c_stack() and use it in tests that \ 
exhaust the C stack with a fixed number of recursive calls, so that their \ 
outcome no longer depends on the C stack size.
gh-76595: Add C API tests for PyCapsule_Import().
gh-154211: Add test.support.skip_if_huge_c_stack() and use it to skip tests that \ 
exhaust the C stack if the stack limit is very large (e.g. on DragonFly BSD or \ 
with ulimit -s unlimited).
gh-154167: The test runner (regrtest) now restores the default SIGINT handler if \ 
it was inherited as ignored, so the test suite no longer hangs when run as a \ 
shell background job.
gh-154144: Fix building the _testcapi module on NetBSD.
gh-152548: Add the test.support.isolation.runInSubprocess() decorator to run a \ 
test method or TestCase subclass in a fresh interpreter subprocess, isolated \ 
from the rest of the test run.
gh-151626: Fix several tests in test.test_inspect, test.test_import, \ 
test.test_importlib, test.test_py_compile and test.test_compileall that failed \ 
when the test suite was run with PYTHONPYCACHEPREFIX set. These tests now \ 
neutralize the pycache prefix where they assume the default __pycache__ bytecode \ 
layout.
gh-151096: Fix test_embed failing when CPython is configured with a split exec \ 
prefix (--exec-prefix differing from --prefix).
gh-148853: Fix tests failing on FreeBSD in test.support’s \ 
in_systemd_nspawn_sync_suppressed() due to unreadable /run directory.
Build
gh-154070: Build the curses module against a wide-character capable ncurses even \ 
when it is not named ncursesw – for example the pkgsrc ncurses on NetBSD and \ 
illumos, or the system ncurses on macOS. Such a library previously produced a \ 
narrow build.
gh-126877: Fix the configure check for Tcl/Tk which could wrongly succeed with \ 
optimizing compilers when the libraries are missing.
gh-153438: Update Windows build and installer tooling and documentation to use \ 
the current download URL for nuget.exe.
gh-152502: The curses module now detects set_escdelay(), set_tabsize() and the \ 
ESCDELAY and TABSIZE variables with configure capability probes instead of the \ 
ncurses-specific NCURSES_EXT_FUNCS macro, so they are exposed when building \ 
against other curses implementations such as NetBSD curses that provide them.
gh-148260: On Linux when Python is linked to the musl C library, use a thread \ 
stack size of at least 1 MiB instead of musl default which is 128 kiB. Patch by \ 
Victor Stinner.
gh-138800: Fix library name in python3.pc on Android.
Windows
gh-124111: Updated Windows builds to use Tcl/Tk 9.0.4.
gh-150836: Make installed tkinter work with Tcl/Tk 9 builds that embed the Tk \ 
script library in the Tk DLL on Windows.
gh-140146: Prevent tkinter from hanging on Windows if stdin is redirected to a \ 
pipe in an interactive session. This is helpful for testing interactive usage of \ 
tkinter from a script, for example as part of the cpython test suite.
macOS
gh-153711: On macOS, do not attempt to use the dup3(2) and pipe2(2) system calls \ 
introduced in macOS 27 to prevent problems when running on older systems.
gh-124111: Update macOS installer to use Tcl/Tk 9.0.4.
IDLE
gh-82183: When the shell is busy running code, using “Run… Customized” \ 
with “Restart shell” unchecked now reports that the shell is executing \ 
instead of restarting it anyway.
gh-83653: Blanking an integer entry in IDLE’s Settings dialog, such as “Auto \ 
squeeze min lines”, no longer saves an empty string as an invalid \ 
configuration value.
gh-65339: Saving the IDLE Shell or an Output window now defaults to a .txt \ 
extension and lists text files before Python files, since their content is not \ 
Python source.
gh-80504: The “In files:” field of IDLE’s Find in Files dialog now always \ 
contains a full directory path, even for an unsaved editor or the Shell. This \ 
shows in the grep output which directory was searched.
gh-134300: Do not add the idlelib directory to the path of the IDLE user \ 
process. User code run in IDLE can no longer import idlelib submodules as \ 
top-level modules, such as import help.
gh-89360: Fix a rare crash in the IDLE editor when the completion window is \ 
closed: deleting a key binding for a sequence that is not bound to the virtual \ 
event is now ignored instead of raising a ValueError.
gh-71956: Fix Replace All in the IDLE editor’s Replace dialog when the search \ 
direction is “Up” and “Wrap around” is off: it now replaces all matches \ 
above the current position instead of only the first one.
gh-152728: Move functions run.fix_scaling, editor.fixwordbreaks (as \ 
fix_word_breaks) and pyshell.fix_x11_paste to idlelib.util.
gh-66331: Set the WM_CLASS window property of IDLE’s windows to Idle on X11, \ 
so that window managers group and label them correctly instead of using the \ 
default Toplevel.
gh-85320: IDLE now reads and writes its configuration files and the breakpoints \ 
file using UTF-8 instead of the locale encoding. This keeps non-ASCII data (such \ 
as non-ASCII paths) from being corrupted and makes the files portable between \ 
environments.
gh-94523: Detect file if modified at local disk and prompt to ask refresh. Patch \ 
by Shixian Li.
gh-139551: Support rendering BaseExceptionGroup in IDLE.
gh-89520: Make IDLE extension configuration look at user config files, allowing \ 
user-installed extensions to have settings and key bindings defined in \ 
~/.idlerc.
Tools/Demos
gh-155218: Fix Argument Clinic generating the flags of the optional groups in \ 
different order on 32-bit and 64-bit platforms.
gh-155207: Argument Clinic now supports the --dry-run and --diff options. They \ 
list the files which would be changed, or write a unified diff of the changes to \ 
the standard output, without modifying any file.
gh-154580: Fix python-gdb.py raising UnicodeEncodeError when pretty-printing a \ 
non-ASCII str in a locale whose host charset cannot encode it, such as any \ 
non-ASCII string in the C locale.
C API
gh-152132: Fix Py_RunMain() to return an exit code, rather than calling \ 
Py_Exit(), when running a script, a command, or the REPL. Patch by Victor \ 
Stinner.
gh-153300: PyConfig_Set() now also set global configuration variables. For \ 
example, PyConfig_Set("inspect", value) now also sets Py_InspectFlag. \ 
Patch by Victor Stinner.
gh-123619: PyUnstable_Object_EnableDeferredRefcount() now returns 0 if the \ 
object is not tracked by the garbage collector: if gc.is_tracked() is false. \ 
Patch by Victor Stinner.
   2026-06-22 21:56:38 by Thomas Klausner | Files touched by this commit (1)
Log message:
python314: fix typo in DESCR, this is 3.14, not 3.13
   2026-06-11 14:13:39 by Adam Ciarcinski | Files touched by this commit (6) | Package updated
Log message:
python314 py314-html-docs: updated to 3.14.6

Python 3.14.6

Security
gh-151159: Update Android and iOS installers to use OpenSSL 3.5.7.
gh-150599: Fix a possible stack buffer overflow in bz2 when a \ 
bz2.BZ2Decompressor is reused after a decompression error. The decompressor now \ 
becomes unusable after libbz2 reports an error.
gh-149835: shutil.move() now resolves symlinks via os.path.realpath() when \ 
checking whether the destination is inside the source directory, preventing a \ 
symlink-based bypass of that guard.
gh-149698: Update bundled libexpat to version 2.8.1 for the fix for CVE 2026-45186.
gh-87451: The ftplib module’s undocumented ftpcp function no longer trusts the \ 
IPv4 address value returned from the source server in response to the PASV \ 
command by default, completing the fix for CVE-2021-4189. As with ftplib.FTP, \ 
the former behavior can be re-enabled by setting the \ 
trust_server_pasv_ipv4_address attribute on the source ftplib.FTP instance to \ 
True. Thanks to Qi Deng at Aurascape AI for the report.
gh-149486: tarfile.data_filter() now validates link targets using the same \ 
normalised value that is written to disk, strips trailing separators from the \ 
member name when resolving a symlink’s directory, and rejects link members \ 
that would replace the destination directory itself. This closes several \ 
path-traversal bypasses of the data extraction filter.
gh-149079: Fix a potential denial of service in unicodedata.normalize(). The \ 
canonical ordering step of Unicode normalization used a quadratic-time insertion \ 
sort for reordering combining characters, which could be exploited with crafted \ 
input containing many combining characters in non-canonical order. Replaced with \ 
a linear-time counting sort for long runs.
gh-149018: Improved protection against XML hash-flooding attacks in \ 
xml.parsers.expat and xml.etree.ElementTree when Python is compiled with \ 
libExpat 2.8.0 or later.
Core and Builtins
gh-151112: Fix a crash in the compiler that could occur when running out of memory.

gh-151126: Fix a crash, when there’s no memory left on a device, which happened in:

code compilation - _winapi.CreateProcess()
Now these places raise proper MemoryError errors.

gh-150700: Fix a SystemError when compiling a class-scope comprehension \ 
containing a lambda that references __class__, __classdict__, or \ 
__conditional_annotations__. Patch by Bartosz Sławecki.

gh-150633: Fix the frozen importer accepting module names with embedded null \ 
bytes, which caused it to bypass the sys.modules cache and create duplicate \ 
module objects.

gh-148613: Fix a data race in the free-threaded build between gc.set_threshold() \ 
and garbage collection scheduling during object allocation.

gh-149156: Fix an intermittent crash after os.fork() when perf trampoline \ 
profiling is enabled and the child returns through trampoline frames inherited \ 
from the parent process.

gh-149449: Fix a use-after-free crash when the unicodedata module was removed \ 
from sys.modules and garbage-collected between calls that decode \N{...} escapes \ 
or use the namereplace codec error handler.

gh-150207: Fix a crash when a memory allocation fails during tokenizer \ 
initialization. A proper MemoryError is now raised instead.

gh-150107: asyncio: sendfile() and sock_sendfile() event loop methods now call \ 
file.seek(offset) if file has a seek() method, even if offset is 0 (default \ 
value).

gh-150146: Fix a crash on a complex type variable substitution.

from typing import TypeVar; \ 
memoryview[TypeVar("")][*typing.Mapping[..., ...]] used to fail due to \ 
missing NULL check on _unpack_args C function call.

gh-149590: Fix crash when faulthandler is imported more than once.

gh-149816: Fix a race condition in _PyBytes_FromList in free-threading mode.

gh-149816: Fix a race condition in memoryview with free-threading.

gh-149805: Fix a SystemError when compiling a compiling __classdict__ class \ 
annotation.

gh-149738: sqlite3: Disallow removing row_factory and text_factory attributes of \ 
a connection to prevent a crash on a query.

gh-139808: Add branch protections for AArch64 (BTI/PAC) in assembly code used by \ 
-X perf_jit (Linux perf profiler integration).

gh-148450: Fix abc.register() so it invalidates type version tags for registered \ 
classes.
Library
gh-151039: Fix a crash when static datetime types outlive the _datetime module.
gh-150913: Fix sqlite3.Blob slice assignment to raise TypeError and IndexError \ 
for type and size mismatches respectively, even when the target slice is empty.
gh-143008: Fix race conditions when re-initializing a io.TextIOWrapper object.
gh-150750: Fix a race condition in collections.deque.index() with free-threading.
gh-150685: Update bundled pip to 26.1.2
gh-150406: Fix a possible crash occurring during socket module initialization \ 
when the system is out of memory on platforms without a reentrant gethostbyname.
gh-150372: readline: Fix a potential crash during tab completion caused by an \ 
out-of-memory error during module initialization.
gh-150157: Fix a crash in free-threaded builds that occurs when pickling by name \ 
objects without a __module__ attribute while sys.modules is concurrently being \ 
modified.
gh-150175: Fix race condition in unittest.mock.ThreadingMock where concurrent \ 
calls could lose increments to call_count and other attributes due to a missing \ 
lock in _increment_mock_call.
gh-84353: Preserve non-UTF-8 encoded filenames when appending to a \ 
zipfile.ZipFile. Previously, non-ASCII names stored in a legacy encoding \ 
(without the UTF-8 flag bit set) could be corrupted when the central directory \ 
was rewritten: they were decoded as cp437 and then re-stored as UTF-8.
gh-149816: Fix race condition in ssl.SSLContext.sni_callback
gh-149995: Update various docstrings in typing.
gh-88726: The email package now uses standard MIME charset names “gb2312” \ 
and “big5” instead of non-standard names “eucgb2312_cn” and \ 
“big5_tw”.
gh-149571: Fix the C implementation of xml.etree.ElementTree.Element.itertext(): \ 
it no longer emits text for comments and processing instructions.
gh-149921: Fix reference leaks in error paths of the _interpchannels and \ 
_interpqueues extension modules.
gh-149816: Fix a race condition in _random.Random.__init__ method in \ 
free-threading mode.
gh-149801: Add IANA registered names and aliases with leading zeros before \ 
number (like IBM00858, CP00858, IBM01140, CP01140) for corresponding codecs.
gh-149701: Fix bad return code from Lib/venv/bin/activate if hashing is disabled
gh-112821: In the REPL, autocompletion might run arbitrary code in the getter of \ 
a descriptor. If that getter raised an exception, autocompletion would fail to \ 
present any options for the entire object. Autocompletion now works as expected \ 
for these objects.
gh-149489: Fix ElementTree serialization to HTML. The content of elements \ 
“xmp”, “iframe”, “noembed”, “noframes”, and “plaintext” is \ 
no longer escaped. The “plaintext” element no longer have the closing tag.
gh-149231: In tomllib, the number of parts in TOML keys is now limited.
gh-149046: io: Fix io.StringIO serialization: no longer call str(obj) on str \ 
subclasses. Patch by Thomas Kowalski.
gh-148954: Fix XML injection vulnerability in xmlrpc.client.dumps() where the \ 
methodname was not being escaped before interpolation into the XML body.
gh-148441: xml.parsers.expat: prevent a crash in CharacterDataHandler() when the \ 
character data size exceeds the parser’s buffer size.
gh-146452: Fix segfault in pickle when pickling a dictionary concurrently \ 
mutated by another thread in the free-threaded build.
gh-142831: Fix a crash in the json module where a use-after-free could occur if \ 
the object being encoded is modified during serialization.
gh-90949: Add SetBillionLaughsAttackProtectionActivationThreshold() and \ 
SetBillionLaughsAttackProtectionMaximumAmplification() to xmlparser objects to \ 
tune protections against billion laughs attacks. Patch by Bénédikt Tran.
gh-134261: zip: On reproducible builds, ZipFile uses UTC instead of the local \ 
time when writing file datetimes to avoid underflows.
gh-128110: Fix bug in the parsing of email address headers that could result in \ 
extraneous spaces in the decoded text when using a modern email policy. Space \ 
between pairs of adjacent RFC 2047 encoded-words is now ignored, per section 6.2 \ 
(and consistent with existing parsing of unstructured headers like Subject).
gh-107398: Fix tarfile stream mode exception when process the file with the gzip \ 
extra field.
gh-123853: Update the table of Windows language code identifiers (LCIDs) used by \ 
locale.getdefaultlocale() on Windows to protocol version 16.0 (2024-04-23).
gh-91099: imaplib.IMAP4.login() now raises exceptions with str instead of bytes. \ 
Patch by Florian Best.
Documentation
gh-150319: Generic builtin and standard library types now document the meaning \ 
of their type parameters.
gh-109503: Fix documentation for shutil.move() on usage of os.rename() since \ 
nonatomic move might be used even if the files are on the same filesystem. Patch \ 
by Fang Li
Tests
gh-151130: Add more tests for PyWeakref_* C API.
gh-149776: Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if \ 
it’s not supported. Patch by Victor Stinner.
Build
gh-148294: Corrected the use of AC_PATH_TOOL in configure.ac to allow a C++ \ 
compiler to be found on PATH.
Windows
gh-151159: Updated bundled version of OpenSSL to 3.5.7.
macOS
gh-151159: Update macOS installer to use OpenSSL 3.5.7.
gh-150644: When system logging is enabled (with config.use_system_logger, \ 
messages are now tagged as public. This allows the macOS 26 system logger to \ 
view messages without special configuration.
gh-115119: Update macOS installer to use libmpdecimal 4.0.1.
IDLE
bpo-6699: Warn the user if a file will be overwritten when saving.
C API
gh-150907: Fix dynamic_annotations.h header file when built with C++ and \ 
Valgrind: add extern "C++" scope for the C++ template. Patch by Victor \ 
Stinner.
gh-145235: Made PyDict_AddWatcher(), PyDict_ClearWatcher(), PyDict_Watch(), and \ 
PyDict_Unwatch() thread-safe on the free threaded build.
   2026-05-18 23:23:27 by Thomas Klausner | Files touched by this commit (3)
Log message:
python314: fix terminfo support in REPL

Bump PKGREVISION.
   2026-05-18 23:22:56 by Thomas Klausner | Files touched by this commit (1)
Log message:
python314: regenerate patch, NFCI