Skip to content

Latest commit

 

History

History
3509 lines (2464 loc) · 69.9 KB

3.10.0a1.rst

File metadata and controls

3509 lines (2464 loc) · 69.9 KB

Fixes python3x._pth being ignored on Windows, caused by the fix for :issue:`29778` (:cve:`2020-15801`).

Audit hooks are now cleared later during finalization to avoid missing events.

Ensure :file:`python3.dll` is loaded from correct locations when Python is embedded (:cve:`2020-15523`).

The __hash__() methods of ipaddress.IPv4Interface and ipaddress.IPv6Interface incorrectly generated constant hash values of 32 and 128 respectively. This resulted in always causing hash collisions. The fix uses hash() to generate hash values for the tuple of (address, mask length, network address).

Prevent http header injection by rejecting control characters in http.client.putrequest(...).

Fixed stack overflow in :func:`issubclass` and :func:`isinstance` when getting the __bases__ attribute leads to infinite recursion.

Speed up calls to reversed() by using the PEP 590 vectorcall calling convention. Patch by Donghee Na.

Calls to float() are now faster due to the vectorcall calling convention. Patch by Dennis Sweeney.

Speed up calls to bool() by using the PEP 590 vectorcall calling convention. Patch by Donghee Na.

Port the :mod:`_bisect` module to the multi-phase initialization API (PEP 489).

Correctly count control blocks in 'except' in compiler. Ensures that a syntax error, rather a fatal error, occurs for deeply nested, named exception handlers.

Fix :meth:`__dir__` of :class:`types.GenericAlias`. Patch by Batuhan Taskaya.

Port the :mod:`_lsprof` extension module to multi-phase initialization (PEP 489).

Port the :mod:`cmath` extension module to multi-phase initialization (PEP 489).

Port the :mod:`_scproxy` extension module to multi-phase initialization (PEP 489).

Port the :mod:`termios` extension module to multi-phase initialization (PEP 489).

Convert the :mod:`_sha256` extension module types to heap types.

Fix a possible stack overflow in the parser when parsing functions and classes with a huge amount of arguments. Patch by Pablo Galindo.

Port the :mod:`_overlapped` extension module to multi-phase initialization (PEP 489).

Port the :mod:`_curses_panel` extension module to multi-phase initialization (PEP 489).

Port the :mod:`_opcode` extension module to multi-phase initialization (PEP 489).

Fixes the wrong error description in the error raised by using 2 , in format string in f-string and :meth:`str.format`.

The implementation of :func:`signal.siginterrupt` now uses :c:func:`!sigaction` (if it is available in the system) instead of the deprecated :c:func:`!siginterrupt`. Patch by Pablo Galindo.

Prevent line trace being skipped on platforms not compiled with USE_COMPUTED_GOTOS. Fixes issue where some lines nested within a try-except block were not being traced on Windows.

Fix a crash that occurred when destroying subclasses of :class:`MemoryError`. Patch by Pablo Galindo.

Port the :mod:`zlib` extension module to multi-phase initialization (PEP 489).

