Python 3.10.0a1

This commit is contained in:
Pablo Galindo 2020-10-05 18:24:54 +01:00
parent d02d824e05
commit 8e9afaf822
No known key found for this signature in database
GPG Key ID: FFE87404168BD847
353 changed files with 4131 additions and 1176 deletions

View File

@ -20,10 +20,10 @@
#define PY_MINOR_VERSION 10
#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.10.0a0"
#define PY_VERSION "3.10.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

3519
Misc/NEWS.d/3.10.0a1.rst Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +0,0 @@
Fixed an issue where the :mod:`zoneinfo` module and its tests were not
included when Python is installed with ``make``.

View File

@ -1,2 +0,0 @@
``make install`` now uses the ``PLATLIBDIR`` variable for the destination
``lib-dynload/`` directory when ``./configure --with-platlibdir`` is used.

View File

@ -1,2 +0,0 @@
The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now required
to build Python.

View File

@ -1 +0,0 @@
Pin Sphinx version to 2.3.1 in ``Doc/Makefile``.

View File

@ -1,2 +0,0 @@
Fix ``pycore_bitutils.h`` header file to support old clang versions:
``__builtin_bswap16()`` is not available in LLVM clang 3.0.

View File

@ -1,2 +0,0 @@
Update :c:macro:`Py_UNREACHABLE` to use __builtin_unreachable() if only the
compiler is able to use it. Patch by Dong-hee Na.

View File

