Skip to content

Latest commit

 

History

History
830 lines (597 loc) · 19.1 KB

3.14.0a4.rst

File metadata and controls

830 lines (597 loc) · 19.1 KB

Usage of the unified Apple System Log APIs was disabled when the minimum macOS version is earlier than 10.12.

Fix a bug where Argument Clinic's C pre-processor parser tried to parse pre-processor directives inside C comments. Patch by Erlend Aasland.

Temporarily do not use test_embed in PGO profile builds until the problem with test_init_pyvenv_cfg failing in some configurations is resolved.

Fix :exc:`ResourceWarning` in :meth:`urllib.robotparser.RobotFileParser.read`.

Add new assertion methods for :mod:`unittest`: :meth:`~unittest.TestCase.assertHasAttr`, :meth:`~unittest.TestCase.assertNotHasAttr`, :meth:`~unittest.TestCase.assertIsSubclass`, :meth:`~unittest.TestCase.assertNotIsSubclass` :meth:`~unittest.TestCase.assertStartsWith`, :meth:`~unittest.TestCase.assertNotStartsWith`, :meth:`~unittest.TestCase.assertEndsWith` and :meth:`~unittest.TestCase.assertNotEndsWith`.

Improve import time of :mod:`pickle` by 25% by removing an unnecessary regular expression. As such, :mod:`re` is no more implicitly available as pickle.re. Patch by Bénédikt Tran.

Fixes :func:`typing.evaluate_forward_ref` not showing deprecation when type_params arg is not passed.

Fix possible conflicts in generated :mod:`tkinter` widget names if the widget class name ends with a digit.

Improved import time of :mod:`asyncio`.

Fix cyclic garbage introduced by :meth:`asyncio.loop.create_task` and :meth:`asyncio.TaskGroup.create_task` holding a reference to the created task if it is eager.

Add internal thread safe handle to be used in :meth:`asyncio.loop.call_soon_threadsafe` for thread safe cancellation.

Fix crash when using :mod:`ctypes` pointers concurrently on the :term:`free threaded <free threading>` build.

Only show the current thread in :mod:`faulthandler` on the :term:`free threaded <free threading>` build to prevent races.

Fix crash when using :func:`faulthandler.dump_traceback` while other threads are active on the :term:`free threaded <free threading>` build.

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.

Unify the instance check for :class:`typing.Union` and :class:`types.UnionType`: :class:`!Union` now uses the instance checks against its parameters instead of the subclass checks.

Fix :meth:`!xml.dom.xmlbuilder.DOMEntityResolver.resolveEntity`, which was broken by the Python 3.0 transition.

Highlight today in colour in :mod:`calendar`'s CLI output. Patch by Hugo van Kemenade.

Allow :meth:`!xml.dom.xmlbuilder.DOMParser.parse` to correctly handle :class:`!xml.dom.xmlbuilder.DOMInputSource` instances that only have a :attr:`!systemId` attribute set.

Improve generation of :class:`~uuid.UUID` objects version 3, 4, 5, and 8 via their dedicated functions by 30%. Patch by Bénédikt Tran.

Improve performance of :func:`copy.copy` by 30% via a fast path for atomic types and container types.

Fix crash when modifying :class:`ctypes._CFuncPtr` objects concurrently on the :term:`free threaded <free threading>` build.

Revert the font of :mod:`turtledemo`'s menu bar to its default value and display the shortcut keys in the correct position.

Fix resetting the default window icon by passing default='' to the :mod:`tkinter` method :meth:`!wm_iconbitmap`.

Fix quick extraction of module docstrings from a file in :mod:`pydoc`. It now supports docstrings with single quotes, escape sequences, raw string literals, and other Python syntax.

Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences. Patch by Victor Stinner.

Fix support of localized error messages reported by :manpage:`dlerror(3)` and :manpage:`gdbm_strerror <gdbm(3)>` in :mod:`ctypes` and :mod:`dbm.gnu` functions respectively. Patch by Bénédikt Tran.

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.

Fix the position when doing interleaved seeks and reads in uncompressed, unencrypted zip files returned by :meth:`zipfile.ZipFile.open`.

Add the :data:`~os.SCHED_DEADLINE` and :data:`~os.SCHED_NORMAL` constants to the :mod:`os` module.

Add missing __class_getitem__ method to the Python implementation of :func:`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.

:class:`multiprocessing.pool.Pool` now properly restores blocked signal handlers of the parent thread when creating processes via either spawn or forkserver.

Fix an issue in :meth:`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.

Correct behavior of :func:`!asyncio.selector_events.BaseSelectorEventLoop._accept_connection` in handling :exc:`ConnectionAbortedError` in a loop. This improves performance on OpenBSD.

When a descriptive error message cannot be provided for an :exc:`ssl.SSLError`, the "unknown error" message now shows the internal error code (as retrieved by ERR_get_error and similar OpenSSL functions).

Fix crash when dict with keys in invalid encoding were passed to several functions in _interpreters module.

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).

