Skip to content

Latest commit

 

History

History
1433 lines (1019 loc) · 31.9 KB

File metadata and controls

1433 lines (1019 loc) · 31.9 KB

Update bundled libexpat to 2.6.0

Fix possible crashes in :meth:`collections.deque.index` when the deque is concurrently modified.

For an empty reverse iterator for list will be reduced to :func:`reversed`. Patch by Donghee Na

Add :exc:`PythonFinalizationError` exception. This exception derived from :exc:`RuntimeError` is raised when an operation is blocked during the :term:`Python finalization <interpreter shutdown>`. Patch by Victor Stinner.

Add :func:`sys._clear_internal_caches`, which clears all internal performance-related caches (and deprecate the less-general :func:`sys._clear_type_cache` function).

Fix compilation crashes in uncommon code examples using :func:`super` inside a comprehension in a class body.

Adapt :class:`set` and :class:`frozenset` methods to Argument Clinic.

Setters for members with an unsigned integer type now support the same range of valid values for objects that has a :meth:`~object.__index__` method as for :class:`int`.

Changed socket type validation in :meth:`~asyncio.loop.create_datagram_endpoint` to accept all non-stream sockets. This fixes a regression in compatibility with raw sockets.

Fixes a race between PyParkingLot_Park and _PyParkingLot_UnparkAll.

Limit the number of versions that a single class can use. Prevents a few wayward classes using up all the version numbers.

The :func:`chr` builtin function now always raises :exc:`ValueError` for values outside the valid range. Previously it raised :exc:`OverflowError` for very large or small values.

No longer specialize calls to classes, if those classes have metaclasses. Fixes bug where the __call__ method of the metaclass was not being called.

Improve error message for function calls with bad keyword arguments via getargs

The free-threaded build no longer allocates space for the PyGC_Head structure in objects that support cyclic garbage collection. A number of other fields and data structures are used as replacements, including ob_gc_bits, ob_tid, and mimalloc internal data structures.

Lower the recursion limit under a debug build of WASI.

Compiler applies folding of LOAD_CONST with following instruction in a separate pass before other optimisations. This enables jump threading in certain circumstances.

Fix a :exc:`RuntimeWarning` emitted when assign an integer-like value that is not an instance of :class:`int` to an attribute that corresponds to a C struct member of :ref:`type <PyMemberDef-types>` T_UINT and T_ULONG. Fix a double :exc:`RuntimeWarning` emitted when assign a negative integer value to an attribute that corresponds to a C struct member of type T_UINT.

Compiler propagates line numbers before optimization, leading to more optimization opportunities and removing the need for the guarantee_lineno_for_exits hack.

The free-threaded build now has its own thread-safe GC implementation that uses mimalloc to find GC tracked objects. It is non-generational, unlike the existing GC implementation.

Fix segmentation fault caused by an incorrect format string in TypeError exception when more than two arguments are passed to int.

The END_FOR instruction now pops only one value. This is to better support side exits in loops.

Make :class:`queue.SimpleQueue` thread safe when the GIL is disabled.

Implement the foundations of the Tier 2 redundancy eliminator.

frame.clear(): Clear frame.f_locals as well, and not only the fast locals. This is relevant once frame.f_locals was accessed, which would contain also references to all the locals.

Convert :class:`collections.deque` to use Argument Clinic.

Make methods on :class:`collections.deque` thread-safe when the GIL is disabled.

Add an option (--enable-experimental-jit for configure-based builds or --experimental-jit for PCbuild-based ones) to build an experimental just-in-time compiler, based on copy-and-patch

Make interp->obmalloc a pointer. For interpreters that share state with the main interpreter, this points to the same static memory structure. For interpreters with their own obmalloc state, it is heap allocated. Add free_obmalloc_arenas() which will free the obmalloc arenas and radix tree structures for interpreters with their own obmalloc state.

Add warning when creating :class:`type` using a namespace dictionary with non-string keys. Patched by Daniel Urban and Furkan Onder.

Use native Win32 condition variables.

Fix a bug in :mod:`doctest` where incorrect line numbers would be reported for decorated functions.

Fix several :func:`format` bugs when using the C implementation of :class:`~decimal.Decimal`: * memory leak in some rare cases when using the z format option (coerce negative 0) * incorrect output when applying the z format option to type F (fixed-point with capital NAN / INF) * incorrect output when applying the # format option (alternate form)

Fix confused traceback when floordiv, mod, or divmod operations happens between instances of :class:`fractions.Fraction` and :class:`complex`.

