mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
Python 3.11.0a1
This commit is contained in:
parent
5146877623
commit
7c12e4835e
@ -20,10 +20,10 @@
|
||||
#define PY_MINOR_VERSION 11
|
||||
#define PY_MICRO_VERSION 0
|
||||
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
|
||||
#define PY_RELEASE_SERIAL 0
|
||||
#define PY_RELEASE_SERIAL 1
|
||||
|
||||
/* Version as a string */
|
||||
#define PY_VERSION "3.11.0a0"
|
||||
#define PY_VERSION "3.11.0a1"
|
||||
/*--end constants--*/
|
||||
|
||||
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
|
||||
|
File diff suppressed because it is too large
Load Diff
5098
Misc/NEWS.d/3.11.0a1.rst
Normal file
5098
Misc/NEWS.d/3.11.0a1.rst
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
||||
Fix broken ``make install`` that caused standard library extension modules
|
||||
to be unnecessarily and incorrectly rebuilt during the install phase of
|
||||
cpython.
|
@ -1,2 +0,0 @@
|
||||
The Windows build now accepts :envvar:`EnableControlFlowGuard` set to
|
||||
``guard`` to enable CFG.
|
@ -1 +0,0 @@
|
||||
Improved error message when building without a Windows SDK installed.
|
@ -1 +0,0 @@
|
||||
Enable building using a Visual Studio 2022 install on Windows.
|
@ -1,2 +0,0 @@
|
||||
Add support for building with clang thin lto via --with-lto=thin/full. Patch
|
||||
by Dong-hee Na and Brett Holman.
|
@ -1,3 +0,0 @@
|
||||
Generate lines in relevant files for frozen modules. Up until now each of
|
||||
the files had to be edited manually. This change makes it easier to add to
|
||||
and modify the frozen modules.
|
@ -1,7 +0,0 @@
|
||||
The ncurses function extended_color_content was introduced in 2017
|
||||
|
||||
(https://invisible-island.net/ncurses/NEWS.html#index-t20170401). The
|
||||
|
||||
ncurses-devel package in CentOS 7 had a older version ncurses resulted in
|
||||
compilation error. For compiling ncurses with extended color support, we
|
||||
verify the version of the ncurses library >= 20170401.
|
@ -1 +0,0 @@
|
||||
Fixes Haiku platform build.
|
@ -1,3 +0,0 @@
|
||||
Windows builds now regenerate frozen modules as the first part of the build.
|
||||
Previously the regeneration was later in the build, which would require it
|
||||
to be restarted if any modules had changed.
|
@ -1,4 +0,0 @@
|
||||
Freeze stdlib modules that are imported during startup. This provides
|
||||
significant performance improvements to startup. If necessary, use the
|
||||
previously added "-X frozen_modules=off" commandline option to force
|
||||
importing the source modules.
|
@ -1,3 +0,0 @@
|
||||
Avoid building with the Windows 11 SDK previews automatically. This may be
|
||||
overridden by setting the ``DefaultWindowsSDKVersion`` environment variable
|
||||
before building.
|
@ -1 +0,0 @@
|
||||
Add a new :c:func:`PyType_GetName` function to get type's short name.
|
@ -1,9 +0,0 @@
|
||||
Remove deprecated ``Py_UNICODE`` APIs: ``PyUnicode_Encode``,
|
||||
``PyUnicode_EncodeUTF7``, ``PyUnicode_EncodeUTF8``,
|
||||
``PyUnicode_EncodeUTF16``, ``PyUnicode_EncodeUTF32``,
|
||||
``PyUnicode_EncodeLatin1``, ``PyUnicode_EncodeMBCS``,
|
||||
``PyUnicode_EncodeDecimal``, ``PyUnicode_EncodeRawUnicodeEscape``,
|
||||
``PyUnicode_EncodeCharmap``, ``PyUnicode_EncodeUnicodeEscape``,
|
||||
``PyUnicode_TransformDecimalToASCII``, ``PyUnicode_TranslateCharmap``,
|
||||
``PyUnicodeEncodeError_Create``, ``PyUnicodeTranslateError_Create``. See
|
||||
:pep:`393` and :pep:`624` for reference.
|
@ -1,2 +0,0 @@
|
||||
:c:func:`PyCodec_Unregister` is now properly exported as a function in the
|
||||
Windows Stable ABI DLL.
|
@ -1,4 +0,0 @@
|
||||
Remove ``PyErr_SetFromErrnoWithUnicodeFilename()``,
|
||||
``PyErr_SetFromWindowsErrWithUnicodeFilename()``, and
|
||||
``PyErr_SetExcFromWindowsErrWithUnicodeFilename()``. They are not documented
|
||||
and have been deprecated since Python 3.3.
|
@ -1,14 +0,0 @@
|
||||
Deprecate the following functions to configure the Python initialization:
|
||||
|
||||
* :c:func:`PySys_AddWarnOptionUnicode`
|
||||
* :c:func:`PySys_AddWarnOption`
|
||||
* :c:func:`PySys_AddXOption`
|
||||
* :c:func:`PySys_HasWarnOptions`
|
||||
* :c:func:`Py_SetPath`
|
||||
* :c:func:`Py_SetProgramName`
|
||||
* :c:func:`Py_SetPythonHome`
|
||||
* :c:func:`Py_SetStandardStreamEncoding`
|
||||
* :c:func:`_Py_SetProgramFullPath`
|
||||
|
||||
Use the new :c:type:`PyConfig` API of the :ref:`Python Initialization
|
||||
Configuration <init-config>` instead (:pep:`587`).
|
@ -1 +0,0 @@
|
||||
The undocumented function :c:func:`Py_FrozenMain` is removed from the Limited API.
|
@ -1,4 +0,0 @@
|
||||
The :c:func:`PyType_Ready` function now raises an error if a type is defined
|
||||
with the :const:`Py_TPFLAGS_HAVE_GC` flag set but has no traverse function
|
||||
(:c:member:`PyTypeObject.tp_traverse`).
|
||||
Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
Convert the :c:func:`Py_TYPE` and :c:func:`Py_SIZE` macros to static inline
|
||||
functions. The :c:func:`Py_SET_TYPE` and :c:func:`Py_SET_SIZE` functions
|
||||
must now be used to set an object type and size. Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
:c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid a compiler
|
||||
warning: no longer cast ``const PyObject*`` to ``PyObject*``.
|
||||
Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
The list in :ref:`stable-abi-list` now shows the public name
|
||||
:c:struct:`PyFrameObject` rather than ``_frame``. The non-existing
|
||||
entry ``_node`` no longer appears in the list.
|
@ -1 +0,0 @@
|
||||
Removed documentation for the removed ``PyParser_*`` C API.
|
@ -1,20 +0,0 @@
|
||||
Remove 4 private trashcan C API functions which were only kept for the backward
|
||||
compatibility of the stable ABI with Python 3.8 and older, since the trashcan
|
||||
API was not usable with the limited C API on Python 3.8 and older. The
|
||||
trashcan API was excluded from the limited C API in Python 3.9.
|
||||
|
||||
Removed functions:
|
||||
|
||||
* _PyTrash_deposit_object()
|
||||
* _PyTrash_destroy_chain()
|
||||
* _PyTrash_thread_deposit_object()
|
||||
* _PyTrash_thread_destroy_chain()
|
||||
|
||||
The trashcan C API was never usable with the limited C API, since old trashcan
|
||||
macros accessed directly :c:type:`PyThreadState` members like
|
||||
``_tstate->trash_delete_nesting``, whereas the :c:type:`PyThreadState`
|
||||
structure is opaque in the limited C API.
|
||||
|
||||
Exclude also the the ``PyTrash_UNWIND_LEVEL`` constant from the C API.
|
||||
|
||||
Patch by Victor Stinner.
|
@ -1,4 +0,0 @@
|
||||
:c:func:`Py_RunMain` now resets :c:data:`PyImport_Inittab` to its initial value
|
||||
at exit. It must be possible to call :c:func:`PyImport_AppendInittab` or
|
||||
:c:func:`PyImport_ExtendInittab` at each Python initialization.
|
||||
Patch by Victor Stinner.
|
@ -1,4 +0,0 @@
|
||||
Added the ``co_qualname`` to the ``PyCodeObject`` structure to propagate the
|
||||
qualified name from the compiler to code objects.
|
||||
|
||||
Patch by Gabriele N. Tornetta
|
@ -1,4 +0,0 @@
|
||||
The ``Py_TPFLAGS_HAVE_VERSION_TAG`` type flag now does nothing. The
|
||||
``Py_TPFLAGS_HAVE_AM_SEND`` flag (which was added in 3.10) is removed. Both
|
||||
were unnecessary because it is not possible to have type objects with the
|
||||
relevant fields missing.
|
@ -1 +0,0 @@
|
||||
Remove ``crypt.h`` include from the public ``Python.h`` header.
|
@ -1,2 +0,0 @@
|
||||
Reverts removal of the old buffer protocol because they are part of stable
|
||||
ABI.
|
@ -1,2 +0,0 @@
|
||||
Add a new :c:func:`PyType_GetQualName` function to get type's qualified
|
||||
name.
|
@ -1,3 +0,0 @@
|
||||
Add a deallocator to the :class:`bool` type to detect refcount bugs in C
|
||||
extensions which call ``Py_DECREF(Py_True);`` or ``Py_DECREF(Py_False);`` by
|
||||
mistake. Patch by Victor Stinner.
|
@ -1,2 +0,0 @@
|
||||
Add the :c:macro:`Py_NO_INLINE` macro to disable inlining on a function.
|
||||
Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
Add the :c:macro:`Py_ALWAYS_INLINE` macro to ask the compiler to always
|
||||
inline a static inline function. The compiler can ignore it and decides to
|
||||
not inline the function. Patch by Victor Stinner.
|
@ -1 +0,0 @@
|
||||
:meth:`BufferedReader.peek` no longer raises :exc:`ValueError` when the entire file has already been buffered.
|
@ -1,2 +0,0 @@
|
||||
The PyThread_acquire_lock_timed() function now clamps the timeout if it is
|
||||
too large, rather than aborting the process. Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
Asynchronous comprehensions are now allowed inside comprehensions in
|
||||
asynchronous functions. Outer comprehensions implicitly become
|
||||
asynchronous.
|
@ -1 +0,0 @@
|
||||
Fix crash when using passing a non-exception to a generator's ``throw()`` method. Patch by Noah Oxer
|
@ -1,3 +0,0 @@
|
||||
When compiling :class:`ast.AST` objects with recursive references
|
||||
through :func:`compile`, the interpreter doesn't crash anymore instead
|
||||
it raises a :exc:`RecursionError`.
|
@ -1 +0,0 @@
|
||||
Fix a confusing error message in :func:`str.format`.
|
@ -1 +0,0 @@
|
||||
More accurate error messages for access of unbound locals or free vars.
|
@ -1,4 +0,0 @@
|
||||
Compute cell offsets relative to locals in compiler. Allows the interpreter
|
||||
to treats locals and cells a single array, which is slightly more efficient.
|
||||
Also make the LOAD_CLOSURE opcode an alias for LOAD_FAST. Preserving
|
||||
LOAD_CLOSURE helps keep bytecode a bit more readable.
|
@ -1 +0,0 @@
|
||||
Add native_thread_id to PyThreadState. Patch by Gabriele N. Tornetta.
|
@ -1,4 +0,0 @@
|
||||
Emit a deprecation warning if the numeric literal is immediately followed by
|
||||
one of keywords: and, else, for, if, in, is, or. Raise a syntax error with
|
||||
more informative message if it is immediately followed by other keyword or
|
||||
identifier.
|
@ -1 +0,0 @@
|
||||
Document the signature and ``default`` argument in the docstring of the new ``anext`` builtin.
|
@ -1,7 +0,0 @@
|
||||
"Zero cost" exception handling.
|
||||
|
||||
* Uses a lookup table to determine how to handle exceptions.
|
||||
* Removes SETUP_FINALLY and POP_TOP block instructions, eliminating the runtime overhead of try statements.
|
||||
* Reduces the size of the frame object by about 60%.
|
||||
|
||||
Patch by Mark Shannon
|
@ -1,2 +0,0 @@
|
||||
The parser will prioritize tokenizer errors over custom syntax errors when
|
||||
raising exceptions. Patch by Pablo Galindo.
|
@ -1,2 +0,0 @@
|
||||
Corrent the syntax error message regarding multiple exception types to not
|
||||
refer to "exception groups". Patch by Pablo Galindo
|
@ -1,3 +0,0 @@
|
||||
Compiler now optimizes simple C-style formatting with literal format
|
||||
containing only format codes %s, %r and %a by converting them to f-string
|
||||
expressions.
|
@ -1,3 +0,0 @@
|
||||
Add ``CALL_METHOD_KW`` opcode to speed up method calls with keyword
|
||||
arguments. Idea originated from PyPy. A side effect is executing
|
||||
``CALL_METHOD`` is now branchless in the evaluation loop.
|
@ -1 +0,0 @@
|
||||
Improve :func:`str.__getitem__` error message
|
@ -1 +0,0 @@
|
||||
Fix incorrect dictkeys_reversed and dictitems_reversed function signatures in C code, which broke webassembly builds.
|
@ -1,2 +0,0 @@
|
||||
Move 'fast' locals and other variables from the frame object to a per-thread
|
||||
datastack.
|
@ -1,2 +0,0 @@
|
||||
Fixed a crash in the parser that manifest when raising tokenizer errors when
|
||||
an existing exception was present. Patch by Pablo Galindo.
|
@ -1 +0,0 @@
|
||||
String caches in ``compile.c`` are now subinterpreter compatible.
|
@ -1,2 +0,0 @@
|
||||
Fix error message in the parser involving keyword arguments with invalid
|
||||
expressions. Patch by Pablo Galindo
|
@ -1,3 +0,0 @@
|
||||
The parser doesn't report generic syntax errors that happen in a position
|
||||
further away that the one it reached in the first pass. Patch by Pablo
|
||||
Galindo
|
@ -1,3 +0,0 @@
|
||||
Implement quickening in the interpreter. This offers no advantages as
|
||||
yet, but is an enabler of future optimizations. See PEP 659 for full
|
||||
explanation.
|
@ -1,3 +0,0 @@
|
||||
Fix a crash at Python exit when a deallocator function removes the last strong
|
||||
reference to a heap type.
|
||||
Patch by Victor Stinner.
|
@ -1,3 +0,0 @@
|
||||
``PyCodeObject`` gained ``co_fastlocalnames`` and ``co_fastlocalkinds`` as
|
||||
the the authoritative source of fast locals info. Marshaled code objects
|
||||
have changed accordingly.
|
@ -1,3 +0,0 @@
|
||||
Avoid side effects of checking for specialized syntax errors in the REPL
|
||||
that was causing it to ask for extra tokens after a syntax error had been
|
||||
detected. Patch by Pablo Galindo
|
@ -1,4 +0,0 @@
|
||||
Fix a regression in :func:`type` when a metaclass raises an exception. The C
|
||||
function :c:func:`type_new` must properly report the exception when a metaclass
|
||||
constructor raises an exception and the winner class is not the metaclass.
|
||||
Patch by Victor Stinner.
|
@ -1,5 +0,0 @@
|
||||
A new opcode MAKE_CELL has been added that effectively moves some of
|
||||
the work done on function entry into the compiler and into the eval
|
||||
loop. In addition to creating the required cell objects, the new
|
||||
opcode converts relevant arguments (and other locals) to cell
|
||||
variables on function entry.
|
@ -1,2 +0,0 @@
|
||||
Improve Unicode support in non-UTF locales on Oracle Solaris. This issue
|
||||
does not affect other Solaris systems.
|
@ -1,4 +0,0 @@
|
||||
Constructors of subclasses of some buitin classes (e.g. :class:`tuple`,
|
||||
:class:`list`, :class:`frozenset`) no longer accept arbitrary keyword
|
||||
arguments. Subclass of :class:`set` can now define a ``__new__()`` method
|
||||
with additional keyword parameters without overriding also ``__init__()``.
|
@ -1,2 +0,0 @@
|
||||
Improve error message for ``try`` blocks without ``except`` or ``finally``
|
||||
blocks. Patch by Pablo Galindo.
|
@ -1,2 +0,0 @@
|
||||
Fix a crash in the :mod:`sqlite3` module that happened when the garbage
|
||||
collector clears :class:`sqlite.Statement` objects. Patch by Pablo Galindo
|
@ -1 +0,0 @@
|
||||
Improve tokenizer error with improved locations. Patch by Pablo Galindo.
|
@ -1,4 +0,0 @@
|
||||
Computation of the offsets of cell variables is done in the compiler instead
|
||||
of at runtime. This reduces the overhead of handling cell and free
|
||||
variables, especially in the case where a variable is both an argument and
|
||||
cell variable.
|
@ -1,2 +0,0 @@
|
||||
Fix a regression when identifying incorrect characters in syntax errors.
|
||||
Patch by Pablo Galindo
|
@ -1,11 +0,0 @@
|
||||
Initial implementation of adaptive specialization of LOAD_ATTR
|
||||
|
||||
Four specialized forms of LOAD_ATTR are added:
|
||||
|
||||
* LOAD_ATTR_SLOT
|
||||
|
||||
* LOAD_ATTR_SPLIT_KEYS
|
||||
|
||||
* LOAD_ATTR_WITH_HINT
|
||||
|
||||
* LOAD_ATTR_MODULE
|
@ -1 +0,0 @@
|
||||
Fix an edge case when displaying text from files with encoding in syntax errors. Patch by Pablo Galindo.
|
@ -1 +0,0 @@
|
||||
Improve syntax errors for invalid "as" targets. Patch by Pablo Galindo
|
@ -1,7 +0,0 @@
|
||||
Implement adaptive specialization for LOAD_GLOBAL
|
||||
|
||||
Two specialized forms of LOAD_GLOBAL are added:
|
||||
|
||||
* LOAD_GLOBAL_MODULE
|
||||
|
||||
* LOAD_GLOBAL_BUILTIN
|
@ -1,4 +0,0 @@
|
||||
Directly imported objects and modules (through import and from import
|
||||
statements) don't generate ``LOAD_METHOD``/``CALL_METHOD`` for directly
|
||||
accessed objects on their namespace. They now use the regular
|
||||
``LOAD_ATTR``/``CALL_FUNCTION``.
|
@ -1 +0,0 @@
|
||||
Exact integer exponentiation (like ``i**2`` or ``pow(i, 2)``) with a small exponent is much faster, due to reducing overhead in such cases.
|
@ -1,2 +0,0 @@
|
||||
Fix a possible crash in the tokenizer when raising syntax errors for
|
||||
unclosed strings. Patch by Pablo Galindo.
|
@ -1,2 +0,0 @@
|
||||
Fix error location information for tokenizer errors raised on initialization
|
||||
of the tokenizer. Patch by Pablo Galindo.
|
@ -1,2 +0,0 @@
|
||||
Improve the syntax error when mixing positional and keyword patterns. Patch
|
||||
by Pablo Galindo.
|
@ -1,3 +0,0 @@
|
||||
Make sure that the line number is set when entering a comprehension scope.
|
||||
Ensures that backtraces inclusing generator expressions show the correct
|
||||
line number.
|
@ -1,4 +0,0 @@
|
||||
A :exc:`TypeError` is now raised instead of an :exc:`AttributeError` in
|
||||
:keyword:`with` and :keyword:`async with` statements for objects which do
|
||||
not support the :term:`context manager` or :term:`asynchronous context
|
||||
manager` protocols correspondingly.
|
@ -1 +0,0 @@
|
||||
Fix ltrace functionality when exceptions are raised. Patch by Pablo Galindo
|
@ -1,2 +0,0 @@
|
||||
Modules will always have a dictionary, even when created by
|
||||
``types.ModuleType.__new__()``
|
@ -1,2 +0,0 @@
|
||||
Fix a crash in ``types.Union`` objects when creating a union of an object
|
||||
with bad ``__module__`` field.
|
@ -1,3 +0,0 @@
|
||||
Remove the pass-through for :func:`hash` of :class:`weakref.proxy` objects
|
||||
to prevent unintended consequences when the original referred object
|
||||
dies while the proxy is part of a hashable object. Patch by Pablo Galindo.
|
@ -1,2 +0,0 @@
|
||||
Add ``__parameters__`` attribute and ``__getitem__``
|
||||
operator to ``types.Union``. Patch provided by Yurii Karabas.
|
@ -1,2 +0,0 @@
|
||||
Implement GC methods for ``types.Union`` to break reference cycles and
|
||||
prevent memory leaks.
|
@ -1,3 +0,0 @@
|
||||
Heap types with the :const:`Py_TPFLAGS_IMMUTABLETYPE` flag can now inherit the
|
||||
:pep:`590` vectorcall protocol. Previously, this was only possible for
|
||||
:ref:`static types <static-types>`. Patch by Erlend E. Aasland.
|
@ -1,3 +0,0 @@
|
||||
Fix a memory consumption and copying performance regression in earlier 3.10
|
||||
beta releases if someone used an output buffer larger than 4GiB with
|
||||
zlib.decompress on input data that expands that large.
|
@ -1,2 +0,0 @@
|
||||
Remove uses of :c:func:`PyObject_GC_Del` in error path when initializing
|
||||
:class:`types.GenericAlias`.
|
@ -1,6 +0,0 @@
|
||||
Code objects can now provide the column information for instructions when
|
||||
available. This is levaraged during traceback printing to show the
|
||||
expressions responsible for errors.
|
||||
|
||||
Contributed by Pablo Galindo, Batuhan Taskaya and Ammar Askar as part of
|
||||
:pep:`657`.
|
@ -1,3 +0,0 @@
|
||||
:mod:`typing` now searches for type parameters in ``types.Union`` objects.
|
||||
``get_type_hints`` will also properly resolve annotations with nested
|
||||
``types.Union`` objects. Patch provided by Yurii Karabas.
|
@ -1,4 +0,0 @@
|
||||
An obsolete internal cache of shared object file handles added in 1995 that
|
||||
attempted, but did not guarantee, that a .so would not be dlopen'ed twice to
|
||||
work around flaws in mid-1990s posix-ish operating systems has been removed
|
||||
from dynload_shlib.c.
|
@ -1,3 +0,0 @@
|
||||
The threading debug (:envvar:`PYTHONTHREADDEBUG` environment variable) is
|
||||
deprecated in Python 3.10 and will be removed in Python 3.12. This feature
|
||||
requires a debug build of Python. Patch by Victor Stinner.
|
@ -1,5 +0,0 @@
|
||||
All necessary data for executing a Python function (local variables, stack,
|
||||
etc) is now kept in a per-thread stack. Frame objects are lazily allocated
|
||||
on demand. This increases performance by about 7% on the standard benchmark
|
||||
suite. Introspection and debugging are unaffected as frame objects are
|
||||
always available when needed. Patch by Mark Shannon.
|
@ -1 +0,0 @@
|
||||
Tuned the string-searching algorithm of fastsearch.h to have a shorter inner loop for most cases.
|
@ -1,2 +0,0 @@
|
||||
The ``@classmethod`` decorator can now wrap other classmethod-like
|
||||
descriptors.
|
@ -1 +0,0 @@
|
||||
Fix ``__instancecheck__`` and ``__subclasscheck__`` for the union type.
|
@ -1,2 +0,0 @@
|
||||
Mapping patterns in ``match`` statements with two or more equal literal
|
||||
keys will now raise a :exc:`SyntaxError` at compile-time.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user