- Update to the fifth development version of 3.14.0:
- Tools/Demos
- gh-129248: The iOS test runner now strips the log prefix
from each line output by the test suite.
- gh-104400: Fix several bugs in extraction by switching to
an AST parser in pygettext.
- Tests
- gh-129386: Add test.support.reset_code, which can be used
to reset various bytecode-level optimizations and local
instrumentation for a function.
- gh-128474: Disable test_embed test cases that segfault on
BOLT instrument binaries. The tests are only disabled when
BOLT is enabled.
- gh-128003: Add an option --parallel-threads=N to the
regression test runner that runs individual tests in
multiple threads in parallel in order to find concurrency
bugs. Note that most of the test suite is not yet reviewed
for thread-safety or annotated with @thread_unsafe when
necessary.
- Security
- gh-105704: When using urllib.parse.urlsplit() and
urllib.parse.urlparse() host parsing would not reject
domain names containing square brackets ([ and ]). Square
brackets are only valid for IPv6 and IPvFuture hosts
according to RFC 3986 Section 3.2.2. (bsc#1236705,
CVE-2025-0938, gh#python/cpython#105704).
- gh-126108: Fix a possible NULL pointer dereference in
PySys_AddWarnOptionUnicode().
- gh-80222: Fix bug in the folding of quoted strings
when flattening an email message using a modern email
policy. Previously when a quoted string was folded so
that it spanned more than one line, the surrounding
quotes and internal escapes would be omitted. This could
theoretically be used to spoof header lines using a
carefully constructed quoted string if the resulting
rendered email was transmitted or re-parsed.
- gh-119511: Fix a potential denial of service in the imaplib
module. When connecting to a malicious server, it could
cause an arbitrary amount of memory to be allocated. On
many systems this is harmless as unused virtual memory is
only a mapping, but if this hit a virtual address size
limit it could lead to a MemoryError or other process
crash. On unusual systems or builds where all allocated
memory is touched and backed by actual ram or storage
it could’ve consumed resources doing so until similarly
crashing.
- Library
- gh-129939: Comparison pages with highlighted changes
generated by the difflib.HtmlDiff class now support dark
mode.
- gh-129928: Raise sqlite3.ProgrammingError if a user-defined
SQL function with invalid number of parameters is
created. Patch by Erlend Aasland.
- gh-129583: Update bundled pip to 25.0.1
- gh-129766: Fix crash in warnings, when calling
_release_lock() with no existing lock.
- gh-129005: _pyio.FileIO.readall() now allocates, resizes,
and fills a data buffer using the same algorithm
_io.FileIO.readall() uses.
- gh-129646: Update the locale alias mapping in the locale
module to match the latest X Org locale alias mapping and
support new locales in Glibc 2.41.
- gh-128317: Put CLI calendar highlighting in private class,
removing highlight_day from public calendar.TextCalendar
API. Patch by Hugo van Kemenade.
- gh-129603: Fix bugs where sqlite3.Row objects could
segfault if their inherited description was set to
None. Patch by Erlend Aasland.
- gh-129559: Add bytearray.resize() method so bytearray can
be efficiently resized in place.
- gh-129502: Unlikely errors in preparing arguments for
ctypes callback are now handled in the same way as errors
raised in the callback of in converting the result of
the callback – using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other
variables.
- gh-129403: Corrected ValueError message for asyncio.Barrier
and threading.Barrier.
- gh-129409: Fix an integer overflow in the csv module when
writing a data field larger than 2GB.
- gh-126400: Add a socket timeout keyword argument to
logging.handlers.SysLogHandler.
- gh-118761: Always lazy import warnings in threading. Patch
by Taneli Hukkinen.
- gh-118761: Improve import time of subprocess by lazy
importing locale and signal. Patch by Taneli Hukkinen.
- gh-129346: In sqlite3, handle out-of-memory when creating
user-defined SQL functions.
- gh-129005: Optimize _pyio.FileIO.readinto by avoiding
unnecessary objects and copies using os.readinto().
- gh-129195: Support reporting call graph information from
asyncio.staggered.staggered_race().
- gh-129205: Add os.readinto() to read into a buffer object
from a file descriptor.
- gh-128772: Fix pydoc for methods with the __module__
attribute equal to None.
- gh-129061: Fix FORCE_COLOR and NO_COLOR when empty
strings. Patch by Hugo van Kemenade.
- gh-92897: Scheduled the deprecation of the check_home
argument of sysconfig.is_python_build() to Python 3.15.
- gh-129064: Deprecate sysconfig.expand_makefile_vars(),
in favor of using sysconfig.get_paths() with the vars
argument.
- gh-128550: Removed an incorrect optimization relating
to eager tasks in asyncio.TaskGroup that resulted in
cancellations being missed.
- gh-128991: Release the enter frame reference within bdb
callback
- gh-118761: Reduce import time of pstats and zipfile by up
to 20%, by removing unnecessary imports to typing. Patch by
Bénédikt Tran.
- gh-128978: Fix a NameError in
sysconfig.expand_makefile_vars(). Patch by Bénédikt Tran.
- gh-128961: Fix a crash when setting state on an exhausted
array.array iterator.
- gh-128894: Fix
traceback.TracebackException._format_syntax_error not to
fail on exceptions with custom metadata.
- gh-128916: Do not attempt to set SO_REUSEPORT on sockets of
address families other than AF_INET and AF_INET6, as it is
meaningless with these address families, and the call with
fail with Linux kernel 6.12.9 and newer.
- gh-118761: Improve import time of tomllib by removing
typing, string, and tomllib._types imports. Patch by Taneli
Hukkinen.
- gh-128679: tracemalloc: Fix race conditions when
tracemalloc.stop() is called by a thread, while other
threads are tracing memory allocations. Patch by Victor
Stinner.
- gh-128891: Add specialized opcodes to opcode.opname.
- gh-118761: Reduce import time of gettext by up to ten
times, by importing re on demand. In particular, re is
no longer implicitly exposed as gettext.re. Patch by Eli
Schwartz.
- gh-118761: Reduce the import time of optparse when no help
text is printed. Patch by Eli Schwartz.
- gh-128657: Fix possible extra reference when using objects
returned by hashlib.sha256() under free threading.
- gh-118761: Reduce the import time of csv by up to five
times, by importing re on demand. In particular, re is no
more implicitly exposed as csv.re. Patch by Bénédikt Tran.
- gh-128308: Support the name keyword argument
for eager tasks in asyncio.loop.create_task(),
asyncio.create_task() and asyncio.TaskGroup.create_task(),
by passing on all kwargs to the task factory set by
asyncio.loop.set_task_factory().
- gh-118761: Improve the performance of base64.b16decode()
by up to ten times by more efficiently checking the
byte-string for hexadecimal digits. Reduce the import
time of base64 by up to six times, by no longer importing
re. Patch by Bénédikt Tran, Chris Markiewicz, and Adam
Turner.
- gh-128156: When using macOS system libffi, support for
complex types in ctypes is now checked at runtime (macOS
10.15 or newer). The types must also be available at build
time.
- gh-128636: Fix PyREPL failure when os.environ is
overwritten with an invalid value.
- gh-128498: Default to stdout isatty for color detection
instead of stderr. Patch by Hugo van Kemenade.
- gh-128384: Add locking to warnings to avoid some
data races when free-threading is used. Change
_warnings_runtime_state.mutex to be a recursive mutex
and expose it to warnings, via the _acquire_lock() and
_release_lock() functions. The lock is held when filters
and _filters_version are updated.
- gh-128509: Add sys._is_immortal() for identifying immortal
objects at runtime.
- gh-128479: Fix asyncio.staggered.staggered_race() leaking
tasks and issuing an unhandled exception.
- gh-128427: uuid.NIL and uuid.MAX are now available to
represent the Nil and Max UUID formats as defined by RFC
9562.
- gh-91279: zipfile.ZipFile.writestr() now respect
SOURCE_DATE_EPOCH that distributions can set centrally
and have build tools consume this in order to produce
reproducible output.
- gh-112064: Fix incorrect handling of negative read sizes in
HTTPResponse.read. Patch by Yury Manushkin.
- gh-58956: Fixed a frame reference leak in bdb.
- gh-128131: Completely support random access of uncompressed
unencrypted read-only zip files obtained by ZipFile.open.
- gh-127975: Avoid reusing quote types in ast.unparse() if
not needed.
- gh-115514: Fix exceptions and incomplete writes after
asyncio._SelectorTransport is closed before writes are
completed.
- gh-121604: Add missing Deprecation warnings for
importlib.machinery.DEBUG_BYTECODE_SUFFIXES,
importlib.machinery.OPTIMIZED_BYTECODE_SUFFIXES,
importlib.machinery.WindowsRegistryFinder,
importlib.abc.ResourceLoader,
importlib.abc.SourceLoader.path_mtime().
- gh-127873: When -E is set, only ignore PYTHON_COLORS
and not FORCE_COLOR/NO_COLOR/TERM when colourising
output. Patch by Hugo van Kemenade.
- gh-125413: Add pathlib.Path.info attribute, which stores
an object implementing the pathlib.types.PathInfo protocol
(also new). The object supports querying the file type and
internally caching stat() results. Path objects generated
by iterdir() are initialized with file type information
gleaned from scanning the parent directory.
- gh-127712: Fix handling of the secure argument of
logging.handlers.SMTPHandler.
- gh-127096: Do not recreate unnamed section on every read in
configparser.ConfigParser. Patch by Andrey Efremov.
- gh-124369: Deprecate pdb.Pdb.curframe_locals
- gh-126332: Fix _pyrepl crash when entering a double CTRL-Z
on an overflowing line.
- gh-125553: Fix round-trip invariance for backslash
continuations in tokenize.untokenize().
- gh-91048: Add asyncio.capture_call_graph() and
asyncio.print_call_graph() functions.
- gh-124703: Quitting pdb in inline mode will emit a
confirmation prompt and exit gracefully now, instead of
printing an exception traceback.
- gh-123987: Fixed issue in NamespaceReader where a non-path
item in a namespace path, such as a sentinel added by an
editable installer, would break resource loading.
- gh-119349: Add the ctypes.util.dllist() function to list
the loaded shared libraries for the current process.
- gh-55454: Add IMAP4 IDLE support to the imaplib
module. Patch by Forest.
- gh-119257: Show tab completions menu below the current
line, which results in less janky behaviour, and fixes a
cursor movement bug. Patch by Daniel Hollas
- gh-101410: Support custom messages for domain errors in the
math module (math.sqrt(), math.log() and math.atanh() were
modified as examples). Patch by Charlie Zhao and Sergey B
Kirpichev.
- gh-81340: Use os.copy_file_range() in shutil.copy(),
shutil.copy2(), and shutil.copyfile() functions by
default. An underlying Linux system call gives filesystems
an opportunity to implement the use of copy-on-write (in
case of btrfs and XFS) or server-side copy (in the case of
NFS.) Patch by Illia Volochii.
- bpo-27307: Add attribute and item access support to
string.Formatter in auto-numbering mode, which allows
format strings like ‘{.name}’ and ‘{[1]}’.
- IDLE
- gh-129873: Simplify displaying the IDLE doc by only copying
the text section of idle.html to idlelib/help.html. Patch
by Stan Ulbrych.
- Documentation
- gh-125722: Require Sphinx 8.1.3 or later to build the
Python documentation. Patch by Adam Turner.
- gh-67206: Document that string.printable is not
printable in the POSIX sense. In particular,
string.printable.isprintable() returns False. Patch by
Bénédikt Tran.
- Core and Builtins
- gh-100239: Replace the opcode BINARY_SUBSCR and its family
by BINARY_OP with oparg NB_SUBSCR.
- gh-129732: Fixed a race in _Py_qsbr_reserve in the free
threading build.
- gh-129763: Remove the internal LLTRACE macro (use Py_DEBUG
instead).
- gh-129715: Improve JIT performance for generators.
- gh-129643: Fix thread safety of PyList_Insert() in
free-threading builds.
- gh-129668: Fix race condition when raising MemoryError in
the free threaded build.
- gh-129643: Fix thread safety of PyList_SetItem() in
free-threading builds. Patch by Kumar Aditya.
- gh-128563: Fix an issue where the “lltrace” debug feature
could have been incorrectly enabled for some frames.
- gh-129393: On FreeBSD, sys.platform doesn’t contain the
major version anymore. It is always 'freebsd', instead of
'freebsd13' or 'freebsd14'.
- gh-129345: Fix null pointer dereference in syslog.openlog()
when an audit hook raises an exception.
- gh-129231: Improve memory layout of JIT traces. Patch by
Diego Russo
- gh-129149: Add fast path for medium-size integers in
PyLong_FromUnsignedLong(), PyLong_FromUnsignedLongLong()
and PyLong_FromSize_t().
- gh-129201: The free-threaded version of the cyclic garbage
collector has been optimized to conditionally use CPU
prefetch instructions during the collection. This can
reduce collection times by making it more likely that
data is in the CPU cache when it is needed. The prefetch
instructions are enabled if the number of long-lived
objects (objects surviving a full collection) exceeds a
threshold.
- gh-129093: Fix f-strings such as f'{expr=}' sometimes not
displaying the full expression when the expression contains
!=.
- gh-124363: Treat debug expressions in f-string as raw
strings. Patch by Pablo Galindo
- gh-128714: Fix the potential races in get/set dunder
methods __annotations__, __annotate__ and __type_params__
for function object, and add related tests.
- gh-128799: Add frame of except* to traceback when it wraps
a naked exception.
- gh-128842: Collect JIT memory stats using pystats. Patch by
Diego Russo.
- gh-100239: Specialize BINARY_OP for bitwise logical
operations on compact ints.
- gh-128910: Undocumented and unused private C-API functions
_PyTrash_begin and _PyTrash_end are removed.
- gh-128807: Add a marking phase to the free-threaded
GC. This is similar to what was done in gh-126491. Since
the free-threaded GC does not have generations and is
not incremental, the marking phase looks for all objects
reachable from known roots. The roots are objects known to
not be garbage, like the module dictionary for sys. For
most programs, this marking phase should make the GC a bit
faster since typically less work is done per object.
- gh-100239: Add opcode BINARY_OP_EXTEND which executes a
pair of functions (guard and specialization functions)
accessed from the inline cache.
- gh-128563: A new type of interpreter has been added
to CPython. This interpreter uses tail calls for its
instruction handlers. Preliminary benchmark results suggest
7-11% geometric mean faster on pyperformance (depending
on platform), and up to 30% faster on Python-intensive
workloads. This interpreter currently only works on newer
compilers, such as clang-19. Other compilers will continue
using the old interpreter. Patch by Ken Jin, with ideas on
how to implement this in CPython by Mark Shannon, Garret
Gu, Haoran Xu, and Josh Haberman.
- gh-126703: Improve performance of iterating over lists and
tuples by using a freelist for the iterator objects.
- gh-127953: The time to handle a LINE event in
sys.monitoring (and sys.settrace) is now independent of the
number of lines in the code object.
- gh-128330: Restore terminal control characters on REPL
exit.
- gh-128016: Improved the SyntaxWarning message for invalid
escape sequences to clarify that such sequences will raise
a SyntaxError in future Python releases. The new message
also suggests a potential fix, i.e., Did you mean "\\e"?.
- gh-126004: Fix handling of UnicodeError.start and
UnicodeError.end values in the codecs.replace_errors()
error handler. Patch by Bénédikt Tran.
- gh-126004: Fix handling of UnicodeError.start
and UnicodeError.end values in the
codecs.backslashreplace_errors() error handler. Patch by
Bénédikt Tran.
- gh-126004: Fix handling of UnicodeError.start
and UnicodeError.end values in the
codecs.xmlcharrefreplace_errors() error handler. Patch by
Bénédikt Tran.
- gh-127119: Slightly optimize the int deallocator.
- gh-127349: Fixed the error when resizing terminal in Python
REPL. Patch by Semyon Moroz.
- gh-125723: Fix crash with gi_frame.f_locals when generator
frames outlive their generator. Patch by Mikhail Efimov.
- gh-126349: Add turtle.fill(), turtle.poly() and
turtle.no_animation() context managers. Patch by Marie
Roald and Yngve Mardal Moe.
- gh-115911: If the current working directory cannot be
determined due to permissions, then import will no longer
raise PermissionError. Patch by Alex Willmer.
- gh-112713: Added support for the Partitioned cookie flag in
http.cookies.
- C API
- gh-129533: Update PyGC_Enable(), PyGC_Disable(),
PyGC_IsEnabled() to use atomic operation for thread-safety
at free-threading build. Patch by Donghee Na.
- gh-89188: Implement PyUnicode_KIND() and PyUnicode_DATA()
as function, in addition to the macros with the same
names. The macros rely on C bit fields which have
compiler-specific layout. Patch by Victor Stinner.
- gh-91417: Remove PySequence_Fast() from the limited
C API, since this function has to be used with
PySequence_Fast_GET_ITEM which never worked in the limited
C API. Patch by Victor Stinner.
- gh-128509: Add PyUnstable_IsImmortal() for determining
whether an object is immortal.
- gh-129033: Remove _PyInterpreterState_GetConfigCopy() and
_PyInterpreterState_SetConfig() private functions. Use
instead PyConfig_Get() and PyConfig_Set(), public C API
added by PEP 741 “Python Configuration C API”. Patch by
Victor Stinner.
- gh-129033: Remove the private _Py_InitializeMain()
function. It was a provisional API added to Python 3.8 by
PEP 587. Patch by Victor Stinner.
- gh-128844: Add PyUnstable_TryIncRef() and
PyUnstable_EnableTryIncRef() unstable APIs. These
are helpers for dealing with unowned references in a
thread-safe way, particularly in the free threading build.
- gh-128911: Add PyImport_ImportModuleAttr() and
PyImport_ImportModuleAttrString() helper functions to
import a module and get an attribute of the module. Patch
by Victor Stinner.
- gh-128863: The following private functions are deprecated
and planned for removal in Python 3.18:
_PyBytes_Join(): use PyBytes_Join().
_PyDict_GetItemStringWithError(): use PyDict_GetItemStringRef().
_PyDict_Pop(): use PyDict_Pop().
_PyLong_Sign(): use PyLong_GetSign().
_PyLong_FromDigits() and _PyLong_New(): use PyLongWriter_Create().
_PyThreadState_UncheckedGet(): use PyThreadState_GetUnchecked().
_PyUnicode_AsString(): use PyUnicode_AsUTF8().
_Py_HashPointer(): use Py_HashPointer().
_Py_fopen_obj(): use Py_fopen().
The pythoncapi-compat project can be used to get these new
public functions on Python 3.13 and older. Patch by Victor Stinner.
- gh-126599: Remove some internal test APIs for the
experimental JIT compiler.
- gh-127925: Convert the decimal module to use PEP 757 C API
(export-import integers), offering some speed-up if the
integer part of the Decimal instance is small. Patch by
Sergey B Kirpichev.
- Build
- gh-129660: Drop test_embed from PGO training, whose
contribution in recent versions is considered to be
ignorable.
- gh-128902: Fix compile errors with Clang 9 and older due to
lack of __attribute__((fallthrough)) support.
- Remove upstreamed patches:
- CVE-2025-0938-sq-brackets-domain-names.patch
- 314a4-no-SO_REUSEPORT.patch
OBS-URL: https://build.opensuse.org/request/show/1245486
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python314?expand=0&rev=6
- Add CVE-2025-0938-sq-brackets-domain-names.patch which
disallows square brackets ([ and ]) in domain names for parsed
URLs (bsc#1236705, CVE-2025-0938, gh#python/cpython#105704)
- Add 314a4-no-SO_REUSEPORT.patch to fix build on new kernel
(gh#python/cpython#128916).
- Configure externally_managed with a bcond
https://en.opensuse.org/openSUSE:Python:Externally_managed
bsc#1228165
- Update to the fourth development version of 3.14.0:
- Tools/Demos
- gh-128152: Fix a bug where Argument Clinic’s C
pre-processor parser tried to parse pre-processor
directives inside C comments. Patch by Erlend Aasland.
- Tests
- gh-128690: Temporarily do not use test_embed in PGO profile
builds until the problem with test_init_pyvenv_cfg failing
in some configurations is resolved.
- Library
- gh-128731: Fix ResourceWarning in
urllib.robotparser.RobotFileParser.read().
- gh-71339: Add new assertion methods for unittest:
assertHasAttr(), assertNotHasAttr(), assertIsSubclass(),
assertNotIsSubclass() assertStartsWith(),
assertNotStartsWith(), assertEndsWith() and
assertNotEndsWith().
- gh-118761: Improve import time of pickle by 25% by removing
an unnecessary regular expression. As such, re is no more
implicitly available as pickle.re. Patch by Bénédikt Tran.
- gh-128661: Fixes typing.evaluate_forward_ref() not showing
deprecation when type_params arg is not passed.
- gh-128562: Fix possible conflicts in generated tkinter
widget names if the widget class name ends with a digit.
- gh-128559: Improved import time of asyncio.
- gh-128552: Fix cyclic garbage introduced
by asyncio.loop.create_task() and
asyncio.TaskGroup.create_task() holding a reference to the
created task if it is eager.
- gh-128340: Add internal thread safe handle to be used
in asyncio.loop.call_soon_threadsafe() for thread safe
cancellation.
- gh-128182: Fix crash when using ctypes pointers
concurrently on the free threaded build.
- gh-128400: Only show the current thread in faulthandler on
the free threaded build to prevent races.
- gh-128400: Fix crash when using
faulthandler.dump_traceback() while other threads are
active on the free threaded build.
- gh-128388: Fix PyREPL on Windows to support more
keybindings, like the Control-← and Control-→ word-skipping
keybindings and those with meta (i.e. Alt), e.g. Alt-d to
kill-word or Alt-Backspace backward-kill-word.
- gh-88834: Unify the instance check for typing.Union and
types.UnionType: Union now uses the instance checks against
its parameters instead of the subclass checks.
- gh-128302: Fix
xml.dom.xmlbuilder.DOMEntityResolver.resolveEntity(), which
was broken by the Python 3.0 transition.
- gh-128317: Highlight today in colour in calendar’s CLI
output. Patch by Hugo van Kemenade.
- gh-128302: Allow xml.dom.xmlbuilder.DOMParser.parse()
to correctly handle xml.dom.xmlbuilder.DOMInputSource
instances that only have a systemId attribute set.
- gh-128151: Improve generation of UUID objects version 3,
4, 5, and 8 via their dedicated functions by 30%. Patch by
Bénédikt Tran.
- gh-128118: Improve performance of copy.copy() by 30% via a
fast path for atomic types and container types.
- gh-127946: Fix crash when modifying ctypes._CFuncPtr
objects concurrently on the free threaded build.
- gh-128062: Revert the font of turtledemo’s menu bar to its
default value and display the shortcut keys in the correct
position.
- gh-128014: Fix resetting the default window icon by passing
default='' to the tkinter method wm_iconbitmap().
- gh-41872: Fix quick extraction of module docstrings from
a file in pydoc. It now supports docstrings with single
quotes, escape sequences, raw string literals, and other
Python syntax.
- gh-127060: Set TERM environment variable to “dumb” to
disable traceback colors in IDLE, since IDLE doesn’t
understand ANSI escape sequences. Patch by Victor Stinner.
- gh-126742: Fix support of localized error messages reported
by dlerror(3) and gdbm_strerror in ctypes and dbm.gnu
functions respectively. Patch by Bénédikt Tran.
- gh-122548: Adds two new local events to sys.monitoring,
BRANCH_LEFT and BRANCH_RIGHT. This allows the two arms
of the branch to be disabled independently, which should
hugely improve performance of branch-level coverage
tools. The old branch event, BRANCH is now deprecated.
- gh-127847: Fix the position when doing interleaved seeks
and reads in uncompressed, unencrypted zip files returned
by zipfile.ZipFile.open().
- gh-127688: Add the SCHED_DEADLINE and SCHED_NORMAL
constants to the os module.
- gh-83662: Add missing __class_getitem__ method to the
Python implementation of functools.partial(), to make it
compatible with the C version. This is mainly relevant for
alternative Python implementations like PyPy and GraalPy,
because CPython will usually use the C-implementation of
that function.
- gh-127586: multiprocessing.pool.Pool now properly restores
blocked signal handlers of the parent thread when creating
processes via either spawn or forkserver.
- gh-98188: Fix an issue in
email.message.Message.get_payload() where data cannot be
decoded if the Content Transfer Encoding mechanism contains
trailing whitespaces or additional junk text. Patch by Hui
Liu.
- gh-127529: Correct behavior of
asyncio.selector_events.BaseSelectorEventLoop._accept_connection()
in handling ConnectionAbortedError in a loop. This improves
performance on OpenBSD.
- gh-127360: When a descriptive error message cannot be
provided for an ssl.SSLError, the “unknown error” message
now shows the internal error code (as retrieved by
ERR_get_error and similar OpenSSL functions).
- gh-127196: Fix crash when dict with keys in invalid
encoding were passed to several functions in _interpreters
module.
- gh-124130: Fix a bug in matching regular expression \B in
empty input string. Now it is always the opposite of \b. To
get an old behavior, use (?!\A\Z)\B. To get a new behavior
in old Python versions, use (?!\b).
- gh-126639: tempfile.NamedTemporaryFile will now issue
a ResourceWarning when it is finalized by the garbage
collector without being explicitly closed.
- gh-126624: Expose error code XML_ERROR_NOT_STARTED of Expat
>=2.6.4 in xml.parsers.expat.errors.
- gh-126225: getopt and optparse are no longer marked as
deprecated. There are legitimate reasons to use one of
these modules in preference to argparse, and none of these
modules are at risk of being removed from the standard
library. Of the three, argparse remains the recommended
default choice, unless one of the concerns noted at the top
of the optparse module documentation applies.
- gh-124761: Add SO_REUSEPORT_LB constant to socket for
FreeBSD.
- gh-121720: enum.EnumDict can now be used without resorting
to private API.
- gh-123424: Add zipfile.ZipInfo._for_archive() setting
default properties on ZipInfo objects. Patch by Bénédikt
Tran and Jason R. Coombs.
- gh-121676: Deprecate calling the Python implementation of
functools.reduce() with a function or sequence as a keyword
argument. This will be forbidden in Python 3.16 in order to
match the C implementation.
- gh-112015: ctypes.memoryview_at() now exists to create
a memoryview object that refers to the supplied pointer
and length. This works like ctypes.string_at() except
it avoids a buffer copy, and is typically useful when
implementing pure Python callback functions that are passed
dynamically-sized buffers.
- gh-95371: Added support for other image formats (PNG, PGM,
and PPM) to the turtle module. Patch by Shin-myoung-serp.
- Core and Builtins
- gh-128078: Fix a SystemError when using anext() with a
default tuple value. Patch by Bénédikt Tran.
- gh-128717: Fix a crash when setting the recursion limit
while other threads are active on the free threaded build.
- gh-124483: Treat Py_DECREF and variants as escaping when
generating opcode and uop metadata. This prevents the
possibility of a __del__ method causing the JIT to behave
incorrectly.
- gh-126703: Improve performance of class methods by using a
freelist.
- gh-128137: Update PyASCIIObject layout to handle interned
field with the atomic operation. Patch by Donghee Na.
- gh-128192: Upgrade HTTP digest authentication algorithm for
urllib.request by supporting SHA-256 digest authentication
as specified in RFC 7616.
- gh-126868: Increase usage of freelist for int allocation.
- gh-114203: Optimize Py_BEGIN_CRITICAL_SECTION for simple
recursive calls.
- gh-127705: Adds stackref debugging when Py_STACKREF_DEBUG
Inis set. Finds all double-closes and leaks, logging the
Inorigin and last borrow. spired by HPy’s debug mode.
Inhttps://docs.hpyproject.org/en/latest/debug-mode.html
- gh-128079: Fix a bug where except* does not properly check
the return value of an ExceptionGroup’s split() function,
leading to a crash in some cases. Now when split() returns
an invalid object, except* raises a TypeError with the
original raised ExceptionGroup object chained to it.
- gh-128030: Avoid error from calling
PyModule_GetFilenameObject on a non-module object when
importing a non-existent symbol from a non-module object.
- gh-128035: Indicate through ssl.HAS_PHA whether the
ssl module supports TLSv1.3 post-handshake client
authentication (PHA). Patch by Will Childs-Klein.
- gh-127274: Add a new flag, CO_METHOD, to co_flags that
indicates whether the code object belongs to a function
defined in class scope.
- gh-66409: During the path initialization, we now check if
base_exec_prefix is the same as base_prefix before falling
back to searching the Python interpreter directory.
- gh-127970: We now use the location of the libpython
runtime library used in the current proccess to determine
sys.base_prefix on all platforms implementing the dladdr
function defined by the UNIX standard — this includes
Linux, Android, macOS, iOS, FreeBSD, etc. This was already
the case on Windows and macOS Framework builds.
- gh-127773: Do not use the type attribute cache for types
with incompatible MRO.
- gh-127903: Objects/unicodeobject.c: fix a crash on DEBUG
builds in _copy_characters when there is nothing to copy.
- gh-127809: Fix an issue where the experimental JIT may
infer an incorrect result type for exponentiation (** and
**=), leading to bugs or crashes.
- gh-126862: Fix a possible overflow when a class inherits
from an absurd number of super-classes. Reported by Valery
Fedorenko. Patch by Bénédikt Tran.
- C API
- gh-128400: Py_FatalError() no longer shows all threads on
the free threaded build to prevent crashes.
- gh-128629: Add macros Py_PACK_VERSION() and
Py_PACK_FULL_VERSION() for bit-packing Python version
numbers.
- gh-128008: Add PyWeakref_IsDead() function, which tests if
a weak reference is dead.
- gh-127350: Add Py_fopen() function to open a file. Similar
to the fopen() function, but the path parameter is a
Python object and an exception is set on error. Add also
Py_fclose() function to close a file, function needed for
Windows support. Patch by Victor Stinner.
- Build
- gh-128627: For Emscripten builds the function pointer cast
call trampoline now uses the wasm-gc ref.test instruction
if it’s available instead of Wasm JS type reflection.
- gh-128472: Skip BOLT optimization of functions using
computed gotos, fixing errors on build with LLVM 19.
- gh-115765: GNU Autoconf 2.72 is now required to generate
!configure. Patch by Erlend Aasland.
- gh-123925: Fix building the curses module on platforms with
libncurses but without libncursesw.
- gh-90905: Add support for cross-compiling to x86_64 on
aarch64/arm64 macOS.
- gh-128321: Set LIBS instead of LDFLAGS when checking if
sqlite3 library functions are available. This fixes the
ordering of linked libraries during checks, which was
incorrect when using a statically linked libsqlite3.
- gh-100384: Error on unguarded-availability in macOS builds,
preventing invalid use of symbols that are not available in
older versions of the OS.
- gh-128104: Remove Py_STRFTIME_C99_SUPPORT conditions in
favor of requiring C99 strftime(3) specifier support at
build time. When cross-compiling, there is no build time
check and support is assumed.
- gh-127951: Add option --pystats to the Windows build to
enable performance statistics collection.
OBS-URL: https://build.opensuse.org/request/show/1244271
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python314?expand=0&rev=5
- Tools/Demos
- gh-128152: Fix a bug where Argument Clinic’s C
pre-processor parser tried to parse pre-processor
directives inside C comments. Patch by Erlend Aasland.
- Tests
- gh-128690: Temporarily do not use test_embed in PGO profile
builds until the problem with test_init_pyvenv_cfg failing
in some configurations is resolved.
- Library
- gh-128731: Fix ResourceWarning in
urllib.robotparser.RobotFileParser.read().
- gh-71339: Add new assertion methods for unittest:
assertHasAttr(), assertNotHasAttr(), assertIsSubclass(),
assertNotIsSubclass() assertStartsWith(),
assertNotStartsWith(), assertEndsWith() and
assertNotEndsWith().
- gh-118761: Improve import time of pickle by 25% by removing
an unnecessary regular expression. As such, re is no more
implicitly available as pickle.re. Patch by Bénédikt Tran.
- gh-128661: Fixes typing.evaluate_forward_ref() not showing
deprecation when type_params arg is not passed.
- gh-128562: Fix possible conflicts in generated tkinter
widget names if the widget class name ends with a digit.
- gh-128559: Improved import time of asyncio.
- gh-128552: Fix cyclic garbage introduced
by asyncio.loop.create_task() and
asyncio.TaskGroup.create_task() holding a reference to the
created task if it is eager.
- gh-128340: Add internal thread safe handle to be used
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=32
- Tools/Demos
- gh-126700: Add support for multi-argument gettext functions
in pygettext.py.
- Tests
- gh-127906: Test the limited C API in test_cppext. Patch by
Victor Stinner.
- gh-127637: Add tests for the dis command-line
interface. Patch by Bénédikt Tran.
- gh-126925: iOS test results are now streamed during test
execution, and the deprecated xcresulttool is no longer
used.
- gh-127076: Disable strace based system call tests when
LD_PRELOAD is set.
- gh-127076: Filter out memory-related mmap, munmap, and
mprotect calls from file-related ones when testing io
behavior using strace.
- Security
- gh-127655: Fixed the
asyncio.selector_events._SelectorSocketTransport
transport not pausing writes for the protocol when
the buffer reaches the high water mark when using
asyncio.WriteTransport.writelines().
- Library
- gh-126907: Fix crash when using atexit concurrently on the
free-threaded build.
- gh-127870: Detect recursive calls in ctypes _as_parameter_
handling. Patch by Victor Stinner.
- gh-127732: The platform module now correctly detects
Windows Server 2025.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=28
- Update to the second development version of 3.14.0a2.
- Tools/Demos
- gh-126807: Fix extraction warnings in pygettext.py caused
by mistaking function definitions for function calls.
- gh-126167: The iOS testbed was modified so that it can be
used by third-party projects for testing purposes.
- Tests
- gh-126909: Fix test_os extended attribute tests to work on
filesystems with 1 KiB xattr size limit.
- gh-125730: Change make test to not run GUI tests by
default. Use make ci to run tests with GUI tests instead.
- gh-124295: Add translation tests to the argparse module.
- Security
- gh-126623: Upgrade libexpat to 2.6.4
- Library
- gh-85957: Add missing MIME types for images with RFCs: emf,
fits, g3fax, jp2, jpm, jpx, t38, tiff-fx and wmf. Patch by
Hugo van Kemenade.
- gh-126920: Fix the prefix and exec_prefix keys from
sysconfig.get_config_vars() incorrectly having the same
value as sys.base_prefix and sys.base_exec_prefix,
respectively, inside virtual environments. They now
accurately reflect sys.prefix and sys.exec_prefix.
- gh-67877: Fix memory leaks when regular expression matching
terminates abruptly, either because of a signal or because
memory allocation fails.
- gh-125063: marshal now supports slice objects. The marshal
format version was increased to 5.
- gh-126789: Fixed the values of sysconfig.get_config_vars(),
sysconfig.get_paths(), and their siblings when the site
initialization happens after sysconfig has built a cache
for sysconfig.get_config_vars().
- gh-126188: Update bundled pip to 24.3.1
- gh-126766: Fix issue where urllib.request.url2pathname()
failed to discard two leading slashes introducing an empty
authority section.
- gh-126705: Allow os.PathLike to be a base for Protocols.
- gh-126699: Allow collections.abc.AsyncIterator to be a base
for Protocols.
- gh-126654: Fix crash when non-dict was passed to several
functions in _interpreters module.
- gh-104745: Limit starting a patcher (from
unittest.mock.patch() or unittest.mock.patch.object()) more
than once without stopping it
- gh-126595: Fix a crash when instantiating itertools.count
with an initial count of sys.maxsize on debug builds. Patch
by Bénédikt Tran.
- gh-120423: Fix issue where urllib.request.pathname2url()
mishandled Windows paths with embedded forward slashes.
- gh-126565: Improve performances of zipfile.Path.open() for
non-reading modes.
- gh-126505: Fix bugs in compiling case-insensitive regular
expressions with character classes containing non-BMP
characters: upper-case non-BMP character did was ignored
and the ASCII flag was ignored when matching a character
range whose upper bound is beyond the BMP region.
- gh-117378: Fixed the multiprocessing "forkserver"
start method forkserver process to correctly inherit
the parent’s sys.path during the importing of
multiprocessing.set_forkserver_preload() modules in the
same manner as sys.path is configured in workers before
executing work items.
- This bug caused some forkserver module preloading to
silently fail to preload. This manifested as a performance
degration in child processes when the sys.path was required
due to additional repeated work in every worker.
- It could also have a side effect of "" remaining in
sys.path during forkserver preload imports instead of the
absolute path from os.getcwd() at multiprocessing import
time used in the worker sys.path.
- The sys.path differences between phases in the child
process could potentially have caused preload to import
incorrect things from the wrong location. We are unaware of
that actually having happened in practice.
- gh-125679: The multiprocessing.Lock and
multiprocessing.RLock repr values no longer say “unknown”
on macOS.
- gh-126476: Raise calendar.IllegalMonthError (now a subclass
of IndexError) for calendar.month() when the input month is
not correct.
- gh-126489: The Python implementation of pickle no longer
calls pickle.Pickler.persistent_id() for the result of
persistent_id().
- gh-126451: Register the contextvars.Context type to
collections.abc.Mapping.
- gh-126175: Add msg, doc, pos, lineno and colno attributes
to tomllib.TOMLDecodeError. Deprecate instantiating with
free-form arguments.
- gh-89416: Add RFC 9559 MIME types for Matroska audiovisual
container formats. Patch by Hugo van Kemenade.
- gh-126417: Register the multiprocessing.managers.DictProxy
and multiprocessing.managers.ListProxy types in
multiprocessing.managers to collections.abc.MutableMapping
and collections.abc.MutableSequence, respectively.
- gh-126390: Add support for returning intermixed options and
non-option arguments in order in getopt.gnu_getopt().
- gh-126374: Add support for options with optional arguments
in the getopt module.
- gh-126363: Speed up pattern parsing in pathlib.Path.glob()
by skipping creation of a pathlib.Path object for the
pattern.
- gh-126353: asyncio.get_event_loop() now does not implicitly
creates an event loop. It now raises a RuntimeError if
there is no set event loop. Patch by Kumar Aditya.
- gh-126313: Fix an issue in curses.napms() when
curses.initscr() has not yet been called. Patch by Bénédikt
Tran.
- gh-126303: Fix pickling and copying of os.sched_param
objects.
- gh-126138: Fix a use-after-free crash on asyncio.Task
objects whose underlying coroutine yields an object that
implements an evil __getattribute__(). Patch by Nico
Posada.
- gh-120057: Replace the os.environ.refresh() method with a
new os.reload_environ() function. Patch by Victor Stinner.
- gh-126220: Fix crash in cProfile.Profile and
_lsprof.Profiler when their callbacks were directly called
with 0 arguments.
- gh-126212: Fix issue where urllib.request.pathname2url()
and url2pathname() removed slashes from Windows DOS drive
paths and URLs.
- gh-126223: Raise a UnicodeEncodeError instead of a
SystemError upon calling _interpreters.create() with an
invalid Unicode character.
- gh-126205: Fix issue where urllib.request.pathname2url()
generated URLs beginning with four slashes (rather than
two) when given a Windows UNC path.
- gh-126156: Improved performances of creating Morsel objects
by a factor of 3.8x.
- gh-126105: Fix a crash in ast when the ast.AST._fields
attribute is deleted.
- gh-126106: Fixes a possible NULL pointer dereference in
ssl.
- gh-126080: Fix a use-after-free crash on asyncio.Task
objects for which the underlying event loop implements an
evil __getattribute__(). Reported by Nico-Posada. Patch by
Bénédikt Tran.
- gh-125322: Correct detection of complex numbers support in
libffi.
- gh-126083: Fixed a reference leak in asyncio.Task objects
when reinitializing the same object with a non-None
context. Patch by Nico Posada.
- gh-126068: Fix exceptions in the argparse module so that
only error messages for ArgumentError and ArgumentTypeError
are now translated. ArgumentError is now only used for
command line errors, not for logical errors in the
program. TypeError is now raised instead of ValueError for
some logical errors.
- gh-125413: Add pathlib.Path.scandir() method to efficiently
fetch directory children and their file attributes. This is
a trivial wrapper of os.scandir().
- gh-125984: Fix use-after-free crashes on asyncio.Future
objects for which the underlying event loop implements an
evil __getattribute__(). Reported by Nico-Posada. Patch by
Bénédikt Tran.
- gh-125926: Fix urllib.parse.urljoin() for base URI with
undefined authority. Although RFC 3986 only specify
reference resolution for absolute base URI, urljoin()
should continue to return sensible result for relative base
URI.
- gh-125969: Fix an out-of-bounds crash when an evil
asyncio.loop.call_soon() mutates the length of the internal
callbacks list. Patch by Bénédikt Tran.
- gh-125966: Fix a use-after-free crash in
asyncio.Future.remove_done_callback(). Patch by Bénédikt
Tran.
- gh-125789: Fix possible crash when mutating list of
callbacks returned by asyncio.Future._callbacks. It
now always returns a new copy in C implementation
_asyncio. Patch by Kumar Aditya.
- gh-126916: Allow the initial parameter of
functools.reduce() to be passed as a keyword
argument. Patch by Sayandip Dutta.
- gh-124452: Fix an issue in
email.policy.EmailPolicy.header_source_parse() and
email.policy.Compat32.header_source_parse() that introduced
spurious leading whitespaces into header values when the
header includes a newline character after the header name
delimiter (:) and before the value.
- gh-117941: argparse.BooleanOptionalAction now rejects
option names starting with --no-.
- gh-125884: Fixed the bug for pdb where it can’t set
breakpoints on functions with certain annotations.
- gh-125355: Fix several bugs in
argparse.ArgumentParser.parse_intermixed_args().
- The parser no longer changes temporarily during
parsing.
- Default values are not processed twice.
- Required mutually exclusive groups containing
positional arguments are now supported.
- The missing arguments report now includes the names of
all required optional and positional arguments.
- Unknown options can be intermixed with positional
arguments in parse_known_intermixed_args().
- gh-125767: super objects are now pickleable and copyable.
- gh-124969: locale.nl_langinfo(locale.ALT_DIGITS) now
returns a string again. The returned value consists of up
to 100 semicolon-separated symbols.
- gh-84850: Remove URLopener and FancyURLopener classes
from urllib.request. They had previously raised
DeprecationWarning since Python 3.3.
- gh-125666: Avoid the exiting the interpreter if a null byte
is given as input in the new REPL.
- gh-125710: [Enum] fix hashable<->nonhashable comparisons
for member values
- gh-125631: Restore ability to set persistent_id and
persistent_load attributes of instances of the Pickler and
Unpickler classes in the pickle module.
- gh-125378: Fixed the bug in pdb where after a multi-line
command, an empty line repeats the first line of the
multi-line command, instead of the full command.
- gh-125682: Reject non-ASCII digits in the Python
implementation of json.loads() conforming to the JSON
specification.
- gh-125660: Reject invalid unicode escapes for Python
implementation of json.loads().
- gh-52551: Use wcsftime() to implement time.strftime() on
Windows.
- gh-125259: Fix the notes removal logic for errors thrown in
enum initialization.
- gh-125633: Add function inspect.ispackage() to determine
whether an object is a package or not.
- gh-125614: In the FORWARDREF format of annotationlib,
fix bug where nested expressions were not returned as
annotationlib.ForwardRef format.
- gh-125590: Allow FrameLocalsProxy to delete and pop if the
key is not a fast variable.
- gh-125600: Only show stale code warning in pdb when we
display source code.
- gh-125542: Deprecate passing keyword-only prefix_chars
argument to argparse.ArgumentParser.add_argument_group().
- gh-125541: Pressing Ctrl-C while blocked in
threading.Lock.acquire(), threading.RLock.acquire(), and
threading.Thread.join() now interrupts the function call
and raises a KeyboardInterrupt exception on Windows,
similar to how those functions behave on macOS and Linux.
- gh-125519: Improve traceback if importlib.reload() is
called with an object that is not a module. Patch by Alex
Waygood.
- gh-125451: Fix deadlock when
concurrent.futures.ProcessPoolExecutor shuts down
concurrently with an error when feeding a job to a worker
process.
- gh-125115: Fixed a bug in pdb where arguments starting with
- can’t be passed to the debugged script.
- gh-125398: Fix the conversion of the VIRTUAL_ENV path in
the activate script in venv when running in Git Bash for
Windows.
- gh-125245: Fix race condition when importing
collections.abc, which could incorrectly return an empty
module.
- gh-52551: Fix encoding issues in time.strftime(), the
strftime() method of the datetime classes datetime, date
and time and formatting of these classes. Characters
not encodable in the current locale are now acceptable
in the format string. Surrogate pairs and sequence
of surrogatescape-encoded bytes are no longer
recombinated. Embedded null character no longer terminates
the format string.
- gh-124984: Fixed thread safety in ssl in the free-threaded
build. OpenSSL operations are now protected by a per-object
lock.
- gh-124651: Properly quote template strings in venv
activation scripts.
- gh-124694: We’ve added
concurrent.futures.InterpreterPoolExecutor, which allows
you to run code in multiple isolated interpreters. This
allows you to circumvent the limitations of CPU-bound
threads (due to the GIL). Patch by Eric Snow.
- This addition is unrelated to PEP 734.
- gh-58032: Deprecate the argparse.FileType type converter.
- gh-99749: Adds a feature to optionally enable suggestions
for argument choices and subparser names if mistyped by the
user.
- gh-58956: Fixed a bug in pdb where sometimes the breakpoint
won’t trigger if it was set on a function which is already
in the call stack.
- gh-124111: The tkinter module can now be built to use
either the new version 9.0.0 of Tcl/Tk or the latest
release 8.6.15 of Tcl/Tk 8. Tcl/Tk 9 includes many
improvements, both to the Tcl language and to the
appearance and utility of the graphical user interface
provided by Tk.
- gh-80958: unittest discovery supports PEP 420 namespace
packages as start directory again.
- gh-123370: Fix the canvas not clearing after running
turtledemo clock.
- gh-89083: Add uuid.uuid8() for generating UUIDv8 objects as
specified in RFC 9562. Patch by Bénédikt Tran
- gh-122549: Add platform.invalidate_caches() to invalidate
cached results.
- gh-120754: Update unbounded read calls in zipfile to
specify an explicit size putting a limit on how much data
they may read. This also updates handling around ZIP max
comment size to match the standard instead of reading
comments that are one byte too long.
- gh-121267: Improve the performance of tarfile when writing
files, by caching user names and group names.
- gh-70764: Fixed an issue where inspect.getclosurevars()
would incorrectly classify an attribute name as a global
variable when the name exists both as an attribute name and
a global variable.
- gh-118289: posixpath.realpath() now raises
NotADirectoryError when strict mode is enabled and a
non-directory path with a trailing slash is supplied.
- gh-119826: Always return an absolute path for
os.path.abspath() on Windows.
- gh-97850: Remove deprecated pkgutil.get_loader() and
pkgutil.find_loader().
- gh-118986: Add socket.IPV6_RECVERR constant (available
since Linux 2.2).
- gh-116897: Accepting objects with false values (like 0 and
[]) except empty strings, byte-like objects and None in
urllib.parse functions parse_qsl() and parse_qs() is now
deprecated.
- gh-101955: Fix SystemError when match regular expression
pattern containing some combination of possessive
quantifier, alternative and capture group.
- gh-71936: Fix a race condition in
multiprocessing.pool.Pool.
- bpo-46128: Strip unittest.IsolatedAsyncioTestCase stack
frames from reported stacktraces.
- gh-84852: Add MIME types for MS Embedded OpenType, OpenType
Layout, TrueType, WOFF 1.0 and 2.0 fonts. Patch by Sahil
Prajapati and Hugo van Kemenade.
- Documentation
- gh-126622: Added stub pages for removed modules explaining
their removal, where to find replacements, and linking to
the last Python version that supported them. Contributed by
Ned Batchelder.
- gh-125277: Require Sphinx 7.2.6 or later to build the
Python documentation. Patch by Adam Turner.
- gh-60712: Include the object type in the lists of
documented types. Change by Furkan Onder and Martin Panter.
- Core and Builtins
- gh-126795: Increase the threshold for JIT code
warmup. Depending on platform and workload, this can result
in performance gains of 1-9% and memory savings of 3-5%.
- gh-126341: Now ValueError is raised instead of SystemError
when trying to iterate over a released memoryview object.
- gh-126688: Fix a crash when calling os.fork() on some
operating systems, including SerenityOS.
- gh-126066: Fix importlib to not write an incomplete
.pyc files when a ulimit or some other operating system
mechanism is preventing the write to go through fully.
- gh-126222: Do not include count of “peek” items in
_PyUop_num_popped. This ensures that the correct number of
items are popped from the stack when a micro-op exits with
an error.
- gh-126366: Fix crash when using yield from on an object
that raises an exception in its __iter__.
- gh-126209: Fix an issue with skip_file_prefixes parameter
which resulted in an inconsistent behaviour between the C
and Python implementations of warnings.warn(). Patch by
Daehee Kim.
- gh-126312: Fix crash during garbage collection on an object
frozen by gc.freeze() on the free-threaded build.
- gh-103951: Relax optimization requirements to allow fast
attribute access to module subclasses.
- gh-126072: Following gh-126101, for Code Objects like
lambda, annotation and type alias, we no longer add None to
its co_consts.
- gh-126195: Improve JIT performance by 1.4% on macOS Apple
Silicon by using platform-specific memory protection
APIs. Patch by Diego Russo.
- gh-126139: Provide better error location when attempting to
use a future statement with an unknown future feature.
- gh-126072: Add a new attribute in co_flags to indicate
whether the first item in co_consts is the docstring. If a
code object has no docstring, None will NOT be inserted.
- gh-126076: Relocated objects such as tuple, bytes and
str objects are properly tracked by tracemalloc and its
associated hooks. Patch by Pablo Galindo.
- gh-90370: Avoid temporary tuple creation for vararg in
argument passing with Argument Clinic generated code (if
arguments either vararg or positional-only).
- gh-126018: Fix a crash in sys.audit() when passing a
non-string as first argument and Python was compiled in
debug mode.
- gh-126012: The memoryview type now supports subscription,
making it a generic type.
- gh-125837: Adds LOAD_SMALL_INT and LOAD_CONST_IMMORTAL
instructions. LOAD_SMALL_INT pushes a small integer equal
to the oparg to the stack. LOAD_CONST_IMMORTAL does the
same as LOAD_CONST but is more efficient for immortal
objects. Removes RETURN_CONST instruction.
- gh-125942: On Android, the errors setting of sys.stdout was
changed from surrogateescape to backslashreplace.
- gh-125859: Fix a crash in the free threading build when
gc.get_objects() or gc.get_referrers() is called during an
in-progress garbage collection.
- gh-125868: It was possible in 3.14.0a1 only for
attribute lookup to give the wrong value. This was
due to an incorrect specialization in very specific
circumstances. This is fixed in 3.14.0a2.
- gh-125498: The JIT has been updated to leverage Clang 19’s
new preserve_none attribute, which supports more platforms
and is more useful than LLVM’s existing ghccc calling
convention. This also removes the need to manually patch
the calling convention in LLVM IR, simplifying the JIT
compilation process.
- gh-125703: Correctly honour tracemalloc hooks in
specialized Py_DECREF paths. Patch by Pablo Galindo
- gh-125593: Use color to highlight error locations in
traceback from exception group
- gh-125017: Fix crash on certain accesses to the
__annotations__ of staticmethod and classmethod objects.
- gh-125588: The Python PEG generator can now use f-strings
in the grammar actions. Patch by Pablo Galindo
- gh-125444: Fix illegal instruction for older Arm
architectures. Patch by Diego Russo, testing by Ross
Burton.
- gh-118423: Add a new INSTRUCTION_SIZE macro to the cases
generator which returns the current instruction size.
- gh-125038: Fix crash when iterating over a generator
expression after direct changes on gi_frame.f_locals. Patch
by Mikhail Efimov.
- gh-124855: Don’t allow the JIT and perf support to be
active at the same time. Patch by Pablo Galindo
- gh-123714: Update JIT compilation to use LLVM 19
- gh-123930: Improve the error message when a script
shadowing a module from the standard library causes
ImportError to be raised during a “from” import. Similarly,
improve the error message when a script shadowing a third
party module attempts to “from” import an attribute from
that third party module while still initialising.
- gh-119793: The map() built-in now has an optional
keyword-only strict flag like zip() to check that all the
iterables are of equal length. Patch by Wannes Boeykens.
- gh-118950: Fix bug where SSLProtocol.connection_lost wasn’t
getting called when OSError was thrown on writing to
socket.
- gh-113570: Fixed a bug in reprlib.repr where it incorrectly
called the repr method on shadowed Python built-in types.
- C API
- gh-126554: Fix error handling in ctypes.CDLL objects which
could result in a crash in rare situations.
- gh-126061: Add PyLong_IsPositive(), PyLong_IsNegative() and
PyLong_IsZero() for checking if a PyLongObject is positive,
negative, or zero, respectively.
- gh-125608: Fix a bug where dictionary watchers
(e.g., PyDict_Watch()) on an object’s attribute dictionary
(__dict__) were not triggered when the object’s attributes
were modified.
- gh-123619: Added the
PyUnstable_Object_EnableDeferredRefcount() function for
enabling PEP 703 deferred reference counting.
- gh-121654: Add PyType_Freeze() function to make a type
immutable. Patch by Victor Stinner.
- gh-120026: The Py_HUGE_VAL macro is soft deprecated.
- Build
- gh-126691: Removed the --with-emscripten-target configure
flag. We unified the node and browser options and the same
build can now be used, independent of target runtime.
- gh-123877: Use wasm32-wasip1 as the target triple for
WASI instead of wasm32-wasi. The latter will eventually
be reclaimed for WASI 1.0 while CPython currently only
supports WASI preview1.
- gh-126458: Disable SIMD support for HACL under WASI.
- gh-89640: Hard-code float word ordering as little endian on
WASM.
- gh-126206: make clinic now runs Argument Clinic using the
--force option, thus forcefully regenerating generated
code.
- gh-126187: Introduced Tools/wasm/emscripten.py to simplify
doing Emscripten builds.
- gh-124932: For cross builds, there is now support for
having a different install prefix than the host_prefix used
by getpath.py. This is set to / by default for Emscripten,
on other platforms the default behavior is the same as
before.
- gh-125946: The minimum supported Android version is now 7.0
(API level 24).
- gh-125940: The Android build now supports 16 KB page sizes.
- gh-89640: Improve detection of float word ordering on Linux
when link-time optimizations are enabled.
- gh-124928: Emscripten builds now require node >= 18.
- gh-115382: Fix cross compile failures when the host and
target SOABIs match.
- Remove upstreamed patches:
- fix_test_generated_data.patch
- fix_test_ftp_error.patch
- gh125535-Lib_IntVector_Intrinsics_vec128.patch
- Don't limit clang to clang18.
OBS-URL: https://build.opensuse.org/request/show/1228813
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python314?expand=0&rev=3
- Tools/Demos
- gh-126807: Fix extraction warnings in pygettext.py caused
by mistaking function definitions for function calls.
- gh-126167: The iOS testbed was modified so that it can be
used by third-party projects for testing purposes.
- Tests
- gh-126909: Fix test_os extended attribute tests to work on
filesystems with 1 KiB xattr size limit.
- gh-125730: Change make test to not run GUI tests by
default. Use make ci to run tests with GUI tests instead.
- gh-124295: Add translation tests to the argparse module.
- Security
- gh-126623: Upgrade libexpat to 2.6.4
- Library
- gh-85957: Add missing MIME types for images with RFCs: emf,
fits, g3fax, jp2, jpm, jpx, t38, tiff-fx and wmf. Patch by
Hugo van Kemenade.
- gh-126920: Fix the prefix and exec_prefix keys from
sysconfig.get_config_vars() incorrectly having the same
value as sys.base_prefix and sys.base_exec_prefix,
respectively, inside virtual environments. They now
accurately reflect sys.prefix and sys.exec_prefix.
- gh-67877: Fix memory leaks when regular expression matching
terminates abruptly, either because of a signal or because
memory allocation fails.
- gh-125063: marshal now supports slice objects. The marshal
format version was increased to 5.
- gh-126789: Fixed the values of sysconfig.get_config_vars(),
sysconfig.get_paths(), and their siblings when the site
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=23
Many new features for Python 3.14 are still being planned and
written. Among the new major new features and changes so far:
- PEP 649: deferred evaluation of annotations
- Improved error messages
- Upstream doesn't sign tarballs with GPG anymore, but uses
sigstore.
- Patches rebased and refreshed:
- CVE-2023-52425-libexpat-2.6.0-backport-15.6.patch
- bpo-31046_ensurepip_honours_prefix.patch
- fix-test-recursion-limit-15.6.patch
- python-3.3.0b1-fix_date_time_compiler.patch
- Add warning about no-GIL builds being experimental.
- Update to 3.13.0:
Major new features of the 3.13 series, compared to 3.12
Some of the new major new features and changes in Python 3.13 are:
- New features
- A new and improved interactive interpreter, based on
PyPy's, featuring multi-line editing and color support, as
well as colorized exception tracebacks.
- An experimental free-threaded build mode, which disables
the Global Interpreter Lock, allowing threads to run
more concurrently. The build mode is available as an
experimental feature in the Windows and macOS installers as
well.
- A preliminary, experimental JIT, providing the ground work
for significant performance improvements.
- The locals() builtin function (and its C equivalent)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=3
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.