Python 3.11.0b1

This commit is contained in:
Pablo Galindo 2022-05-06 23:52:22 +01:00
parent 3f61db4756
commit 0e5fe7f9e9
No known key found for this signature in database
GPG Key ID: FFE87404168BD847
212 changed files with 2171 additions and 440 deletions

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Autogenerated by Sphinx on Tue Apr 5 20:53:43 2022
# Autogenerated by Sphinx on Fri May 6 23:53:34 2022
topics = {'assert': 'The "assert" statement\n'
'**********************\n'
'\n'
@ -6222,13 +6222,14 @@ topics = {'assert': 'The "assert" statement\n'
'+-----------+------------------------------------------------------------+\n'
'\n'
'The "\'z\'" option coerces negative zero floating-point '
'values to positive\n'
'zero after rounding to the format precision. This option '
'is only valid for\n'
'floating-point presentation types.\n'
'values to\n'
'positive zero after rounding to the format precision. This '
'option is\n'
'only valid for floating-point presentation types.\n'
'\n'
'Changed in version 3.11: Added the "\'z\'" option (see also '
'**PEP 682**).\n'
'**PEP\n'
'682**).\n'
'\n'
'The "\'#\'" option causes the “alternate form” to be used '
'for the\n'
@ -7329,12 +7330,12 @@ topics = {'assert': 'The "assert" statement\n'
'Examples:\n'
'\n'
' import foo # foo imported and bound locally\n'
' import foo.bar.baz # foo.bar.baz imported, foo bound '
'locally\n'
' import foo.bar.baz as fbb # foo.bar.baz imported and bound as '
'fbb\n'
' from foo.bar import baz # foo.bar.baz imported and bound as '
'baz\n'
' import foo.bar.baz # foo, foo.bar, and foo.bar.baz '
'imported, foo bound locally\n'
' import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz '
'imported, foo.bar.baz bound as fbb\n'
' from foo.bar import baz # foo, foo.bar, and foo.bar.baz '
'imported, foo.bar.baz bound as baz\n'
' from foo import attr # foo imported and foo.attr bound as '
'attr\n'
'\n'
@ -12062,9 +12063,13 @@ topics = {'assert': 'The "assert" statement\n'
' >>> "they\'re bill\'s friends from the UK".title()\n'
' "They\'Re Bill\'S Friends From The Uk"\n'
'\n'
' A workaround for apostrophes can be constructed using '
'regular\n'
' expressions:\n'
' The "string.capwords()" function does not have this '
'problem, as it\n'
' splits words on spaces only.\n'
'\n'
' Alternatively, a workaround for apostrophes can be '
'constructed\n'
' using regular expressions:\n'
'\n'
' >>> import re\n'
' >>> def titlecase(s):\n'
@ -12314,6 +12319,12 @@ topics = {'assert': 'The "assert" statement\n'
'\n'
'1. As in Standard C, up to three octal digits are accepted.\n'
'\n'
' Changed in version 3.11: Octal escapes with value larger than\n'
' "0o377" produce a "DeprecationWarning". In a future Python '
'version\n'
' they will be a "SyntaxWarning" and eventually a '
'"SyntaxError".\n'
'\n'
'2. Unlike in Standard C, exactly two hex digits are required.\n'
'\n'
'3. In a bytes literal, hexadecimal and octal escapes denote the '
@ -13909,14 +13920,6 @@ topics = {'assert': 'The "assert" statement\n'
'unwise to use\n'
'them as dictionary keys.)\n'
'\n'
'Dictionaries can be created by placing a comma-separated '
'list of "key:\n'
'value" pairs within braces, for example: "{\'jack\': 4098, '
"'sjoerd':\n"
'4127}" or "{4098: \'jack\', 4127: \'sjoerd\'}", or by the '
'"dict"\n'
'constructor.\n'
'\n'
'class dict(**kwargs)\n'
'class dict(mapping, **kwargs)\n'
'class dict(iterable, **kwargs)\n'

2145
Misc/NEWS.d/3.11.0b1.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
Windows ``PGInstrument`` builds now copy a required DLL into the output
directory, making it easier to run the profile stage of a PGO build.

View File

@ -1 +0,0 @@
Add script and make target for generating ``sre_constants.h``.

View File

@ -1,2 +0,0 @@
Python is now built with ``-std=c11`` compiler option, rather than
``-std=c99``. Patch by Victor Stinner.

View File

@ -1,2 +0,0 @@
gdbm-compat is now preferred over ndbm if both are available on the system.
This allows avoiding the problematic ndbm.h on macOS.

View File

@ -1,5 +0,0 @@
Added :c:func:`PyErr_GetHandledException` and
:c:func:`PyErr_SetHandledException` as simpler alternatives to
:c:func:`PyErr_GetExcInfo` and :c:func:`PyErr_SetExcInfo`.
They are included in the stable ABI.

View File

@ -1,2 +0,0 @@
:c:func:`PyThread_get_thread_native_id` is excluded from the stable ABI on
platforms where it doesn't exist (like Solaris).

View File

@ -1 +0,0 @@
:c:func:`PyOS_CheckStack` is now exported in the Stable ABI on Windows.

View File

@ -1,2 +0,0 @@
Remove the ``Include/code.h`` header file. C extensions should only include
the main ``<Python.h>`` header file. Patch by Victor Stinner.

View File

@ -1,2 +0,0 @@
Add ``PyFrame_GetLasti`` C-API function to access frame object's ``f_lasti``
attribute safely from C code.

View File

@ -1,2 +0,0 @@
Add ``PyBytes_Type.tp_alloc`` to initialize ``PyBytesObject.ob_shash`` for
bytes subclasses.

View File

@ -1,3 +0,0 @@
:c:func:`Py_REFCNT`, :c:func:`Py_TYPE`, :c:func:`Py_SIZE` and
:c:func:`Py_IS_TYPE` functions argument type is now ``PyObject*``, rather
than ``const PyObject*``. Patch by Victor Stinner.

View File

@ -1,3 +0,0 @@
Mark functions as deprecated by :pep:`623`: :c:func:`PyUnicode_AS_DATA`,
:c:func:`PyUnicode_AS_UNICODE`, :c:func:`PyUnicode_GET_DATA_SIZE`,
:c:func:`PyUnicode_GET_SIZE`. Patch by Victor Stinner.

View File

@ -1,3 +0,0 @@
Fix C++ compiler warnings about "old-style cast" (``g++ -Wold-style-cast``) in
the Python C API. Use C++ ``reinterpret_cast<>`` and ``static_cast<>`` casts
when the Python C API is used in C++. Patch by Victor Stinner.

View File

@ -1 +0,0 @@
Fix the ``closure`` argument to :c:func:`PyEval_EvalCodeEx`.

View File

@ -1,2 +0,0 @@
Added the :c:func:`PyCode_GetCode` function. This function does the
equivalent of the Python code ``getattr(code_object, 'co_code')``.

View File

@ -1,2 +0,0 @@
Deprecate the C functions: :c:func:`PySys_SetArgv`,
:c:func:`PySys_SetArgvEx`, :c:func:`PySys_SetPath`. Patch by Victor Stinner.

View File

@ -1,7 +0,0 @@
Added ``object.__getstate__`` which provides the default implementation of
the ``__getstate__()`` method.
Copying and pickling instances of subclasses of builtin types bytearray,
set, frozenset, collections.OrderedDict, collections.deque, weakref.WeakSet,
and datetime.tzinfo now copies and pickles instance attributes implemented as
slots.

View File

@ -1,2 +0,0 @@
``marshal.dumps()`` uses ``FLAG_REF`` for all interned strings. This makes
output more deterministic and helps reproducible build.

View File

@ -1,2 +0,0 @@
Fix crashes in built-in encoders with error handlers that return position
less or equal than the starting position of non-encodable characters.

View File

@ -1 +0,0 @@
Do not use POSIX semaphores on NetBSD

View File

@ -1 +0,0 @@
Add type-specialized versions of the ``Py_DECREF()``, and use them for ``float``, ``int``, ``str``, ``bool``, and ``None`` to avoid pointer-chasing at runtime where types are known at C compile time.

View File

@ -1 +0,0 @@
Optimize :meth:`set.issuperset` for non-set argument.

View File

@ -1 +0,0 @@
Optimize :meth:`set.intersection` for non-set arguments.

View File

@ -1 +0,0 @@
Fix wrapping bound methods with @classmethod

View File

@ -1,2 +0,0 @@
Use Argument Clinic for the :class:`types.MethodType` constructor. Patch by
Oleg Iarygin.

View File

@ -1,10 +0,0 @@
Classes and functions that unconditionally declared their docstrings
ignoring the `--without-doc-strings` compilation flag no longer do so.
The classes affected are :class:`ctypes.UnionType`,
:class:`pickle.PickleBuffer`, :class:`testcapi.RecursingInfinitelyError`,
and :class:`types.GenericAlias`.
The functions affected are 24 methods in :mod:`ctypes`.
Patch by Oleg Iarygin.

View File

@ -1 +0,0 @@
Integer mod/remainder operations, including the three-argument form of :func:`pow`, now consistently return ints from the global small integer cache when applicable.

View File

@ -1 +0,0 @@
Replace the ``f_lasti`` member of the internal ``_PyInterpreterFrame`` structure with a ``prev_instr`` pointer, which reduces overhead in the main interpreter loop. The ``f_lasti`` attribute of Python-layer frame objects is preserved for backward-compatibility.

View File

@ -1 +0,0 @@
Make opcodes :opcode:`JUMP_IF_TRUE_OR_POP` and :opcode:`JUMP_IF_FALSE_OR_POP` relative rather than absolute.

View File

@ -1,5 +0,0 @@
ctypes used to mishandle ``void`` return types, so that for instance a
function declared like ``ctypes.CFUNCTYPE(None, ctypes.c_int)`` would be
called with signature ``int f(int)`` instead of ``void f(int)``. Wasm
targets require function pointers to be called with the correct signatures
so this led to crashes. The problem is now fixed.

View File

@ -1 +0,0 @@
Add internal documentation explaining design of new (for 3.11) frame stack.

View File

@ -1 +0,0 @@
Make :opcode:`POP_JUMP_IF_TRUE`, :opcode:`POP_JUMP_IF_FALSE`, :opcode:`POP_JUMP_IF_NONE` and :opcode:`POP_JUMP_IF_NOT_NONE` virtual, mapping to new relative jump opcodes.

View File

@ -1,5 +0,0 @@
Add ``static const char *const _PyOpcode_OpName[256] = {...};`` to
``opcode.h`` for debug builds to assist in debugging the Python interpreter.
It is now more convenient to make various forms of debugging output more
human-readable by including opcode names rather than just the corresponding
decimal digits.

View File

@ -1 +0,0 @@
Fix a potential integer overflow in _Py_DecodeUTF8Ex.

View File

@ -1,2 +0,0 @@
Fixed an uninitialized bool value in the traceback printing code path that
was introduced by the initial bpo-45292 exception groups work.

View File

@ -1 +0,0 @@
Make the interpreter's low-level tracing (lltrace) feature output more readable by displaying opcode names (rather than just numbers), and by displaying stack contents before each opcode.

View File

@ -1,2 +0,0 @@
Speed up right shift of negative integers, by removing unnecessary creation
of temporaries. Original patch by Xinhang Xu, reworked by Mark Dickinson.

View File

@ -1 +0,0 @@
Replaced the ``__note__`` field of :exc:`BaseException` (added in an earlier version of 3.11) with the final design of :pep:`678`. Namely, :exc:`BaseException` gets an :meth:`add_note` method, and its ``__notes__`` field is created when necessary.

View File

@ -1 +0,0 @@
Refactor the ``bytearray`` strip methods ``strip``, ``lstrip`` and ``rstrip`` to use a common implementation.

View File

@ -1,2 +0,0 @@
Add a new :c:func:`_PyFrame_IsEntryFrame` API function, to check if a
:c:type:`PyFrameObject` is an entry frame. Patch by Pablo Galindo.

View File

@ -1 +0,0 @@
Improve interpreter performance on Windows by inlining a few specific macros.

View File

@ -1 +0,0 @@
Speed up iteration of ascii strings by 50%. Patch by Kumar Aditya.

View File

@ -1 +0,0 @@
The LLTRACE special build now looks for the name ``__lltrace__`` defined in module globals, rather than the name ``__ltrace__``, which had been introduced as a typo.

View File

@ -1 +0,0 @@
Fixed a bug in which adaptive opcodes ignored any preceding ``EXTENDED_ARG``\ s on specialization failure.

View File

@ -1,2 +0,0 @@
Speed up :func:`isinstance` and :func:`issubclass` checks for :class:`types.UnionType`.
Patch by Yurii Karabas.

View File

@ -1 +0,0 @@
Fixed a crash in a garbage-collection edge-case, in which a ``PyFunction_Type.tp_clear`` function could leave a python function object in an inconsistent state.

View File

@ -1 +0,0 @@
Use Argument Clinic for :class:`EncodingMap`. Patch by Oleg Iarygin.

View File

@ -1,2 +0,0 @@
Use a single compact table for line starts, ends and column offsets. Reduces
memory consumption for location info by half

View File

@ -1,3 +0,0 @@
Octal escapes with value larger than ``0o377`` now produce a
:exc:`DeprecationWarning`. In a future Python version they will be a
:exc:`SyntaxWarning` and eventually a :exc:`SyntaxError`.

View File

@ -1 +0,0 @@
Fix a minor memory leak at exit: release the memory of the :class:`generic_alias_iterator` type. Patch by Dong-hee Na.

View File

@ -1,2 +0,0 @@
If Python is built in debug mode, Python now ensures that deallocator
functions leave the current exception unchanged. Patch by Victor Stinner.

View File

@ -1,2 +0,0 @@
Speed up :class:`types.UnionType` instantiation. Based on patch provided by Yurii
Karabas.

View File

@ -1 +0,0 @@
Fix an issue where specialized opcodes with extended arguments could produce incorrect tracing output or lead to assertion failures.

View File

@ -1,3 +0,0 @@
The warning emitted by the Python parser for a numeric literal immediately
followed by keyword has been changed from deprecation warning to syntax
warning.

View File

@ -1,2 +0,0 @@
The interpreter can now autocomplete soft keywords, as of now
``match``, ``case``, and ``_`` (wildcard pattern) from :pep:`634`.

View File

@ -1,5 +0,0 @@
Fix a crash in subinterpreters related to the garbage collector. When a
subinterpreter is deleted, untrack all objects tracked by its GC. To prevent a
crash in deallocator functions expecting objects to be tracked by the GC, leak
a strong reference to these objects on purpose, so they are never deleted and
their deallocator functions are not called. Patch by Victor Stinner.

View File

@ -1 +0,0 @@
Deoptimize statically-allocated code objects during ``Py_FINALIZE()`` so that future ``_PyCode_Quicken`` calls always start with unquickened code.

View File

@ -1,2 +0,0 @@
The ``PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS`` instruction
now ensures methods are called only on objects of the correct type.

View File

@ -1 +0,0 @@
Fix crash triggered by an evil custom ``mro()`` on a metaclass.

View File

@ -1,2 +0,0 @@
Improve error message when subscript a type with ``__class_getitem__`` set
to ``None``.

View File

@ -1 +0,0 @@
Disable frozen modules in debug builds. Patch by Kumar Aditya.

View File

@ -1,5 +0,0 @@
Add a closure keyword-only parameter to exec(). It can only be specified
when exec-ing a code object that uses free variables. When specified, it
must be a tuple, with exactly the number of cell variables referenced by the
code object. closure has a default value of None, and it must be None if the
code object doesn't refer to any free variables.

View File

@ -1,2 +0,0 @@
Make sure that PEP 523 is respected in all cases. In 3.11a7, specialization
may have prevented Python-to-Python calls respecting PEP 523.

View File

@ -1,2 +0,0 @@
Improve the :exc:`AttributeError` message when deleting a missing attribute.
Patch by Géry Ogam.

View File

@ -1,3 +0,0 @@
``pymain_run_python()`` now imports ``readline`` and ``rlcompleter`` before
sys.path is extended to include the current working directory of an
interactive interpreter. Non-interactive interpreters are not affected.

View File

@ -1,4 +0,0 @@
Chaining classmethod descriptors (introduced in bpo-19072) is deprecated. It
can no longer be used to wrap other descriptors such as property(). The
core design of this feature was flawed, and it caused a number of downstream
problems.

View File

@ -1,2 +0,0 @@
Improve the docstrings of :func:`runpy.run_module` and :func:`runpy.run_path`.
Original patch by Andrew Brezovsky.

View File

@ -1,4 +0,0 @@
All docstrings in code snippets are now wrapped into :func:`PyDoc_STR` to
follow the guideline of `PEP 7's Documentation Strings paragraph
<https://www.python.org/dev/peps/pep-0007/#documentation-strings>`_. Patch
by Oleg Iarygin.

View File

@ -1,2 +0,0 @@
The documentation now lists which members of C structs are part of the
:ref:`Limited API/Stable ABI <stable>`.

View File

@ -1,3 +0,0 @@
Update the introduction to documentation for :mod:`os.path` to remove
warnings that became irrelevant after the implementations of :pep:`383` and
:pep:`529`.

View File

@ -1,2 +0,0 @@
Add a What's New in Python 3.11 entry for the Faster CPython project.
Documentation by Ken Jin and Kumar Aditya.

View File

@ -1 +0,0 @@
Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview'

View File

@ -1 +0,0 @@
Clarify the meaning of *dirs_exist_ok*, a kwarg of :func:`shutil.copytree`.

View File

@ -1,2 +0,0 @@
In ``importlib.resources.abc``, refined the documentation of the Traversable
Protocol, applying changes from importlib_resources 5.7.1.

View File

@ -1 +0,0 @@
Remove "Undocumented modules" page.

View File

@ -1,2 +0,0 @@
Document security issues concerning the use of the function
:meth:`shutil.unpack_archive`

View File

@ -1 +0,0 @@
Add a new `gh` role to the documentation to link to GitHub issues.

View File

@ -1,3 +0,0 @@
Add :meth:`~sqlite3.Connection.blobopen` to :class:`sqlite3.Connection`.
:class:`sqlite3.Blob` allows incremental I/O operations on blobs.
Patch by Aviv Palivoda and Erlend E. Aasland.

View File

@ -1,4 +0,0 @@
:class:`~pathlib.Path` methods :meth:`~pathlib.Path.glob` and :meth:`~pathlib.Path.rglob` return only
directories if *pattern* ends with a pathname components separator
(``/`` or :data:`~os.sep`).
Patch by Eisuke Kawashima.

View File

@ -1,3 +0,0 @@
Adds a ``start_tls()`` method to :class:`~asyncio.streams.StreamWriter`,
which upgrades the connection with TLS using the given
:class:`~ssl.SSLContext`.

View File

@ -1,2 +0,0 @@
Raise :exc:`~sqlite3.ProgrammingError` instead of segfaulting on recursive
usage of cursors in :mod:`sqlite3` converters. Patch by Sergey Fedoseev.

View File

@ -1,3 +0,0 @@
Raise an ArgumentError when the same subparser name is added twice to an
`argparse.ArgumentParser`. This is consistent with the (default) behavior
when the same option string is added twice to an ArgumentParser.

View File

@ -1,3 +0,0 @@
Convert :mod:`csv` to use Argument Clinic for :func:`csv.field_size_limit`,
:func:`csv.get_dialect`, :func:`csv.unregister_dialect` and :func:`csv.list_dialects`.

View File

@ -1,3 +0,0 @@
Add :meth:`~sqlite3.Connection.create_window_function` to
:class:`sqlite3.Connection` for creating aggregate window functions.
Patch by Erlend E. Aasland.

View File

@ -1,2 +0,0 @@
Fix cookies getting sorted in :func:`CookieJar.__iter__` which is an extra behavior and not mentioned in RFC 2965 or Netscape cookie protocol.
Now the cookies in ``CookieJar`` follows the order of the ``Set-Cookie`` header. Patch by Iman Kermani.

View File

@ -1,2 +0,0 @@
Add a ``process_group`` parameter to :class:`subprocess.Popen` to help move
more things off of the unsafe ``preexec_fn`` parameter.

View File

@ -1,2 +0,0 @@
Prevent creation of a venv whose path contains the PATH separator. This
could affect the usage of the activate script. Patch by Dustin Rodrigues.

View File

@ -1 +0,0 @@
All positional-or-keyword parameters to ``ABCMeta.__new__`` are now positional-only to avoid conflicts with keyword arguments to be passed to :meth:`__init_subclass__`.

View File

@ -1,2 +0,0 @@
Fix BooleanOptionalAction to not automatically add a default string. If a
default string is desired, use a formatter to add it.

View File

@ -1,4 +0,0 @@
Allow :class:`~typing.TypedDict` subclasses to also include
:class:`~typing.Generic` as a base class in class based syntax. Thereby allowing
the user to define a generic ``TypedDict``, just like a user-defined generic but
with ``TypedDict`` semantics.

View File

@ -1,3 +0,0 @@
Fix a regression in the :mod:`sqlite3` trace callback where bound parameters
were not expanded in the passed statement string. The regression was introduced
in Python 3.10 by :issue:`40318`. Patch by Erlend E. Aasland.

View File

@ -1,4 +0,0 @@
Fully implement the :class:`io.BufferedIOBase` or :class:`io.TextIOBase`
interface for :class:`tempfile.SpooledTemporaryFile` objects. This lets them
work correctly with higher-level layers (like compression modules). Patch by
Carey Metcalfe.

View File

@ -1,3 +0,0 @@
Add a "z" option to the string formatting specification that coerces negative
zero floating-point values to positive zero after rounding to the format
precision. Contributed by John Belmonte.

View File

@ -1 +0,0 @@
``CookieJar`` with ``DefaultCookiePolicy`` now can process cookies from localhost with domain=localhost explicitly specified in Set-Cookie header.

View File

@ -1,2 +0,0 @@
Fix ipaddress.ip_{address,interface,network} raising TypeError instead of
ValueError if given invalid tuple as address parameter.

View File

@ -1 +0,0 @@
Remove variables leaking into ``pydoc.Helper`` class namespace.

View File

@ -1 +0,0 @@
Accept ellipsis as the last argument of :data:`typing.Concatenate`.

View File

@ -1,4 +0,0 @@
Add command-line option ``-p``/``--protocol`` to module :mod:`http.server`
which specifies the HTTP version to which the server is conformant (HTTP/1.1
conformant servers can now be run from the command-line interface of module
:mod:`http.server`). Patch by Géry Ogam.

Some files were not shown because too many files have changed in this diff Show More