Most exceptions are now ignored when attempting to set the __orig_class__ attribute on objects returned when calling :mod:`typing` generic aliases (including generic aliases created using :data:`typing.Annotated`). Previously only :exc:`AttributeError` was ignored. Patch by Dave Shawley.

Fix "issubclass() arg 1 must be a class" errors in certain cases of multiple inheritance with generic aliases (regression in early 3.13 alpha releases).

Fix tests for :class:`~xml.etree.ElementTree.XMLPullParser` with Expat 2.6.0.

:meth:`io.BufferedRandom.read1` now flushes the underlying write buffer.

Trailing ** no longer allows to match files and non-existing paths in recursive :func:`~glob.glob`.

Avoid race conditions in the creation of directories during concurrent extraction in :mod:`tarfile` and :mod:`zipfile`.

Speed up :meth:`pathlib.Path.glob` by removing redundant regex matching.

Partially revert the behavior of :meth:`tkinter.Text.count`. By default it preserves the behavior of older Python versions, except that setting wantobjects to 0 no longer has effect. Add a new parameter return_ints: specifying return_ints=True makes Text.count() always returning the single count as an integer instead of a 1-tuple or None.

When csv.Error is raised when handling TypeError, do not print the TypeError traceback.

Added _POSIX_VDISABLE from C's <unistd.h> to :mod:`termios`.

Update bundled pip to 24.0

:mod:`tarfile` no longer ignores errors when trying to extract a directory on top of a file.

Add :meth:`array.array.clear`.

Support tuple subclasses using auto() for enum member value.

Fix support of explicit option value "--" in :mod:`argparse` (e.g. --option=--).

Fix :class:`~datetime.date`-:class:`~datetime.datetime` comparison. Now the special comparison methods like __eq__ and __lt__ return :data:`NotImplemented` if one of comparands is :class:`!date` and other is :class:`!datetime` instead of ignoring the time part and the time zone or forcefully return "not equal" or raise :exc:`TypeError`. It makes comparison of :class:`!date` and :class:`!datetime` subclasses more symmetric and allows to change the default behavior by overriding the special comparison methods in subclasses.

Fix ctypes structs with array on Windows ARM64 platform by setting MAX_STRUCT_SIZE to 32 in stgdict. Patch by Diego Russo

Ensure that deprecation warning for 'N' specifier in :class:`~decimal.Decimal` format is not raised for cases where 'N' appears in other places in the format specifier. Based on patch by Stefan Krah.

Return both files and directories from :meth:`pathlib.Path.glob` if a pattern ends with "**". Previously only directories were returned.

Improve import time of :mod:`importlib.metadata` and :mod:`email.utils`.

Fix a leak of open socket in rare cases when error occurred in :class:`ssl.SSLSocket` creation.

:meth:`email.policy.EmailPolicy.fold` now always encodes non-ASCII characters in headers if :attr:`~email.policy.EmailPolicy.utf8` is false.

Synchronization of the :mod:`dbm.dumb` database is now no-op if there was no modification since opening or last synchronization. The directory file for a newly created empty :mod:`dbm.dumb` database is now created immediately after opening instead of deferring this until synchronizing or closing.

Add filter keyword-only parameter to :meth:`sqlite3.Connection.iterdump` for filtering database objects to dump. Patch by Mariusz Felisiak.

Prohibit subclassing pure-Python :class:`datetime.timezone`. This is consistent with C-extension implementation. Patch by Mariusz Felisiak.

Add the :meth:`!close` method for the iterator returned by :func:`xml.etree.ElementTree.iterparse`.

Reduce the import time of :mod:`threading` module by ~50%. Patch by Daniel Hollas.

Make the result of :func:`termios.tcgetattr` reproducible on Alpine Linux. Previously it could leave a random garbage in some fields.

Make :class:`threading.Lock` a real class, not a factory function. Add __new__ to _thread.lock type.

Add :mod:`dbm.sqlite3` as a backend to :mod:`dbm`, and make it the new default :mod:`!dbm` backend. Patch by Raymond Hettinger and Erlend E. Aasland.

Revert changes in :gh:`106584` which made calls of TestResult methods startTest() and stopTest() unbalanced.

Ignore an :exc:`OSError` in :meth:`asyncio.BaseEventLoop.create_server` when IPv6 is available but the interface cannot actually support it.

_DummyThread entries in threading._active are now automatically removed when the related thread dies.

Dismiss the :exc:`FileNotFound` error in :func:`ctypes.util.find_library` and just return None on Linux.

Expose more platform specific constants in the :mod:`fcntl` module on Linux, macOS, FreeBSD and NetBSD.

