Skip to content

Latest commit

 

History

History
2414 lines (1719 loc) · 53.5 KB

3.13.0a3.rst

File metadata and controls

2414 lines (1719 loc) · 53.5 KB

Skip .pth files with names starting with a dot or hidden file attribute.

Created a Software Bill-of-Materials document and tooling for tracking dependencies.

Compiler duplicates basic blocks that have an eval breaker check, no line number, and multiple predecessors.

A jump leaving an exception handler back to normal code no longer checks the eval breaker.

Set the C recursion limit to 4000 on Windows, and 10000 on Linux/OSX. This seems to be near the sweet spot to maintain safety, but not compromise backwards compatibility.

Add typed stack effects to the interpreter DSL, along with various instruction annotations.

On Windows, file descriptors wrapping Windows handles are now created non inheritable by default (PEP 446). Patch by Zackery Spytz and Victor Stinner.

Guarantee that all executors make progress. This then guarantees that tier 2 execution always makes progress.

Fix an issue where the finalizer of PyAsyncGenASend objects might not be called if they were allocated from a free list.

Compiler changed so that synthetic jumps which are not at loop end no longer check the eval breaker.

Fix a regression in the :mod:`codeop` module that was causing it to incorrectly identify incomplete f-strings. Patch by Pablo Galindo

Check for a valid tp_version_tag before performing bytecode specializations that rely on this value being usable.

Changed error message in case of no 'in' keyword after 'for' in list comprehensions

Fix an issue that caused important instruction pointer updates to be optimized out of tier two traces.

Fixed bug where a redundant NOP is not removed, causing an assertion to fail in the compiler in debug mode.

Fix an error that was causing the parser to try to overwrite existing errors and crashing in the process. Patch by Pablo Galindo

No longer issue spurious PY_UNWIND events for optimized calls to classes.

Fix segfault in the compiler on with statement with 19 context managers.

Improve :py:class:`super` error messages.

Only use NULL in the exception stack to indicate an exception was handled. Patch by Carey Metcalfe.

Increase the C recursion limit by a factor of 3 for non-debug builds, except for webassembly and s390 platforms which are unchanged. This mitigates some regressions in 3.12 with deep recursion mixing builtin (C) and Python code.

Fixed bug where a redundant NOP is not removed, causing an assertion to fail in the compiler in debug mode.

Use per AST-parser state rather than global state to track recursion depth within the AST parser to prevent potential race condition due to simultaneous parsing.

The issue primarily showed up in 3.11 by multithreaded users of :func:`ast.parse`. In 3.12 a change to when garbage collection can be triggered prevented the race condition from occurring.

Change the API and contract of _PyExecutorObject to return the next_instr pointer, instead of the frame, and to always execute at least one instruction.

Optimize builtin functions :func:`min` and :func:`max`.

Correctly compute end column offsets for multiline tokens in the :mod:`tokenize` module. Patch by Pablo Galindo

Fix None.__ne__(None) returning NotImplemented instead of False.

:func:`input` now raises a ValueError when output on the terminal if the prompt contains embedded null characters instead of silently truncating it.

Fix SystemError in the import statement and in __reduce__() methods of builtin types when __builtins__ is not a dict.

Use color to highlight error locations in tracebacks. Patch by Pablo Galindo

Fixes a bug where a bytearray object could be cleared while iterating over an argument in the bytearray.join() method that could result in reading memory after it was freed.

Do not clear unexpected errors during formatting error messages for ImportError and AttributeError for modules.

Workaround a bug in Apple's macOS platform zlib library where :func:`zlib.crc32` and :func:`binascii.crc32` could produce incorrect results on multi-gigabyte inputs. Including when using :mod:`zipfile` on zips containing large data.

Provide a better error message when accessing invalid attributes on partially initialized modules. The origin of the module being accessed is now included in the message to help with the common issue of shadowing other modules.

Add check for the type of __cause__ returned from calling the type T in raise from T.