The _ast module uses again a global state. Using a module state per module instance is causing subtle practical problems. For example, the Mercurial project replaces the __import__() function to implement lazy import, whereas Python expected that import _ast always return a fully initialized _ast module.

Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`.

Port :mod:`_sha3` to multi-phase init. Convert static types to heap types.

Port the :mod:`_blake2` extension module to the multi-phase initialization API (PEP 489).

Free the stack allocated in va_build_stack if do_mkstack fails and the stack is not a small_stack.

Fix a bug that was dropping keys when compiling dict literals with more than 0xFFFF elements. Patch by Pablo Galindo.

The output of python --help contains now only ASCII characters.

Port the :mod:`_sha1`, :mod:`_sha512`, and :mod:`_md5` extension modules to multi-phase initialization API (PEP 489).

Optimize dict_merge() for copying dict (e.g. dict(d) and {}.update(d)).

Implement PEP 604. This supports (int | str) etc. in place of Union[str, int].

Removed fallback implementation for strdup.

Handle interrupts that come after EOF correctly in PyOS_StdioReadline.

:func:`round` with integer argument is now faster (9--60%).

Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster (around 30--40% for small objects).

Resolve a regression in CPython 3.8.4 where defining "__setattr__" in a multi-inheritance setup and calling up the hierarchy chain could fail if builtins/extension types were involved in the base types.

Bytecode optimizations are performed directly on the control flow graph. This will result in slightly more compact code objects in some circumstances.

Always cache the running loop holder when running asyncio.set_running_loop.

Fix incorrect refcounting in _ssl.c's _servername_callback().

Port :mod:`multiprocessing` to multi-phase initialization

Port :mod:`winapi` to multiphase initialization

Use non-NULL default values in the PEG parser keyword list to overcome a bug that was preventing Python from being properly compiled when using the XLC compiler. Patch by Pablo Galindo.

Python 3.8.3 had a regression where compiling with ast.PyCF_ALLOW_TOP_LEVEL_AWAIT would aggressively mark list comprehension with CO_COROUTINE. Now only list comprehension making use of async/await will tagged as so.

Port :mod:`faulthandler` to multiphase initialization.

Port :mod:`sha256` to multiphase initialization

Guard against a NULL pointer dereference within bytearrayobject triggered by the bytearray() + bytearray() operation.

add arm64 to the allowable Mac OS arches in mpdecimal.h

Fix decoding errors with audit when open files with non-ASCII names on non-UTF-8 locale.

The "hackcheck" that prevents sneaking around a type's __setattr__() by calling the superclass method was rewritten to allow C implemented heap types.

Prefix the error message with 'f-string: ', when parsing an f-string expression which throws a :exc:`SyntaxError`.

Empty frozensets are no longer singletons.

Pre-feed the parser with the location of the f-string expression, not the f-string itself, which allows us to skip the shifting of the AST node locations after the parsing is completed.

Fixes a reference to deallocated stack space during startup when constructing sys.path involving a relative symlink when code was supplied via -c. (discovered via Coverity)

Fix incorrect expressions and asserts in hashtable code and tests.

Opt out serialization/deserialization for _random.Random

Rename PyPegen* functions to PyParser*, so that we can remove the old set of PyParser* functions that were using the old parser, but keep everything backwards-compatible.

Stefan Behnel reported that cf_feature_version is used even when PyCF_ONLY_AST is not set. This is against the intention and against the documented behavior, so it's been fixed.

Remove the remaining files from the old parser and the :mod:`symbol` module.

Convert :mod:`_bz2` to use :c:func:`PyType_FromSpec`.

The encodings.latin_1 module is no longer imported at startup. Now it is only imported when it is the filesystem encoding or the stdio encoding.

:func:`zip` now supports PEP 618's strict parameter, which raises a :exc:`ValueError` if the arguments are exhausted at different lengths. Patch by Brandt Bucher.

Port :mod:`_gdbm` to multiphase initialization.

Fix a bug that caused the :exc:`SyntaxError` text to be empty when a file ends with a line ending in a line continuation character (i.e. backslash). The error text should contain the text of the last line.

Fix a possible buffer overflow in the PEG parser when gathering information for emitting syntax errors. Patch by Pablo Galindo.

Port :mod:`_dbm` to multiphase initialization.

Fix refleak in _Py_fopen_obj() when PySys_Audit() fails

Add a state to the :mod:`!nis` module (PEP 3121) and apply the multiphase initialization. Patch by Donghee Na.

The Python :ref:`Path Configuration <init-path-config>` now takes :c:member:`PyConfig.platlibdir` in account.

Remove the old parser, the :mod:`parser` module and all associated support code, command-line options and environment variables. Patch by Pablo Galindo.

Fix a bug where a line with only a line continuation character is not considered a blank line at tokenizer level. In such cases, more than a single NEWLINE token was emitted. The old parser was working around the issue, but the new parser threw a :exc:`SyntaxError` for valid input due to this. For example, an empty line following a line continuation character was interpreted as a :exc:`SyntaxError`.

Each dictionary view now has a mapping attribute that provides a :class:`types.MappingProxyType` wrapping the original dictionary. Patch contributed by Dennis Sweeney.

Improved the performance of symmetric difference operations on dictionary item views. Patch by Dennis Sweeney.

Fix possible segfault in the new PEG parser when parsing f-string containing yield statements with no value (f"{yield}"). Patch by Pablo Galindo

Fixed a possible segfault in the new PEG parser when producing error messages for invalid assignments of the form p=p=. Patch by Pablo Galindo

Fix invalid memory read in the new parser when checking newlines in string literals. Patch by Pablo Galindo.

Fix memory leak in when parsing f-strings in the new parser. Patch by Pablo Galindo

Raise :exc:`ValueError` when validating custom AST's where the constants True, False and None are used within a :class:`ast.Name` node.

Allow overriding :data:`sys.platlibdir` via a new :envvar:`PYTHONPLATLIBDIR` environment variable.

Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set an exception and pass the Python thread state when checking if there is a pending signal.

Port :mod:`fcntl` to multiphase initialization.

Delete unnecessary instance check in importlib.reload(). Patch by Furkan Önder.

Unexpected errors in calling the __iter__ method are no longer masked by TypeError in the :keyword:`in` operator and functions :func:`~operator.contains`, :func:`~operator.indexOf` and :func:`~operator.countOf` of the :mod:`operator` module.

Attributes start, stop and step of the :class:`range` object now always has exact type :class:`int`. Previously, they could have been an instance of a subclass of int.

Fix a corner case where g-style string formatting of a float failed to remove trailing zeros.

When there's a :exc:`SyntaxError` in the expression part of an fstring, the filename attribute of the :exc:`SyntaxError` gets correctly set to the name of the file the fstring resides in.

Support the "-d" debug flag in the new PEG parser. Patch by Pablo Galindo

Instances of types created with :c:func:`PyType_FromSpecWithBases` will no longer automatically visit their class object when traversing references in the garbage collector. The user is expected to manually visit the object's class. Patch by Pablo Galindo.

:c:func:`Py_TYPE()` is changed to the inline static function. Patch by Donghee Na.

Fix a hang that can arise after :meth:`generator.throw` due to a cycle in the exception context chain.

Each interpreter now its has own free lists, singletons and caches:

  • Free lists: float, tuple, list, dict, frame, context, asynchronous generator, MemoryError.
  • Singletons: empty tuple, empty bytes string, empty Unicode string, single byte character, single Unicode (latin1) character.
  • Slice cache.

They are no longer shared by all interpreters.

Certain :exc:`TypeError` messages about missing or extra arguments now include the function's :term:`qualified name`. Patch by Dennis Sweeney.

Make the stack trace correct after calling :meth:`generator.throw` on a generator that has yielded from a yield from.

Improve performance of generators by not raising internal StopIteration.

Port :mod:`mmap` to multiphase initialization.

Port :mod:`_lzma` to multiphase initialization.

Builtin and extension functions that take integer arguments no longer accept :class:`~decimal.Decimal`s, :class:`~fractions.Fraction`s and other objects that can be converted to integers only with a loss (e.g. that have the :meth:`~object.__int__` method but do not have the :meth:`~object.__index__` method).

Add :meth:`int.bit_count()`, counting the number of ones in the binary representation of an integer. Patch by Niklas Fiekas.

Use ncurses extended color functions when available to support terminals with 256 colors, and add the new function :func:`curses.has_extended_color_support` to indicate whether extended color support is provided by the underlying ncurses library.

Add the private macros _Py_COMP_DIAG_PUSH, _Py_COMP_DIAG_IGNORE_DEPR_DECLS, and _Py_COMP_DIAG_POP.

The int type now supports the x.is_integer() method for compatibility with float.

C14N 2.0 serialisation in xml.etree.ElementTree failed for unprefixed attributes when a default namespace was defined.

Strip leading spaces and tabs on :func:`ast.literal_eval`. Also document stripping of spaces and tabs for :func:`eval`.

Note in documentation that :func:`random.choices` doesn't support non-finite weights, raise :exc:`ValueError` when given non-finite weights.

Fix a bug in the :mod:`symtable` module that was causing module-scope global variables to not be reported as both local and global. Patch by Pablo Galindo.

Add :func:`codecs.unregister` function to unregister a codec search function.

In zipfile.Path, mutate the passed ZipFile object type instead of making a copy. Prevents issues when both the local copy and the caller’s copy attempt to close the same file handle.

More reliable validation of statements in :class:`timeit.Timer`. It now accepts "empty" statements (only whitespaces and comments) and rejects misindentent statements.

The :class:`threading.Thread` constructor now uses the target name if the target argument is specified but the name argument is omitted.

fix tkinter.EventType Enum so all members are strings, and none are tuples

:data:`types.EllipsisType`, :data:`types.NotImplementedType` and :data:`types.NoneType` have been reintroduced, providing a new set of types readily interpretable by static type checkers.

Fix SQLite3 segfault when backing up closed database. Patch contributed by Peter David McCormick.

StrEnum added: it ensures that all members are already strings or string candidates

fix bug allowing Enums to be extended via multiple inheritance

use the correct mix-in data type when constructing Enums

Add is_typeddict function to typing.py to check if a type is a TypedDict class

Previously there was no way to check that without using private API. See the relevant issue in python/typing.

Honor object overrides in Enum class creation (specifically, __str__, __repr__, __format__, and __reduce_ex__).

enum.Flag and enum.IntFlag members are now iterable.

Fix a race condition in the call_soon_threadsafe() method of asyncio.ProactorEventLoop: do nothing if the self-pipe socket has been closed.

Port the mashal extension module to the multi-phase initialization API (PEP 489).

Port the _string extension module to the multi-phase initialization API (PEP 489).

Added an :term:`iterator` to :class:`memoryview`.

Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not int or float.

Fix handling of debug mode in :func:`asyncio.run`. This allows setting PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode when using :func:`asyncio.run`.

Fix implementation of sendfile to be compatible with Solaris.

No longer override exceptions raised in __len__() of a sequence of parameters in :mod:`sqlite3` with :exc:`~sqlite3.ProgrammingError`.

Restarting a ProactorEventLoop on Windows no longer logs spurious ConnectionResetErrors.

:exc:`~sqlite3.ProgrammingError` message for absent parameter in :mod:`sqlite3` contains now the name of the parameter instead of its index when parameters are supplied as a dict.

Fixed crash when mutate list of parameters during iteration in :mod:`sqlite3`.

Improved the accuracy of math.hypot(). Internally, each step is computed with extra precision so that the result is now almost always correctly rounded.

The pdb whatis command correctly reports instance methods as 'Method' rather than 'Function'.

Fixed pprint's handling of dict subclasses that override __repr__.

When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now wait until the cancellation is complete also in the case when timeout is <= 0, like it does with positive timeouts.

:meth:`asyncio.wait_for` now properly handles races between cancellation of itself and the completion of the wrapped awaitable.

Change the method asyncio.AbstractEventLoop.run_in_executor to not be a coroutine.

Fix :mod:`codeop` regression that prevented turning compile warnings into errors.

turtle uses math module functions to convert degrees to radians and vice versa and to calculate vector norm

Minor algorithmic improvement to math.hypot() and math.dist() giving small gains in speed and accuracy.

Fixed a race between setTarget and flush in logging.handlers.MemoryHandler.

Fix potential UnicodeDecodeError in dis module.

On Windows, fix asyncio recv_into() return value when the socket/pipe is closed (:exc:`BrokenPipeError`): return 0 rather than an empty byte string (b'').

Make tkinter doc example runnable.

Make an algebraic simplification to random.paretovariate(). It now is slightly less subject to round-off error and is slightly faster. Inputs that used to cause ZeroDivisionError now cause an OverflowError instead.

Add :func:`os.cpu_count()` support for VxWorks RTOS.

Fix the :mod:`tarfile` module to write only basename of TAR file to GZIP compression header.

Raise TclError instead of TypeError when an unknown option is passed to tkinter.OptionMenu.

Use add_done_callback() in asyncio.loop.sock_accept() to unsubscribe reader early on cancellation.

Reduce import overhead of :mod:`uuid`.

Set the environment variable VIRTUAL_ENV_PROMPT at :mod:`venv` activation.

Recursive evaluation of typing.ForwardRef in get_type_hints.

Prevent creating :class:`shared_memory.SharedMemory` objects with size=0.

:meth:`collections.OrderedDict.pop` is now 2 times faster.

Unpickling invalid NEWOBJ_EX opcode with the C implementation raises now UnpicklingError instead of crashing.

Avoid infinite loop when reading specially crafted TAR files using the tarfile module (:cve:`2019-20907`).

Speed up any transport using _ProactorReadPipeTransport by calling recv_into instead of recv, thus not creating a new buffer for each recv call in the transport's read loop.

Fix the error handling in :meth:`ssl.SSLContext.load_dh_params`.

In distutils.spawn, restore expectation that DistutilsExecError is raised when the command is not found.

Register :class:`array.array` as a :class:`~collections.abc.MutableSequence`. Patch by Pablo Galindo.

Remove the __new__ method of :class:`typing.Generic`.

Fix a crash in the _ast module: it can no longer be loaded more than once. It now uses a global state rather than a module state.

Add read-only ssl.SSLContext.security_level attribute to retrieve the context's security level.

The write_history() atexit function of the readline completer now ignores any :exc:`OSError` to ignore error if the filesystem is read-only, instead of only ignoring :exc:`FileNotFoundError` and :exc:`PermissionError`.

selector: use DefaultSelector based upon implementation

The decimal module now requires libmpdec-2.5.0. Users of --with-system-libmpdec should update their system library.

The decimal module now requires libmpdec-2.5.0.

Fixed the :mod:`trace` module CLI for Python source files with non-UTF-8 encoding.

Use the term "iterable" in the docstring for :func:`functools.reduce`.

Remove freelist from collections.deque().

Fix default-value signatures of several functions in the :mod:`select` module - by Anthony Sottile.

Fixed reading files with non-ASCII names from ZIP archive directly after writing them.

:func:`pdb.find_function` now correctly determines the source file encoding.

Invalid file descriptor values are now prevented from being passed to os.fpathconf. (discovered by Coverity)

Fix a NULL pointer dereference within the ssl module during a MemoryError in the keylog callback. (discovered by Coverity)

Fixed an instance where a MemoryError within the zoneinfo module might not be reported or not reported at its source. (found by Coverity)

:func:`mimetypes.read_mime_types` function reads the rule file using UTF-8 encoding, not the locale encoding. Patch by Srinivas Reddy Thatiparthy.

Fixed the use of :func:`~glob.glob` in the stdlib: literal part of the path is now always correctly escaped.

Fixed an issue preventing the C implementation of :class:`zoneinfo.ZoneInfo` from being subclassed.

Add the :class:`xml.sax.handler.LexicalHandler` class that is present in other SAX XML implementations.

Improve performance of HTTPResponse.read with a given amount. Patch by Bruce Merry.

:mod:`ensurepip` now disables the use of pip cache when installing the bundled versions of pip and setuptools. Patch by Krzysztof Konopko.

Removed :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre.

Ensure importlib.resources.path returns an extant path for the SourceFileLoader's resource reader. Avoids the regression identified in master while a long-term solution is devised.

Fix a minor memory leak in :mod:`subprocess` module when extra_groups was specified.

The standard deviation and variance functions in the statistics module were ignoring their mu and xbar arguments.

Use the new PEG parser when generating the stdlib :mod:`keyword` module.

Add :data:`sys.orig_argv` attribute: the list of the original command line arguments passed to the Python executable.

Ignore empty or whitespace-only lines in .pth files. This matches the documentated behavior. Before, empty lines caused the site-packages dir to appear multiple times in sys.path. By Ido Michael, contributors Malcolm Smith and Tal Einat.

Added a defaults parameter to :class:`logging.Formatter`, to allow specifying default values for custom fields. Patch by Asaf Alon and Bar Harel.

Clarify error message in the :mod:`csv` module.

Refresh importlib.metadata from importlib_metadata 1.6.1.

Stop codeop._maybe_compile, used by code.InteractiveInterpreter (and IDLE). from emitting each warning three times.

Fix reference leak in the :mod:`select` module when the module is imported in a subinterpreter.

Built-in loaders (SourceFileLoader and ZipImporter) now supply TraversableResources implementations for ResourceReader, and the fallback function has been removed.

:class:`rlcompleter.Completer` and the standard Python shell now close the parenthesis for functions that take no arguments. Patch contributed by Rémi Lapeyre.

The topological sort functionality that was introduced initially in the :mod:`functools` module has been moved to a new :mod:`graphlib` module to better accommodate the new tools and keep the original scope of the :mod:`functools` module. Patch by Pablo Galindo

Fix truncate when sending str object with_xxsubinterpreters.channel_send.

Add rich comparisons to collections.Counter().

Unexpected errors in calling the __iter__ method are no longer masked by TypeError in :func:`csv.reader`, :func:`csv.writer.writerow` and :meth:`csv.writer.writerows`.

Fixed email.contentmanager to allow set_content() to set a null string.

The :mod:`sqlite3` module uses SQLite API functions that require SQLite v3.7.3 or higher. This patch removes support for older SQLite versions, and explicitly requires SQLite 3.7.3 both at build, compile and runtime. Patch by Sergey Fedoseev and Erlend E. Aasland.

Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time to avoid errors on some compilers.

Update ensurepip to install pip 20.1.1 and setuptools 47.1.0.

The result of :func:`operator.index` now always has exact type :class:`int`. Previously, the result could have been an instance of a subclass of int.

:mod:`webbrowser` now properly finds the default browser in pure Wayland systems by checking the WAYLAND_DISPLAY environment variable. Patch contributed by Jérémy Attali.

:func:`hashlib.compare_digest` uses OpenSSL's CRYPTO_memcmp() function when OpenSSL is available.

:mod:`ctypes` module: If ctypes fails to convert the result of a callback or if a ctypes callback function raises an exception, sys.unraisablehook is now called with an exception set. Previously, the error was logged into stderr by :c:func:`PyErr_Print`.

Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support the Base32 Encoding with Extended Hex Alphabet.

Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds that use no-deprecated and --api=1.1.0.

Fix asyncio loop.sock_* race condition issue

Deprecate the :mod:`symbol` module.

The second argument (extra) of LoggerAdapter.__init__ now defaults to None.

Add a new :const:`os.RWF_APPEND` flag for :func:`os.pwritev`.

Fix possible reference leak for :mod:`sqlite3` initialization.

Handle cases where the end_lineno is None on :func:`ast.increment_lineno`.

distutils upload creates SHA2-256 and Blake2b-256 digests. MD5 digests is skipped if platform blocks MD5.

:mod:`hashlib` no longer falls back to builtin hash implementations when OpenSSL provides a hash digest and the algorithm is blocked by security policy.

:func:`hashlib.new` passed usedforsecurity to OpenSSL EVP constructor _hashlib.new(). test_hashlib and test_smtplib handle strict security policy better.

:func:`ast.parse` will not parse self documenting expressions in f-strings when passed feature_version is less than (3, 8).

Add h5 file extension as MIME Type application/x-hdf5, as per HDF Group recommendation for HDF5 formatted data files. Patch contributed by Mark Schwab.

On macOS, when building Python for macOS 10.4 and older, which wasn't the case for python.org macOS installer, :func:`socket.getaddrinfo` no longer uses an internal lock to prevent race conditions when calling getaddrinfo() which is thread-safe since macOS 10.5. Python 3.9 requires macOS 10.6 or newer. The internal lock caused random hang on fork when another thread was calling :func:`socket.getaddrinfo`. The lock was also used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD older than 4.

Prepare _hashlib for PEP 489 and use :c:func:`PyModule_AddType`.

Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used for running IO-bound functions in a separate thread to avoid blocking the event loop, and essentially works as a high-level version of :meth:`~asyncio.loop.run_in_executor` that can directly take keyword arguments.

Restored the deprecated :mod:`xml.etree.cElementTree` module.

:const:`~mmap.MAP_POPULATE` constant has now been added to the list of exported :mod:`mmap` module flags.

PEP 554 for use in the test suite. (Patch By Joannah Nanjekye)

ctypes now raises an ArgumentError when a callback is invoked with more than 1024 arguments.

A new test assertion context-manager, :func:`unittest.assertNoLogs` will ensure a given block of code emits no log messages using the logging module. Contributed by Kit Yan Choi.

Updated the error message and docs of PurePath.relative_to() to better reflect the function behaviour.

Use SQLite3 trace v2 API, if it is available.

ZipFile truncates files to avoid corruption when a shorter comment is provided in append ("a") mode. Patch by Jan Mazur.

Fix Enum.__dir__: dir(Enum.member) now includes attributes as well as methods.

ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer closes connection during TLS negotiation

fix default _missing_ so a duplicate ValueError is not set as the __context__ of the original ValueError.

Fixed :class:`multiprocessing.context.get_all_start_methods` to properly return the default method first on macOS.

Fix parsing of invalid mime headers parameters by collapsing whitespace between encoded words in a bare-quote-string.

Add --quiet option to command-line interface of :mod:`py_compile`. Patch by Gregory Schevchenko.

:exc:`struct.error` is now raised if there is a null character in a :mod:`struct` format string.

Added the root_dir and dir_fd parameters in :func:`glob.glob`.

Fix :meth:`IMAP4.noop()` when debug mode is enabled (ex: imaplib.Debug = 3).

:func:`csv.writer` now correctly escapes escapechar when input contains escapechar. Patch by Catalin Iacob, Berker Peksag, and Itay Elbirt.

AST nodes are now raising :exc:`TypeError` on conflicting keyword arguments. Patch contributed by Rémi Lapeyre.

Added site.py site-packages tracing in verbose mode.

Refactor formatweekday, formatmonthname methods in LocaleHTMLCalendar and LocaleTextCalendar classes in calendar module to call the base class methods.This enables customizable CSS classes for LocaleHTMLCalendar. Patch by Srinivas Reddy Thatiparthy

:func:`~unittest.TestCase.assertWarns` no longer raises a RuntimeException when accessing a module's __warningregistry__ causes importation of a new module, or when a new module is imported in another thread. Patch by Kernc.

Remove ParserBase.error() method from the private and undocumented _markupbase module. :class:`html.parser.HTMLParser` is the only subclass of ParserBase and its error() implementation was deprecated in Python 3.4 and removed in Python 3.5.

Fix cgi.parse_multipart without content_length. Patch by Roger Duran

Fix pathlib.PosixPath to resolve a relative path located on the root directory properly.

Improve the error message for a misbehaving rawio.readinto

The d.is_integer() method is added to the Decimal type, for compatibility with other number types.

The x.is_integer() method is incorporated into the abstract types of the numeric tower, Real, Rational and Integral, with appropriate default implementations.

Add documentation for PEP 604 (Allow writing union types as X | Y).

In Programming FAQ "Sequences (Tuples/Lists)" section, add "How do you remove multiple items from a list".

Fix RemovedInSphinx40Warning when building the documentation. Patch by Donghee Na.

Change Shipman tkinter doc link from archive.org to TkDocs. (The doc has been removed from the NMT server.) The new link responds much faster and includes a short explanatory note.

Update the refcounts info of PyType_FromModuleAndSpec.

Fix the signature of :class:`typing.Coroutine`.

Enable Sphinx 3.2 c_allow_pre_v3 option and disable c_warn_on_allowed_pre_v3 option to make the documentation compatible with Sphinx 2 and Sphinx 3.

Add documentation for debug feature of f-strings.

Changed the release when from __future__ import annotations becomes the default from 4.0 to 3.10 (following a change in PEP 563).

Refactored typing.rst, arranging more than 70 classes, functions, and decorators into new sub-sections.

Fix in tutorial section 4.2. Code snippet is now correct.

Make code, examples, and recipes in the Python documentation be licensed under the more permissive BSD0 license in addition to the existing Python 2.0 license.

Updated Documentation to comprehensively elaborate on the behaviour of gather.cancel()

Fix test_site.test_license_exists_at_url(): call urllib.request.urlcleanup() to reset the global urllib.request._opener. Patch by Victor Stinner.

Make test_cmd_line_script pass with option '-vv'.

Add tests for SIGINT handling in the runpy module.

:mod:`test.support`: Rename blacklist parameter of :func:`~test.support.check__all__` to not_exported.

Make ctypes optional in test_genericalias.

Fix integer overflow in the :meth:`array.array.index` method on 64-bit Windows for index larger than 2**31.

:data:`test.support.TESTFN` and the current directory for tests when run via test.regrtest contain now non-ascii characters if possible.

On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the :func:`~test.support.skip_if_broken_multiprocessing_synchronize` function to the :mod:`test.support` module.

Fix use of support.require_{linux|mac|freebsd}_version() decorators as class decorator.

Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings filters when importing numpy, to ignore filters installed by numpy.

Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu is blocking incoming connections.

Fix test_binhex when run twice: it now uses import_fresh_module() to ensure that it raises DeprecationWarning each time.

Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked.

Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS.

Increase code coverage for SharedMemory and ShareableList

Make test_gdb properly run on HP-UX. Patch by Michael Osipov.

Update :c:macro:`Py_UNREACHABLE` to use __builtin_unreachable() if only the compiler is able to use it. Patch by Donghee Na.

Fix pycore_bitutils.h header file to support old clang versions: __builtin_bswap16() is not available in LLVM clang 3.0.

Pin Sphinx version to 2.3.1 in Doc/Makefile.

The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now required to build Python.

make install now uses the PLATLIBDIR variable for the destination lib-dynload/ directory when ./configure --with-platlibdir is used.

Fixed an issue where the :mod:`zoneinfo` module and its tests were not included when Python is installed with make.

Fixes automatic import of props file when using the Nuget package.

The user site directory for 32-bit now includes a -32 suffix to distinguish it from the 64-bit interpreter's directory.

Fixed layout of final page of the installer by removing the special thanks to Mark Hammond (with his permission).

Fixes the description that appears in UAC prompts.

Improve post-install message to direct people to the "py" command.

The installer will now fail to install on Windows 7 and Windows 8. Further, the UCRT dependency is now always downloaded on demand.

Update Windows release to include SQLite 3.32.3.

:mod:`!msilib` now supports creating CAB files with non-ASCII file path and adding files with non-ASCII file path to them.

Fixed support of non-ASCII names in functions :func:`!msilib.OpenDatabase` and :func:`!msilib.init_database` and non-ASCII SQL in method :meth:`!msilib.Database.OpenView`.

Stable ABI redirection DLL (python3.dll) now uses #pragma comment(linker) for re-exporting.

Updates Windows OpenSSL to 1.1.1g

Changes the registered MIME type for .py files on Windows to text/x-python instead of text/plain.

Manually define IO_REPARSE_TAG_APPEXECLINK in case some old Windows SDK doesn't have it.

Extend py.exe help to mention overrides via venv, shebang, environmental variables & ini files.

Update macOS installer to use SQLite 3.33.0.

Avoid opening Finder window if running installer from the command line. Patch contributed by Rick Heil.

Fix configure error when building on macOS 11. Note that the current Python release was released shortly after the first developer preview of macOS 11 (Big Sur); there are other known issues with building and running on the developer preview. Big Sur is expected to be fully supported in a future bugfix release of Python 3.8.x and with 3.9.0.

Update macOS installer to use SQLite 3.32.3.

fixed an XDG settings issue not allowing macos to open browser in webbrowser.py

Update macOS installer to use SQLite 3.32.2.

Use 'IDLE Shell' as shell title

Rewrite the Calltips doc section.

In calltips, stop reminding that '/' marks the end of positional-only arguments.

Improve IDLE run crash error message (which users should never see).

Save files loaded with no line ending, as when blank, or different line endings, by setting its line ending to the system default. Fix regression in 3.8.4 and 3.9.0b4.

Save files with non-ascii chars. Fix regression released in 3.9.0b4 and 3.8.4.

Add keywords to module name completion list. Rewrite Completions section of IDLE doc.

The encoding of stdin, stdout and stderr in IDLE is now always UTF-8.

Make Open Module open a special module such as os.path.

Make context menu Cut and Copy work again when right-clicking within a selection.

Make test_idle pass when run after import.

Removed undocumented macros Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION and the recursion_critical field of the :c:type:`PyInterpreterState` structure.

The PyUnicode_InternImmortal() function is now deprecated and will be removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. Patch by Victor Stinner.

Add :c:func:`PyCodec_Unregister` function to unregister a codec search function.

Remove the _Py_CheckRecursionLimit variable: it has been replaced by ceval.recursion_limit of the :c:type:`PyInterpreterState` structure. Patch by Victor Stinner.

Types created with :c:func:`PyType_FromSpec` now make any signature in their tp_doc slot accessible from __text_signature__.

Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented pointers beyond the end of a string.

Add a minimal decimal capsule API. The API supports fast conversions between Decimals up to 38 digits and their triple representation as a C struct.

Add :c:func:`PyDateTime_DATE_GET_TZINFO` and :c:func:`PyDateTime_TIME_GET_TZINFO` macros for accessing the tzinfo attributes of :class:`datetime.datetime` and :class:`datetime.time` objects.

Revert :c:func:`PyType_HasFeature` change: it reads again directly the :c:member:`PyTypeObject.tp_flags` member when the limited C API is not used, rather than always calling :c:func:`PyType_GetFlags` which hides implementation details.

Remove PyUnicode_AsUnicodeCopy.

Removed PyLong_FromUnicode().

Removed PyUnicode_GetMax().

Removed Py_UNICODE_str* functions manipulating Py_UNICODE* strings.

PyObject_AsCharBuffer(), PyObject_AsReadBuffer(), PyObject_CheckReadBuffer(), and PyObject_AsWriteBuffer() are removed. Please migrate to new buffer protocol; :c:func:`PyObject_GetBuffer` and :c:func:`PyBuffer_Release`.

Raises DeprecationWarning for PyUnicode_FromUnicode(NULL, size) and PyUnicode_FromStringAndSize(NULL, size) with size > 0.

Mark Py_UNICODE_COPY, Py_UNICODE_FILL, PyUnicode_WSTR_LENGTH, PyUnicode_FromUnicode, PyUnicode_AsUnicode, and PyUnicode_AsUnicodeAndSize as deprecated in C. Remove Py_UNICODE_MATCH which was deprecated and broken since Python 3.3.

The :c:func:`PyObject_INIT` and :c:func:`PyObject_INIT_VAR` macros become aliases to, respectively, :c:func:`PyObject_Init` and :c:func:`PyObject_InitVar` functions.

On Windows, #include "pyerrors.h" no longer defines snprintf and vsnprintf macros.

The PY_SSIZE_T_CLEAN macro must now be defined to use :c:func:`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use #: es#, et#, s#, u#, y#, z#, U# and Z#. See :ref:`Parsing arguments and building values <arg-parsing>` and the PEP 353.

Export explicitly the :c:func:`Py_GetArgcArgv` function to the C API and document the function. Previously, it was exported implicitly which no longer works since Python is built with -fvisibility=hidden.

Allow defining buffer slots in type specs.

Fix a _PyEval_EvalCode() crash if qualname argument is NULL.

Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed for historical reason. It is no longer allowed.

:c:func:`PyOS_InterruptOccurred` now fails with a fatal error if it is called with the GIL released.

The result of :c:func:`PyNumber_Index` now always has exact type :class:`int`. Previously, the result could have been an instance of a subclass of int.

Convert :c:func:`Py_REFCNT` and :c:func:`Py_SIZE` macros to static inline functions. They cannot be used as l-value anymore: use :c:func:`Py_SET_REFCNT` and :c:func:`Py_SET_SIZE` to set an object reference count and size. This change is backward incompatible on purpose, to prepare the C API for an opaque :c:type:`PyObject` structure.

The PyType_FromSpec*() functions no longer overwrite the type's "__module__" attribute if it is set via "Py_tp_members" or "Py_tp_getset".

Remove superfluous "extern C" declarations from Include/cpython/*.h.