@ -1 +0,0 @@
Remove superfluous "extern C" declarations from ``Include/cpython/*.h``.

View File

@ -1,2 +0,0 @@
The PyType_FromSpec*() functions no longer overwrite the type's "__module__" attribute
if it is set via "Py_tp_members" or "Py_tp_getset".

View File

@ -1,5 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
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``.

View File

@ -1,2 +0,0 @@
:c:func:`PyOS_InterruptOccurred` now fails with a fatal error if it is
called with the GIL released.

View File

@ -1,2 +0,0 @@
Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed for
historical reason. It is no longer allowed.

View File

@ -1 +0,0 @@
Fix a ``_PyEval_EvalCode()`` crash if *qualname* argument is NULL.

View File

@ -1 +0,0 @@
Allow defining buffer slots in type specs.

View File

@ -1,3 +0,0 @@
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``.

View File

@ -1,5 +0,0 @@
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`.

View File

@ -1,2 +0,0 @@
On Windows, ``#include "pyerrors.h"`` no longer defines ``snprintf`` and
``vsnprintf`` macros.

View File

@ -1,3 +0,0 @@
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.

View File

@ -1,4 +0,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.

View File

@ -1,2 +0,0 @@
Raises DeprecationWarning for ``PyUnicode_FromUnicode(NULL, size)`` and
``PyUnicode_FromStringAndSize(NULL, size)`` with ``size > 0``.

View File

@ -1,4 +0,0 @@
``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`.

View File

@ -1 +0,0 @@
Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings.

View File

@ -1 +0,0 @@
Removed ``PyUnicode_GetMax()``.

View File

@ -1 +0,0 @@
Removed ``PyLong_FromUnicode()``.

View File

@ -1 +0,0 @@
Remove ``PyUnicode_AsUnicodeCopy``.

View File

@ -1,4 +0,0 @@
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.

View File

@ -1,3 +0,0 @@
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.

View File

@ -1,3 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented
pointers beyond the end of a string.

View File

@ -1,2 +0,0 @@
Types created with :c:func:`PyType_FromSpec` now make any signature in their
``tp_doc`` slot accessible from ``__text_signature__``.

View File

@ -1,3 +0,0 @@
Remove the ``_Py_CheckRecursionLimit`` variable: it has been replaced by
``ceval.recursion_limit`` of the :c:type:`PyInterpreterState`
structure. Patch by Victor Stinner.

View File

@ -1,2 +0,0 @@
Add :c:func:`PyCodec_Unregister` function to unregister a codec search
function.

View File

@ -1,3 +0,0 @@
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.

View File

@ -1,3 +0,0 @@
Removed undocumented macros ``Py_ALLOW_RECURSION`` and
``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the
:c:type:`PyInterpreterState` structure.

View File

@ -1,2 +0,0 @@
The int type now supports the x.is_integer() method for compatibility with
float.

View File

@ -1,2 +0,0 @@
Add the private macros ``_Py_COMP_DIAG_PUSH``,
``_Py_COMP_DIAG_IGNORE_DEPR_DECLS``, and ``_Py_COMP_DIAG_POP``.

View File

@ -1 +0,0 @@
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.

View File

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

View File

@ -1,5 +0,0 @@
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).

View File

@ -1 +0,0 @@
Port :mod:`_lzma` to multiphase initialization.

View File

@ -1 +0,0 @@
Port :mod:`mmap` to multiphase initialization.

View File

@ -1 +0,0 @@
Improve performance of generators by not raising internal StopIteration.

View File

@ -1,2 +0,0 @@
Make the stack trace correct after calling :meth:`generator.throw`
on a generator that has yielded from a ``yield from``.

View File

@ -1,2 +0,0 @@
Certain :exc:`TypeError` messages about missing or extra arguments now include the function's
:term:`qualified name`. Patch by Dennis Sweeney.

View File

@ -1,9 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
Fix a hang that can arise after :meth:`generator.throw` due to a cycle
in the exception context chain.

View File

@ -1,2 +0,0 @@
:c:func:`Py_TYPE()` is changed to the inline static function. Patch by
Dong-hee Na.

View File

@ -1,4 +0,0 @@
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.

View File

@ -1 +0,0 @@
Support the "-d" debug flag in the new PEG parser. Patch by Pablo Galindo

View File

@ -1 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
Fix a corner case where g-style string formatting of a float failed to
remove trailing zeros.

View File

@ -1,3 +0,0 @@
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``.

View File

@ -1,4 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
Delete unnecessary instance check in importlib.reload().
Patch by Furkan Önder.

View File

@ -1 +0,0 @@
Port :mod:`fcntl` to multiphase initialization.

View File

@ -1,2 +0,0 @@
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.

View File

@ -1 +0,0 @@
Allow overriding :data:`sys.platlibdir` via a new :envvar:`PYTHONPLATLIBDIR` environment variable.

View File

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

View File

@ -1 +0,0 @@
Fix memory leak in when parsing f-strings in the new parser. Patch by Pablo Galindo

View File

@ -1,2 +0,0 @@
Fix invalid memory read in the new parser when checking newlines in string
literals. Patch by Pablo Galindo.

View File

@ -1 +0,0 @@
Fixed a possible segfault in the new PEG parser when producing error messages for invalid assignments of the form :code:`p=p=`. Patch by Pablo Galindo

View File

@ -1,2 +0,0 @@
Fix possible segfault in the new PEG parser when parsing f-string containing
yield statements with no value (:code:`f"{yield}"`). Patch by Pablo Galindo

View File

@ -1 +0,0 @@
Improved the performance of symmetric difference operations on dictionary item views. Patch by Dennis Sweeney.

View File

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

View File

@ -1,4 +0,0 @@
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`.

View File

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

View File

@ -1,2 +0,0 @@
The Python :ref:`Path Configuration <init-path-config>` now takes
:c:member:`PyConfig.platlibdir` in account.

View File

@ -1,2 +0,0 @@
Add a state to the :mod:`nis` module (:pep:`3121`) and apply
the multiphase initialization. Patch by Dong-hee Na.

View File

@ -1 +0,0 @@
Fix refleak in _Py_fopen_obj() when PySys_Audit() fails

View File

@ -1 +0,0 @@
Port :mod:`_dbm` to multiphase initialization.

View File

@ -1,2 +0,0 @@
Fix a possible buffer overflow in the PEG parser when gathering information
for emitting syntax errors. Patch by Pablo Galindo.

View File

@ -1 +0,0 @@
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.

View File

@ -1 +0,0 @@
Port :mod:`_gdbm` to multiphase initialization.

View File

@ -1,3 +0,0 @@
: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.

View File

@ -1,2 +0,0 @@
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.

View File

@ -1 +0,0 @@
Convert :mod:`_bz2` to use :c:func:`PyType_FromSpec`.

View File

@ -1 +0,0 @@
Remove the remaining files from the old parser and the :mod:`symbol` module.

View File

@ -1,3 +0,0 @@
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.

View File

@ -1 +0,0 @@
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.

View File

@ -1 +0,0 @@
Opt out serialization/deserialization for _random.Random

View File

@ -1 +0,0 @@
Fix incorrect expressions and asserts in hashtable code and tests.

View File

@ -1 +0,0 @@
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)

View File

@ -1 +0,0 @@
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.

View File

@ -1 +0,0 @@
Empty frozensets are no longer singletons.

View File

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

View File

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

View File

@ -1,2 +0,0 @@
Fix decoding errors with audit when open files with non-ASCII names on non-UTF-8
locale.

View File

@ -1 +0,0 @@
add arm64 to the allowable Mac OS arches in mpdecimal.h

View File

@ -1,2 +0,0 @@
Guard against a NULL pointer dereference within bytearrayobject triggered by
the ``bytearray() + bytearray()`` operation.

View File

@ -1 +0,0 @@
Port :mod:`sha256` to multiphase initialization

View File

@ -1 +0,0 @@
Port :mod:`faulthandler` to multiphase initialization.

View File

@ -1,4 +0,0 @@
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.

View File

@ -1,2 +0,0 @@
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.

View File

@ -1 +0,0 @@
Port :mod:`winapi` to multiphase initialization

View File

@ -1 +0,0 @@
Port :mod:`multiprocessing` to multi-phase initialization

View File

@ -1 +0,0 @@
Fix incorrect refcounting in _ssl.c's ``_servername_callback()``.

View File

@ -1,2 +0,0 @@
Always cache the running loop holder when running
``asyncio.set_running_loop``.

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