Change coro.cr_frame/gen.gi_frame to return None after the coroutine/generator has been closed. This fixes a bug where :func:`~inspect.getcoroutinestate` and :func:`~inspect.getgeneratorstate` return the wrong state for a closed coroutine/generator.

Fix an error that was causing the parser to try to overwrite tokenizer errors. Patch by pablo Galindo

Fix error positions for decoded strings with backwards tokenize errors. Patch by Pablo Galindo

Make code generated for an empty f-string identical to the code of an empty normal string.

Avoid undefined behaviour when using the perf trampolines by not freeing the code arenas until shutdown. Patch by Pablo Galindo

The Tier 2 translator now tracks the confidence level for staying "on trace" (i.e. not exiting back to the Tier 1 interpreter) for branch instructions based on the number of bits set in the branch "counter". Trace translation ends when the confidence drops below 1/3rd.

:c:func:`PyComplex_RealAsDouble`/:c:func:`PyComplex_ImagAsDouble` now tries to convert an object to a :class:`complex` instance using its __complex__() method before falling back to the __float__() method. Patch by Sergey B Kirpichev.

Fix UnicodeEncodeError when :func:`email.message.get_payload` reads a message with a Unicode surrogate character and the message content is not well-formed for surrogateescape encoding. Patch by Sidney Markowitz.

Use the object's actual class name in :meth:`!_io.FileIO.__repr__`, :meth:`!_io._WindowsConsoleIO` and :meth:`!_io.TextIOWrapper.__repr__`, to make these methods subclass friendly.

Remove LibreSSL workarounds as per PEP 644.

Added :func:`sys._is_interned`.

Fix possible :exc:`OverflowError` in :meth:`socket.socket.sendfile` when pass count larger than 2 GiB on 32-bit platform.

:mod:`plistlib` now supports loading more deeply nested lists in binary format.

Fixed a bug in :class:`fractions.Fraction` where an invalid string using d in the decimals part creates a different error compared to other invalid letters/characters. Patch by Jeremiah Gabriel Pascual.

:meth:`sqlite3.Connection.iterdump` now ensures that foreign key support is disabled before dumping the database schema, if there is any foreign key violation. Patch by Erlend E. Aasland and Mariusz Felisiak.

The :class:`zipfile.ZipInfo` previously protected ._compresslevel attribute has been made public as .compress_level with the old _compresslevel name remaining available as a property to retain compatibility.

Fix :mod:`tkinter` method winfo_pathname() on 64-bit Windows.

Added :data:`mmap.MAP_NORESERVE`, :data:`mmap.MAP_NOEXTEND`, :data:`mmap.MAP_HASSEMAPHORE`, :data:`mmap.MAP_NOCACHE`, :data:`mmap.MAP_JIT`, :data:`mmap.MAP_RESILIENT_CODESIGN`, :data:`mmap.MAP_RESILIENT_MEDIA`, :data:`mmap.MAP_32BIT`, :data:`mmap.MAP_TRANSLATED_ALLOW_EXECUTE`, :data:`mmap.MAP_UNIX03` and :data:`mmap.MAP_TPRO`. All of them are mmap(2) flags on macOS.

:func:`asyncio.TaskGroup()` and :func:`asyncio.timeout()` context managers now handle :exc:`~asyncio.CancelledError` subclasses as well as exact :exc:`!CancelledError`.

unittest runner: Don't exit 5 if tests were skipped. The intention of exiting 5 was to detect issues where the test suite wasn't discovered at all. If we skipped tests, it was correctly discovered.

Insert :exc:`TimeoutError` in the context of the exception that was raised during exiting an expired :func:`asyncio.timeout` block.

Silence unraisable AttributeError when warnings are emitted during Python finalization.

Add Anchor to importlib.resources (in order for the code to comply with the documentation)

:func:`asyncio.Condition.wait()` now re-raises the same :exc:`CancelledError` instance that may have caused it to be interrupted. Fixed race condition in :func:`asyncio.Semaphore.acquire` when interrupted with a :exc:`CancelledError`.