:class:`tempfile.NamedTemporaryFile` will now issue a :exc:`ResourceWarning` when it is finalized by the garbage collector without being explicitly closed.

Expose error code :data:`~xml.parsers.expat.errors.XML_ERROR_NOT_STARTED` of Expat >=2.6.4 in :mod:`xml.parsers.expat.errors`.

:mod:`getopt` and :mod:`optparse` are no longer marked as deprecated. There are legitimate reasons to use one of these modules in preference to :mod:`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.

Add :data:`~socket.SO_REUSEPORT_LB` constant to :mod:`socket` for FreeBSD.

:class:`enum.EnumDict` can now be used without resorting to private API.

Add :meth:`zipfile.ZipInfo._for_archive` setting default properties on :class:`~zipfile.ZipInfo` objects. Patch by Bénédikt Tran and Jason R. Coombs.

Deprecate calling the Python implementation of :meth:`functools.reduce` with a function or sequence as a :term:`keyword argument`. This will be forbidden in Python 3.16 in order to match the C implementation.

:func:`ctypes.memoryview_at` now exists to create a :class:`memoryview` object that refers to the supplied pointer and length. This works like :func:`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.

Added support for other image formats (PNG, PGM, and PPM) to the turtle module. Patch by Shin-myoung-serp.

Fix a :exc:`SystemError` when using :func:`anext` with a default tuple value. Patch by Bénédikt Tran.

Fix a crash when setting the recursion limit while other threads are active on the :term:`free threaded <free threading>` build.

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.

Improve performance of class methods by using a freelist.

Update :c:type:`PyASCIIObject` layout to handle interned field with the atomic operation. Patch by Donghee Na.

Upgrade HTTP digest authentication algorithm for :mod:`urllib.request` by supporting SHA-256 digest authentication as specified in RFC 7616.

Increase usage of freelist for :class:`int` allocation.

Optimize Py_BEGIN_CRITICAL_SECTION for simple recursive calls.

Adds stackref debugging when Py_STACKREF_DEBUG is set. Finds all double-closes and leaks, logging the origin and last borrow.

Inspired by HPy's debug mode. https://docs.hpyproject.org/en/latest/debug-mode.html

Fix a bug where :keyword:`except* <except_star>` does not properly check the return value of an :exc:`ExceptionGroup`'s :meth:`~BaseExceptionGroup.split` function, leading to a crash in some cases. Now when :meth:`~BaseExceptionGroup.split` returns an invalid object, :keyword:`except* <except_star>` raises a :exc:`TypeError` with the original raised :exc:`ExceptionGroup` object chained to it.

Avoid error from calling PyModule_GetFilenameObject on a non-module object when importing a non-existent symbol from a non-module object.

Indicate through :data:`ssl.HAS_PHA` whether the :mod:`ssl` module supports TLSv1.3 post-handshake client authentication (PHA). Patch by Will Childs-Klein.

Add a new flag, CO_METHOD, to :attr:`~codeobject.co_flags` that indicates whether the code object belongs to a function defined in class scope.

During the :ref:`path initialization <sys-path-init>`, we now check if base_exec_prefix is the same as base_prefix before falling back to searching the Python interpreter directory.

We now use the location of the libpython runtime library used in the current proccess to determine :data:`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.

Do not use the type attribute cache for types with incompatible :term:`MRO`.

Objects/unicodeobject.c: fix a crash on DEBUG builds in _copy_characters when there is nothing to copy.

Fix an issue where the experimental JIT may infer an incorrect result type for exponentiation (** and **=), leading to bugs or crashes.

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:func:`Py_FatalError` no longer shows all threads on the :term:`free threaded <free threading>` build to prevent crashes.

Add macros :c:func:`Py_PACK_VERSION` and :c:func:`Py_PACK_FULL_VERSION` for bit-packing Python version numbers.

Add :c:func:`PyWeakref_IsDead` function, which tests if a weak reference is dead.

Add :c:func:`Py_fopen` function to open a file. Similar to the :c:func:`!fopen` function, but the path parameter is a Python object and an exception is set on error. Add also :c:func:`Py_fclose` function to close a file, function needed for Windows support. Patch by Victor Stinner.

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.

Skip BOLT optimization of functions using computed gotos, fixing errors on build with LLVM 19.

GNU Autoconf 2.72 is now required to generate :file:`configure`. Patch by Erlend Aasland.

Fix building the :mod:`curses` module on platforms with libncurses but without libncursesw.

Add support for cross-compiling to x86_64 on aarch64/arm64 macOS.

Set LIBS instead of LDFLAGS when checking if :mod:`sqlite3` library functions are available. This fixes the ordering of linked libraries during checks, which was incorrect when using a statically linked libsqlite3.

Error on unguarded-availability in macOS builds, preventing invalid use of symbols that are not available in older versions of the OS.

Remove Py_STRFTIME_C99_SUPPORT conditions in favor of requiring C99 :manpage:`strftime(3)` specifier support at build time. When cross-compiling, there is no build time check and support is assumed.

Add option --pystats to the Windows build to enable performance statistics collection.