The :func:`tty.setcbreak` and new :func:`tty.cfmakecbreak` no longer clears the terminal input ICRLF flag. This fixes a regression introduced in 3.12 that no longer matched how OSes define cbreak mode in their stty(1) manual pages.

Remove type hints from Lib/asyncio/staggered.py. The annotations in the typeshed project should be used instead.

Avoid reference cycle in ElementTree.iterparse. The iterator returned by ElementTree.iterparse may hold on to a file descriptor. The reference cycle prevented prompt clean-up of the file descriptor if the returned iterator was not exhausted.

The signature for the __replace__ method on :mod:`dataclasses` now has the first argument named self, rather than obj.

:exc:`OSError` raised when run a subprocess now only has filename attribute set to cwd if the error was caused by a failed attempt to change the current directory.

Enum: correctly handle tuple subclasses in custom __new__.

Support deprecation of options, positional arguments and subcommands in :mod:`argparse`.

Speed up dataclasses.asdict up to 1.35x.

Fix a reference leak in :class:`asyncio.selector_events.BaseSelectorEventLoop` when SSL handshakes fail. Patch contributed by Jamie Phan.

Accept :term:`path-like objects <path-like object>` as patterns in :meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob`.

Ensure that a :func:`asyncio.Condition.notify` call does not get lost if the awakened Task is simultaneously cancelled or encounters any other error.

Fix the behavior of tag_unbind() methods of :class:`tkinter.Text` and :class:`tkinter.Canvas` classes with three arguments. Previously, widget.tag_unbind(tag, sequence, funcid) destroyed the current binding for sequence, leaving sequence unbound, and deleted the funcid command. Now it removes only funcid from the binding for sequence, keeping other commands, and deletes the funcid command. It leaves sequence unbound only if funcid was the last bound command.

Fix rendering class methods, bound methods, method and function aliases in :mod:`pydoc`. Class methods no longer have "method of builtins.type instance" note. Corresponding notes are now added for class and unbound methods. Method and function aliases now have references to the module or the class where the origin was defined if it differs from the current. Bound methods are now listed in the static methods section. Methods of builtin classes are now supported as well as methods of Python classes.

Add more validation checks in the :class:`csv.Dialect` constructor. :exc:`ValueError` is now raised if the same character is used in different roles.

Fix support of :data:`~csv.QUOTE_NOTNULL` and :data:`~csv.QUOTE_STRINGS` in :func:`csv.reader`.

Speed up :meth:`pathlib.Path.walk` by using :attr:`os.DirEntry.path` where possible.

When replace() method is called on a subclass of datetime, date or time, properly call derived constructor. Previously, only the base class's constructor was called.

Also, make sure to pass non-zero fold values when creating subclasses in various methods. Previously, fold was silently ignored.

Speed-up :func:`datetime.datetime.replace`, :func:`datetime.date.replace` and :func:`datetime.time.replace`.

Set breakpoint on the first executable line of the function, instead of the line of function definition when the user do break func using :mod:`pdb`

Improve handling of pdb convenience variables to avoid replacing string contents.

Add option to calendar module CLI to specify the weekday to start each week. Patch by Steven Ward.

Recognise image/webp as a standard format in the :mod:`mimetypes` module.

Fix the :mod:`tkinter` widget method :meth:`!wm_attributes`. It now accepts the attribute name without the minus prefix to get window attributes and allows to specify attributes and values to set as keyword arguments. Add new optional keyword argument return_python_dict: calling w.wm_attributes(return_python_dict=True) returns the attributes as a dict instead of a tuple. Calling w.wm_attributes() now returns a tuple instead of string if wantobjects was set to 0.

Many functions now emit a warning if a boolean value is passed as a file descriptor argument.

Added check for file modification during debugging with :mod:`pdb`

Show the Tcl/Tk patchlevel (rather than version) in :meth:`tkinter._test`.

Fix race condition in :mod:`trace`. Instead of checking if a directory exists and creating it, directly call :func:`os.makedirs` with the kwarg exist_ok=True.

Set unixfrom envelope in :class:`mailbox.mbox` and :class:`mailbox.MMDF`.

Fix stacklevel in InvalidTZPathWarning during :mod:`zoneinfo` module import.

Allow :class:`ctypes.Union` to be nested in :class:`ctypes.Structure` when the system endianness is the opposite of the classes.

Fix null pointer dereference in :func:`lzma._decode_filter_properties` due to improper handling of BCJ filters with properties of zero length. Patch by Radislav Chugunov.

Add :py:class:`queue.Queue` termination with :py:meth:`~queue.Queue.shutdown`.

Changed argparse flag options formatting to remove redundancy.

Add POSIX pseudo-terminal functions :func:`os.posix_openpt`, :func:`os.grantpt`, :func:`os.unlockpt`, and :func:`os.ptsname`.

When :func:`os.fork` is called from a foreign thread (aka _DummyThread), the type of the thread in a child process is changed to _MainThread. Also changed its name and daemonic status, it can be now joined.

Add :func:`os.path.isreserved`, which identifies reserved pathnames such as "NUL", "AUX" and "CON". This function is only available on Windows.

Deprecate :meth:`!pathlib.PurePath.is_reserved`.

The inspect functions isgeneratorfunction, iscoroutinefunction, isasyncgenfunction now support functools.partialmethod wrapped functions the same way they support functools.partial.

Fix an example for :class:`~logging.LoggerAdapter` in the Logging Cookbook.

Move the :mod:`csv` module docstring to the :mod:`!csv` module instead of reexporting it from the internal :mod:`!_csv` module, and remove __doc__ from csv.__all__.

Move :attr:`!csv.__version__` to the :mod:`!csv` module instead of reexporting it from the internal :mod:`!_csv` module, and remove __version__ from csv.__all__.

Added test exclusions required to run the test suite on iOS.

Fix test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be in sync with zinfo.external_attr

Avoid vendoring vcruntime140_threads.dll when building with Visual Studio 2022 version 17.8.

Promote WASI to a tier 2 platform and drop Emscripten from tier 3 in configure.ac.

configure and Makefile were refactored to accommodate framework builds on Apple platforms other than macOS.

Add :c:func:`!getgrent` as a prerequisite for building the :mod:`grp` module.

Fixes py.exe launcher failing when run as users without user profiles.

Update Windows installer to use SQLite 3.45.1.

Update Windows build to use OpenSSL 3.0.13.

Update Windows builds to use zlib v1.3.1.

The py.exe launcher will no longer attempt to run the Microsoft Store redirector when launching a script containing a /usr/bin/env shebang

Adds free-threaded binaries to Windows installer as an optional component.

Allows :mod:`multiprocessing` to create pools of greater than 62 processes.

Update macOS installer to use SQLite 3.45.1.

Update macOS installer to use OpenSSL 3.0.13.

Add Mach-O linkage support for :func:`platform.architecture`.

On macOS the result of os.statvfs and os.fstatvfs now correctly report the size of very large disks, in previous versions the reported number of blocks was wrong for disks with at least 2**32 blocks.

In idlelib code, stop redefining built-ins 'dict' and 'object'.

Revise IDLE bindings so that events from mouse button 4/5 on non-X11 windowing systems (i.e. Win32 and Aqua) are not mistaken for scrolling.

Don't set LDSHARED when building for WASI.

Update GitHub CI workflows to use OpenSSL 3.0.13 and multissltests to use 1.1.1w, 3.0.13, 3.1.5, and 3.2.1.

Fix a bug in Argument Clinic that generated incorrect code for methods with no parameters that use the :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS <METH_METHOD-METH_FASTCALL-METH_KEYWORDS>` calling convention. Only the positional parameter count was checked; any keyword argument passed would be silently accepted.

Adds :c:func:`PyLong_AsNativeBytes`, :c:func:`PyLong_FromNativeBytes` and :c:func:`PyLong_FromUnsignedNativeBytes` functions.

:c:func:`PyBuffer_FillInfo` now raises a :exc:`SystemError` if called with :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. These flags should only be used with the PyMemoryView_* C API.

:c:func:`PyObject_GetBuffer` now raises a :exc:`SystemError` if called with :c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. These flags should only be used with the PyMemoryView_* C API.

Add PyCFunctionFast and PyCFunctionFastWithKeywords typedefs (identical to the existing _PyCFunctionFast and _PyCFunctionFastWithKeywords typedefs, just without a leading _ prefix).

Add :c:func:`PyList_GetItemRef`, which is similar to :c:func:`PyList_GetItem` but returns a :term:`strong reference` instead of a :term:`borrowed reference`.

Add PyTime C API:

Patch by Victor Stinner.

Add :c:func:`PyDict_SetDefaultRef`: insert a key and value into a dictionary if the key is not already present. This is similar to :meth:`dict.setdefault`, but returns an integer value indicating if the key was already present. It is also similar to :c:func:`PyDict_SetDefault`, but returns a strong reference instead of a borrowed reference.