Add CLOCK_MONOTONIC_RAW_APPROX and CLOCK_UPTIME_RAW_APPROX to :mod:`time` on macOS. These are clocks available on macOS 10.12 or later.

Restore the ability for :mod:`zipfile` to extractall from zip files with a "/" directory entry in them as is commonly added to zips by some wiki or bug tracker data exporters.

Raise deprecation warnings from :class:`pathlib.PurePath` and not its private base class PurePathBase.

Fix :exc:`UnicodeEncodeError` in :mod:`email` when re-fold lines that contain unknown-8bit encoded part followed by non-unknown-8bit encoded part.

In :meth:`asyncio.StreamReaderProtocol.connection_made`, there is callback that logs an error if the task wrapping the "connected callback" fails. This callback would itself fail if the task was cancelled. Prevent this by checking whether the task was cancelled first. If so, close the transport but don't log an error.

Add support for the allow_code argument in the :mod:`marshal` module. Passing allow_code=False prevents serialization and de-serialization of code objects which is incompatible between Python versions.

Fix resource warnings for unclosed files in :mod:`pickle` and :mod:`pickletools` command line interfaces.

Support loads str in :func:`plistlib.loads`.

Add default implementations of :meth:`pickle.Pickler.persistent_id` and :meth:`pickle.Unpickler.persistent_load` methods in the C implementation. Calling super().persistent_id() and super().persistent_load() in subclasses of the C implementation of :class:`pickle.Pickler` and :class:`pickle.Unpickler` classes no longer causes infinite recursion.

Indicate if there were no actual calls in unittest :meth:`~unittest.mock.Mock.assert_has_calls` failure.

Increase the backlog for :class:`multiprocessing.connection.Listener` objects created by :mod:`multiprocessing.manager` and :mod:`multiprocessing.resource_sharer` to significantly reduce the risk of getting a connection refused error when creating a :class:`multiprocessing.connection.Connection` to them.

Raise audit events from :class:`pathlib.Path` and not its private base class PathBase.

Make sure that webbrowser.MacOSXOSAScript sends webbrowser.open audit event.

When a second reference to a string appears in the input to :mod:`pickle`, and the Python implementation is in use, we are guaranteed that a single copy gets pickled and a single object is shared when reloaded. Previously, in protocol 0, when a string contained certain characters (e.g. newline) it resulted in duplicate objects.

Fix multiprocessing logger for %(filename)s.

Fix segfaults in the _elementtree module. Fix first segfault during deallocation of _elementtree.XMLParser instances by keeping strong reference to pyexpat module in module state for capsule lifetime. Fix second segfault which happens in the same deallocation process by keeping strong reference to _elementtree module in XMLParser structure for _elementtree module lifetime.

Fix import of :mod:`unittest.mock` when CPython is built without docstrings.

Fix regression in Python 3.12 where :class:`~typing.Protocol` classes that were not marked as :func:`runtime-checkable <typing.runtime_checkable>` would be unnecessarily introspected, potentially causing exceptions to be raised if the protocol had problematic members. Patch by Alex Waygood.

Add a new option aware_datetime in :mod:`plistlib` to loads or dumps aware datetime.

Fix rendering tracebacks with exceptions with a broken __getattr__

Fix an AttributeError during asyncio SSL protocol aborts in SSL-over-SSL scenarios.

Update bundled pip to 23.3.2.

Fixed tarfile list() method to show file type.

:meth:`asyncio.futures.Future.set_exception()` now transforms :exc:`StopIteration` into :exc:`RuntimeError` instead of hanging or other misbehavior. Patch contributed by Jamie Phan.

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

Improve error message when a JSON array or object contains a trailing comma. Patch by Carson Radtke.

The :mod:`subprocess` module can now use the :func:`os.posix_spawn` function with close_fds=True on platforms where posix_spawn_file_actions_addclosefrom_np is available. Patch by Jakub Kulik.

Make http.client.HTTPResponse.read1 and http.client.HTTPResponse.readline close IO after reading all data when content length is known. Patch by Illia Volochii.

Add support of :func:`os.fchmod` and a file descriptor in :func:`os.chmod` on Windows.

Fix :func:`shutil.copymode` and :func:`shutil.copystat` on Windows. Previously they worked differently if dst is a symbolic link: they modified the permission bits of dst itself rather than the file it points to if follow_symlinks is true or src is not a symbolic link, and did not modify the permission bits if follow_symlinks is false and src is a symbolic link.

:func:`os.posix_spawn` now accepts env=None, which makes the newly spawned process use the current process environment. Patch by Jakub Kulik.

Add a strict option to batched() in the itertools module.

Detect line numbers of properties in doctests.

Sync with importlib_metadata 7.0, including improved type annotations, fixed issue with symlinked packages in package_distributions, added EntryPoints.__repr__, introduced the diagnose script, added Distribution.origin property, and removed deprecated EntryPoint access by numeric index (tuple behavior).

Add support of :func:`os.lchmod` and the follow_symlinks argument in :func:`os.chmod` on Windows. Note that the default value of follow_symlinks in :func:`!os.lchmod` is False on Windows.

:func:`signal.signal` and :func:`signal.getsignal` no longer call repr on callable handlers. :func:`asyncio.run` and :meth:`asyncio.Runner.run` no longer call repr on the task results. Patch by Yilei Yang.

:mod:`dis` module functions add cache information to the :class:`~dis.Instruction` instance rather than creating fake :class:`~dis.Instruction` instances to represent the cache entries.

Reduce overhead to connect sockets with :mod:`asyncio` SelectorEventLoop.

Use :c:func:`!closefrom` on Linux where available (e.g. glibc-2.34), rather than only FreeBSD.

Fix ctypes structs with array on PPC64LE platform by setting MAX_STRUCT_SIZE to 64 in stgdict. Patch by Diego Russo.

The statistics.geometric_mean() function now returns zero for datasets containing a zero. Formerly, it would raise an exception.

Added :const:`LOG_FTP`, :const:`LOG_NETINFO`, :const:`LOG_REMOTEAUTH`, :const:`LOG_INSTALL`, :const:`LOG_RAS`, and :const:`LOG_LAUNCHD` tot the :mod:`syslog` module, all of them constants on used on macOS.

Fix :mod:`asyncio` SubprocessTransport.close() not to throw PermissionError when used with setuid executables.

Add the following constants to the :mod:`termios` module. These values are present in macOS system headers: ALTWERASE, B14400, B28800, B7200, B76800, CCAR_OFLOW, CCTS_OFLOW, CDSR_OFLOW, CDTR_IFLOW, CIGNORE, CRTS_IFLOW, EXTPROC, IUTF8, MDMBUF, NL2, NL3, NOKERNINFO, ONOEOT, OXTABS, VDSUSP, VSTATUS.

Fix an infinite recursion error in :func:`tempfile.TemporaryDirectory` cleanup on Windows.

:func:`shutil.rmtree` now only catches OSError exceptions. Previously a symlink attack resistant version of shutil.rmtree() could ignore or pass to the error handler arbitrary exception when invalid arguments were provided.

The use of del-safe symbols in subprocess was refactored to allow for use in cross-platform build environments.

Speed up :meth:`pathlib.Path.absolute`. Patch by Barney Gale.

Speedup :func:`issubclass` checks against simple :func:`runtime-checkable protocols <typing.runtime_checkable>` by around 6%. Patch by Alex Waygood.

Speedup :func:`isinstance` checks by roughly 20% for :func:`runtime-checkable protocols <typing.runtime_checkable>` that only have one callable member. Speedup :func:`issubclass` checks for these protocols by roughly 10%. Patch by Alex Waygood.

Remove deprecation error on passing onerror to :func:`shutil.rmtree`.

Add kwdefaults parameter to :data:`types.FunctionType` to set default keyword argument values.

Ensure name parameter is passed to event loop in :func:`asyncio.create_task`.

Fix a caching bug relating to :data:`typing.Annotated`. Annotated[str, True] is no longer identical to Annotated[str, 1].

Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it would no longer use the fast-path vfork() system call when it could have due to a logic bug, instead falling back to the safe but slower fork().

Also fixed a second 3.12.0 potential security bug. If a value of extra_groups=[] was passed to :mod:`subprocess.Popen` or related APIs, the underlying setgroups(0, NULL) system call to clear the groups list would not be made in the child process prior to exec().

This was identified via code inspection in the process of fixing the first bug.

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

Fix a crash in :func:`socket.if_indextoname` with specific value (UINT_MAX). Fix an integer overflow in :func:`socket.if_indextoname` on 64-bit non-Windows platforms.

Fix a spurious :exc:`RuntimeWarning` when executing the :mod:`zipfile` module.

Update the bundled copy of pip to version 23.3.1.

Add :data:`readline.backend` for the backend readline uses (editline or readline)

[Enum] Make EnumDict, EnumDict.member_names, EnumType._add_alias_ and EnumType._add_value_alias_ public.

Fix edge cases that could cause a key to be present in both the __required_keys__ and __optional_keys__ attributes of a :class:`typing.TypedDict`. Patch by Jelle Zijlstra.

Add keep_alive keyword parameter for :meth:`AbstractEventLoop.create_server` and :meth:`BaseEventLoop.create_server`.

Added support for TLS-PSK (pre-shared key) mode to the :mod:`ssl` module.

Fix regression in Python 3.12 where calling :func:`repr` on a module that had been imported using a custom :term:`loader` could fail with :exc:`AttributeError`. Patch by Alex Waygood.

Revert change to :class:`struct.Struct` initialization that broke some cases of subclassing.

Optimize :meth:`pathlib.PurePath.relative_to`. Patch by Alex Waygood.

Fix bug where comparison between instances of :class:`~doctest.DocTest` fails if one of them has None as its lineno.

Speed up a small handful of :mod:`pathlib` methods by removing some temporary objects.

Improve error message when trying to call :func:`issubclass` against a :class:`typing.Protocol` that has non-method members. Patch by Randolf Scholz.

Change :mod:`dis` output to display no-lineno as "--" instead of "None".

Deprecate the exc_type field of :class:`traceback.TracebackException`. Add exc_type_str to replace it.

Add extra tests for :func:`random.binomialvariate`

Fix a crash in :mod:`readline` when imported from a sub interpreter. Patch by Anthony Shaw

Slightly improve the import time of the :mod:`pathlib` module by deferring some imports. Patch by Barney Gale.

Change :mod:`dis` output to display logical labels for jump targets instead of offsets.

Add :meth:`Signature.format` to format signatures to string with extra options. And use it in :mod:`pydoc` to render more readable signatures that have new lines between parameters.

Make :func:`readline.set_completer_delims` work with libedit

Display multiple lines with traceback when errors span multiple lines.

When creating a :class:`typing.NamedTuple` class, ensure :func:`~object.__set_name__` is called on all objects that define __set_name__ and exist in the values of the NamedTuple class's class dictionary. Patch by Alex Waygood.

Add support of the "vsapi" element type in :meth:`tkinter.ttk.Style.element_create`.

Named tuple's methods _replace() and __replace__() now raise TypeError instead of ValueError for invalid keyword arguments.

Do not mangle sys.path[0] in :mod:`pdb` if safe_path is set

Fix a regression caused by a fix to gh-93162 whereby you couldn't configure a :class:`QueueHandler` without specifying handlers.

Fix the behavior of :mod:`tkinter` widget's unbind() method with two arguments. Previously, widget.unbind(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.

Implement basic formatting support (minimum width, alignment, fill) for :class:`fractions.Fraction`.

Fix crash during garbage collection of the :class:`io.BytesIO` buffer object.

Redirect the output of interact command of :mod:`pdb` to the same channel as the debugger. Add tests and improve docs.

:func:`email.utils.getaddresses` and :func:`email.utils.parseaddr` now return ('', '') 2-tuples in more situations where invalid email addresses are encountered instead of potentially inaccurate values. Add optional strict parameter to these two functions: use strict=False to get the old behavior, accept malformed inputs. getattr(email.utils, 'supports_strict_parsing', False) can be use to check if the strict parameter is available. Patch by Thomas Dwyer and Victor Stinner to improve the :cve:`2023-27043` fix.

:meth:`cmd.Cmd.do_help` now cleans docstrings with :func:`inspect.cleandoc` before writing them. Patch by Filip Łapkiewicz.

Add track parameter to :class:`multiprocessing.shared_memory.SharedMemory` that allows using shared memory blocks without having to register with the POSIX resource tracker that automatically releases them upon process exit.

Add private pathlib._PurePathBase class: a base class for :class:`pathlib.PurePath` that omits certain magic methods. It may be made public (along with _PathBase) in future.

Protect :mod:`zipfile` from "quoted-overlap" zipbomb. It now raises BadZipFile when try to read an entry that overlaps with other entry or central directory.

Fix possible reference leaks and crash when re-enter the __next__() method of :class:`itertools.pairwise`.

Small (10 - 20%) and trivial performance improvement of :func:`urllib.request.getproxies_environment`, typically useful when there are many environment variables to go over.

Add follow_symlinks keyword-only argument to :meth:`pathlib.Path.owner` and :meth:`~pathlib.Path.group`, defaulting to True.

Support tab completion in :mod:`cmd` for editline.

:func:`runpy.run_path` now decodes path-like objects, making sure __file__ and sys.argv[0] of the module being run are always strings.

Add :func:`warnings.deprecated`, a decorator to mark deprecated functions to static type checkers and to warn on usage of deprecated classes and functions. See PEP 702. Patch by Jelle Zijlstra.

Make hardcoded python name, a configurable parameter so that different implementations of python can override it instead of making huge diffs in sysconfig.py

:class:`mailbox.MH` now supports folders that do not contain a .mh_sequences file (e.g. Claws Mail IMAP-cache folders). Patch by Serhiy Storchaka.

Renamed :exc:`!re.error` to :exc:`PatternError` for clarity, and kept :exc:`!re.error` for backward compatibility. Patch by Matthias Bussonnier and Adam Chhina.

Fix a bug in :class:`tempfile.TemporaryDirectory` cleanup, which now no longer dereferences symlinks when working around file system permission errors.

On Windows, tempfile.TemporaryDirectory previously masked a PermissionError with NotADirectoryError during directory cleanup. It now correctly raises PermissionError if errors are not ignored. Patch by Andrei Kulakov and Ken Jin.

:func:`getpass.getuser` now raises :exc:`OSError` for all failures rather than :exc:`ImportError` on systems lacking the :mod:`pwd` module or :exc:`KeyError` if the password database is empty.

:class:`mmap.mmap` now has a trackfd parameter on Unix; if it is False, the file descriptor specified by fileno will not be duplicated.

The :func:`shutil.rmtree` function now ignores errors when calling :func:`os.close` when ignore_errors is True, and :func:`os.close` no longer retried after error.

:class:`io.TextIOWrapper` now correctly handles the decoding buffer after read() and write().

:func:`shutil.move` now moves a symlink into a directory when that directory is the target of the symlink. This provides the same behavior as the mv shell command. The previous behavior raised an exception. Patch by Jeffrey Kintscher.

Fixed memory leaks of :class:`pickle.Pickler` and :class:`pickle.Unpickler` involving cyclic references via the internal memo mapping.

The :func:`!pydoc.ispackage` function has been deprecated.

The :meth:`ssl.SSLSocket.recv_into` method no longer requires the buffer argument to implement __len__ and supports buffers with arbitrary item size.

:func:`warnings.filterwarnings()` and :func:`warnings.simplefilter()` now raise appropriate exceptions instead of AssertionError. Patch contributed by Rémi Lapeyre.

Fixed a race condition in :func:`shutil.rmtree` in which directory entries removed by another process or thread while shutil.rmtree() is running can cause it to raise FileNotFoundError. Patch by Jeffrey Kintscher.

Fix some error messages for invalid ISO format string combinations in strptime() that referred to directives not contained in the format string. Patch by Gordon P. Hemsley.

Fixed a class inheritance issue that can cause segfaults when deriving two or more levels of subclasses from a base class of Structure or Union.

Add a new :envvar:`PYTHON_HISTORY` environment variable to set the location of a .python_history file.

:class:`mailbox.Maildir` now ignores files with a leading dot.

Relocate smtpd deprecation notice to its own section rather than under locale in What's New in Python 3.12 document

Improved markup for valid options/values for methods ttk.treeview.column and ttk.treeview.heading, and for Layouts.

Document that the :mod:`asyncio` module contains code taken from v0.16.0 of the uvloop project, as well as the required MIT licensing information.

Disable test_super_deep() from test_call under pydebug builds on WASI; the stack depth is too small to make the test useful.

Lower the recursion limit in test_isinstance for test_infinitely_many_bases(). This prevents a stack overflow on a pydebug build of WASI.

Specify a low recursion depth for test_bad_getattr() in test.pickletester to avoid exhausting the stack under a pydebug build for WASI.

Fix :func:`os.path.isabs` incorrectly returning True when given a path that starts with exactly one (back)slash on Windows.

Fix :meth:`pathlib.PureWindowsPath.is_absolute` incorrectly returning False for some paths beginning with two (back)slashes.

Use module state for the _testcapi extension module.

Fix test_tarfile_vs_tar in test_shutil for macOS, where system tar can include more information in the archive than :mod:`shutil.make_archive`.

The tests now correctly compare zlib version when :const:`zlib.ZLIB_RUNTIME_VERSION` contains non-integer suffixes. For example zlib-ng defines the version as 1.3.0.zlib-ng.

Adds a regression test to verify that vfork() is used when expected by :mod:`subprocess` on vfork enabled POSIX systems (Linux).

Fixed order dependence in running tests in the same process when a test that has submodules (e.g. test_importlib) follows a test that imports its submodule (e.g. test_importlib.util) and precedes a test (e.g. test_unittest or test_compileall) that uses that submodule.

Test modes that file can get with chmod() on Windows.

Fix Tools/wasm/wasi.py to not include the path to python.wasm as part of HOSTRUNNER. The environment variable is meant to specify how to run the WASI host only, having python.wasm and relevant flags appended to the HOSTRUNNER. This fixes make test work.

Changed the Windows build to write out generated frozen modules into the build tree instead of the source tree.

Fixed the check-clean-src step performed on out of tree builds to detect errant $(srcdir)/Python/frozen_modules/*.h files and recommend appropriate source tree cleanup steps to get a working build again.

Add support for thread sanitizer (TSAN)

Fix the build for the case that WITH_PYMALLOC_RADIX_TREE=0 set.

Introduce Tools/wasm/wasi.py to simplify doing a WASI build.

The :func:`os.major`, :func:`os.makedev`, and :func:`os.minor` functions are now available on HP-UX v3.

Do not set ipv6type when cross-compiling.

Process privileges that are activated for creating directory junctions are now restored afterwards, avoiding behaviour changes in other parts of the program.

:func:`os.stat` calls were returning incorrect time values for files that could not be accessed directly.

Update Windows installer to use SQLite 3.44.2.

:mod:`multiprocessing`: On Windows, fix a race condition in Process.terminate(): no longer set the returncode attribute to always call WaitForSingleObject() in Process.wait(). Previously, sometimes the process was still running after TerminateProcess() even if GetExitCodeProcess() is not STILL_ACTIVE. Patch by Victor Stinner.

Fixes path calculations when launching Python on Windows through a symlink.

Update Tcl/Tk in Windows installer to 8.6.13 with a patch to suppress incorrect ThemeChanged warnings.

Ensures the Py_GIL_DISABLED preprocessor variable is defined in :file:`pyconfig.h` so that extension modules written in C are able to use it.

Reduce the time cost for some functions in :mod:`platform` on Windows if current user has no permission to the WMI.

Deprecate :func:`sys._enablelegacywindowsfsencoding`. Use :envvar:`PYTHONLEGACYWINDOWSFSENCODING` instead. Patch by Inada Naoki.

Correctly sort and remove duplicate environment variables in :py:func:`!_winapi.CreateProcess`.

Fix mojibake in :class:`mmap.mmap` when using a non-ASCII tagname argument on Windows.

Add the following constants to module :mod:`stat`: UF_SETTABLE, UF_TRACKED, UF_DATAVAULT, SF_SUPPORTED, SF_SETTABLE, SF_SYNTHETIC, SF_RESTRICTED, SF_FIRMLINK and SF_DATALESS. The values UF_SETTABLE, SF_SUPPORTED, SF_SETTABLE and SF_SYNTHETIC are only available on macOS.

:func:`os.waitid` is now available on macOS

Running configure ... --with-openssl-rpath=X/Y/Z no longer fails to detect OpenSSL on macOS.

Document that :mod:`dbm.ndbm` can silently corrupt DBM files on updates when exceeding undocumented platform limits, and can crash (segmentation fault) when reading such a corrupted file. (FB8919203)

The :program:`freeze` tool doesn't work with framework builds of Python. Document this and bail out early when running the tool with such a build.

webbrowser: Don't look for X11 browsers on macOS. Those are generally not used and probing for them can result in starting XQuartz even if it isn't used otherwise.

Update macOS installer to use SQLite 3.44.2.

Set CFBundleAllowMixedLocalizations to true in the Info.plist for the framework, embedded Python.app and IDLE.app with framework installs on macOS. This allows applications to pick up the user's preferred locale when that's different from english.

Make sure the result of :func:`sysconfig.get_plaform` includes at least a major and minor versions, even if MACOSX_DEPLOYMENT_TARGET is set to only a major version during build to match the format expected by pip.

Disable a signal handling stress test on macOS due to a bug in macOS (FB13453490).

Make sure the preprocessor definitions for ALIGNOF_MAX_ALIGN_T, SIZEOF_LONG_DOUBLE and HAVE_GCC_ASM_FOR_X64 are correct for Universal 2 builds on macOS.

Use /dev/fd on macOS to determine the number of open files in test.support.os_helper.fd_count to avoid a crash with "guarded" file descriptors when probing for open files.

Improve the lists of features, editor key bindings, and shell key bingings in the IDLE doc.

Fix rare failure of test.test_idle, in test_configdialog.

Fix the "Help -> IDLE Doc" menu bug in 3.11.7 and 3.12.1.

Fix test_editor hang on macOS Catalina.

Fix processing unsaved files when quitting IDLE on macOS.

Enter the selected text when opening the "Replace" dialog.

Fix redundant declarations in the public C API. Declare PyBool_Type, PyLong_Type and PySys_Audit() only once. Patch by Victor Stinner.

Fix support of format units "es", "et", "es#", and "et#" in nested tuples in :c:func:`PyArg_ParseTuple`-like functions.

Add :c:func:`Py_HashPointer` function to hash a pointer. Patch by Victor Stinner.

Change the declaration of the keywords parameter of :c:func:`PyArg_ParseTupleAndKeywords` and :c:func:`PyArg_VaParseTupleAndKeywords` for better compatibility with C++.