cpython/Misc/NEWS.d/3.10.0a5.rst

671 lines
14 KiB
ReStructuredText

.. bpo: 42938
.. date: 2021-01-18-09-27-31
.. nonce: 4Zn4Mp
.. release date: 2021-02-02
.. section: Security
Avoid static buffers when computing the repr of :class:`ctypes.c_double` and
:class:`ctypes.c_longdouble` values.
..
.. bpo: 42990
.. date: 2021-01-30-11-31-44
.. nonce: 69h_zK
.. section: Core and Builtins
Refactor the ``PyEval_`` family of functions.
* An new function ``_PyEval_Vector`` is added to simplify calls to Python from C.
* ``_PyEval_EvalCodeWithName`` is removed
* ``PyEval_EvalCodeEx`` is retained as part of the API, but is not used internally
..
.. bpo: 38631
.. date: 2021-01-29-17-48-44
.. nonce: jR-3kC
.. section: Core and Builtins
Replace :c:func:`Py_FatalError` calls in the compiler with regular
:exc:`SystemError` exceptions. Patch by Victor Stinner.
..
.. bpo: 42997
.. date: 2021-01-24-20-19-55
.. nonce: QUOPgP
.. section: Core and Builtins
Improve error message for missing ":" before blocks. Patch by Pablo Galindo.
..
.. bpo: 43017
.. date: 2021-01-24-18-02-05
.. nonce: emEcXX
.. section: Core and Builtins
Improve error message in the parser when using un-parenthesised tuples in
comprehensions. Patch by Pablo Galindo.
..
.. bpo: 42986
.. date: 2021-01-20-23-44-15
.. nonce: sWoaGf
.. section: Core and Builtins
Fix parser crash when reporting syntax errors in f-string with newlines.
Patch by Pablo Galindo.
..
.. bpo: 40176
.. date: 2021-01-20-22-31-01
.. nonce: anjyWw
.. section: Core and Builtins
Syntax errors for unterminated string literals now point to the start of the
string instead of reporting EOF/EOL.
..
.. bpo: 42927
.. date: 2021-01-15-20-05-56
.. nonce: GI-l-7
.. section: Core and Builtins
The inline cache for ``LOAD_ATTR`` now also optimizes access to attributes
defined by ``__slots__``. This makes reading such attribute up to 30%
faster.
..
.. bpo: 42864
.. date: 2021-01-14-23-15-34
.. nonce: QgOAQ1
.. section: Core and Builtins
Improve error messages in the parser when parentheses are not closed. Patch
by Pablo Galindo.
..
.. bpo: 42924
.. date: 2021-01-13-14-06-01
.. nonce: _WS1Ok
.. section: Core and Builtins
Fix ``bytearray`` repetition incorrectly copying data from the start of the
buffer, even if the data is offset within the buffer (e.g. after reassigning
a slice at the start of the ``bytearray`` to a shorter byte string).
..
.. bpo: 42882
.. date: 2021-01-11-17-58-52
.. nonce: WfTdfg
.. section: Core and Builtins
Fix the :c:func:`!_PyUnicode_FromId` function (_Py_IDENTIFIER(var) API) when
:c:func:`Py_Initialize` / :c:func:`Py_Finalize` is called multiple times:
preserve ``_PyRuntime.unicode_ids.next_index`` value.
..
.. bpo: 42827
.. date: 2021-01-06-17-06-37
.. nonce: jtRR0D
.. section: Core and Builtins
Fix a crash when working out the error line of a :exc:`SyntaxError` in some
multi-line expressions.
..
.. bpo: 42823
.. date: 2021-01-04-18-17-07
.. nonce: dcSynu
.. section: Core and Builtins
frame.f_lineno is correct even if frame.f_trace is set to True
..
.. bpo: 37324
.. date: 2020-12-12-20-09-12
.. nonce: jB-9_U
.. section: Core and Builtins
Remove deprecated aliases to :ref:`collections-abstract-base-classes` from
the :mod:`collections` module.
..
.. bpo: 41994
.. date: 2020-10-10-14-16-03
.. nonce: Xop8sV
.. section: Core and Builtins
Fixed possible leak in ``import`` when ``sys.modules`` is not a ``dict``.
..
.. bpo: 27772
.. date: 2018-12-20-23-59-23
.. nonce: idHEcj
.. section: Core and Builtins
In string formatting, preceding the *width* field by ``'0'`` no longer
affects the default alignment for strings.
..
.. bpo: 43108
.. date: 2021-02-02-20-23-31
.. nonce: lqcCZ6
.. section: Library
Fixed a reference leak in the :mod:`curses` module. Patch by Pablo Galindo
..
.. bpo: 43077
.. date: 2021-01-30-15-20-06
.. nonce: Owk61z
.. section: Library
Update the bundled pip to 21.0.1 and setuptools to 52.0.0.
..
.. bpo: 41282
.. date: 2021-01-27-20-49-32
.. nonce: SEPdV0
.. section: Library
Deprecate ``distutils`` in documentation and add warning on import.
..
.. bpo: 43014
.. date: 2021-01-24-00-37-40
.. nonce: BVPhEr
.. section: Library
Improve performance of :mod:`tokenize` by 20-30%. Patch by Anthony Sottile.
..
.. bpo: 42323
.. date: 2021-01-20-12-10-47
.. nonce: PONB8e
.. section: Library
Fix :func:`math.nextafter` for NaN on AIX.
..
.. bpo: 42955
.. date: 2021-01-18-11-59-46
.. nonce: CSWLC9
.. section: Library
Add :data:`sys.stdlib_module_names`, containing the list of the standard
library module names. Patch by Victor Stinner.
..
.. bpo: 42944
.. date: 2021-01-18-10-41-44
.. nonce: RrONvy
.. section: Library
Fix ``random.Random.sample`` when ``counts`` argument is not ``None``.
..
.. bpo: 42934
.. date: 2021-01-15-11-48-00
.. nonce: ILKoOI
.. section: Library
Use :class:`~traceback.TracebackException`'s new ``compact`` param in
:class:`~unittest.TestResult` to reduce time and memory consumed by
traceback formatting.
..
.. bpo: 42931
.. date: 2021-01-15-00-23-50
.. nonce: QD6U2B
.. section: Library
Add :func:`randbytes` to ``random.__all__``.
..
.. bpo: 38250
.. date: 2021-01-14-15-07-16
.. nonce: 1fvhOk
.. section: Library
[Enum] Flags consisting of a single bit are now considered canonical, and
will be the only flags returned from listing and iterating over a Flag class
or a Flag member. Multi-bit flags are considered aliases; they will be
returned from lookups and operations that result in their value. Iteration
for both Flag and Flag members is in definition order.
..
.. bpo: 42877
.. date: 2021-01-13-12-55-41
.. nonce: Fi1zEG
.. section: Library
Added the ``compact`` parameter to the constructor of
:class:`traceback.TracebackException` to reduce time and memory for use
cases that only need to call :func:`TracebackException.format` and
:func:`TracebackException.format_exception_only`.
..
.. bpo: 42923
.. date: 2021-01-13-12-15-13
.. nonce: zBiNls
.. section: Library
The :c:func:`Py_FatalError` function and the :mod:`faulthandler` module now
dump the list of extension modules on a fatal error.
..
.. bpo: 42848
.. date: 2021-01-12-19-34-06
.. nonce: 5G8oBl
.. section: Library
Removed recursion from :class:`~traceback.TracebackException` to allow it to
handle long exception chains.
..
.. bpo: 42901
.. date: 2021-01-11-17-36-59
.. nonce: gFd-ta
.. section: Library
[Enum] move member creation from ``EnumMeta.__new__`` to
``_proto_member.__set_name__``, allowing members to be created and visible
in ``__init_subclass__``.
..
.. bpo: 42780
.. date: 2021-01-08-15-49-20
.. nonce: rtqi6B
.. section: Library
Fix os.set_inheritable() for O_PATH file descriptors on Linux.
..
.. bpo: 42866
.. date: 2021-01-08-10-57-21
.. nonce: Y1DnrO
.. section: Library
Fix a reference leak in the ``getcodec()`` function of CJK codecs. Patch by
Victor Stinner.
..
.. bpo: 42846
.. date: 2021-01-07-23-31-17
.. nonce: kukDjw
.. section: Library
Convert the 6 CJK codec extension modules (_codecs_cn, _codecs_hk,
_codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw) to the multiphase
initialization API (:pep:`489`). Patch by Victor Stinner.
..
.. bpo: 42851
.. date: 2021-01-07-11-44-22
.. nonce: uyQFyd
.. section: Library
remove __init_subclass__ support for Enum members
..
.. bpo: 42834
.. date: 2021-01-05-23-55-24
.. nonce: LxRnZC
.. section: Library
Make internal caches of the ``_json`` module compatible with
subinterpreters.
..
.. bpo: 41748
.. date: 2021-01-05-21-26-29
.. nonce: KdC0w3
.. section: Library
Fix HTMLParser parsing rules for element attributes containing commas with
spaces. Patch by Karl Dubost.
..
.. bpo: 40810
.. date: 2021-01-05-00-52-30
.. nonce: JxQqPe
.. section: Library
Require SQLite 3.7.15 or newer. Patch by Erlend E. Aasland.
..
.. bpo: 1635741
.. date: 2021-01-04-15-05-40
.. nonce: EOCfZY
.. section: Library
Convert the _multibytecodec extension module (CJK codecs) to multi-phase
initialization (:pep:`489`). Patch by Erlend E. Aasland.
..
.. bpo: 42802
.. date: 2021-01-01-15-29-16
.. nonce: Lw-bzl
.. section: Library
The distutils ``bdist_wininst`` command deprecated in Python 3.8 has been
removed. The distutils ``bdist_wheel`` command is now recommended to
distribute binary packages on Windows.
..
.. bpo: 24464
.. date: 2020-12-30-14-56-25
.. nonce: vbNVHe
.. section: Library
The undocumented built-in function ``sqlite3.enable_shared_cache`` is now
deprecated, scheduled for removal in Python 3.12. Its use is strongly
discouraged by the SQLite3 documentation. Patch by Erlend E. Aasland.
..
.. bpo: 42384
.. date: 2020-11-17-14-32-39
.. nonce: 1ZnQSn
.. section: Library
Make pdb populate sys.path[0] exactly the same as regular python execution.
..
.. bpo: 42383
.. date: 2020-11-17-14-30-12
.. nonce: ubl0Y_
.. section: Library
Fix pdb: previously pdb would fail to restart the debugging target if it was
specified using a relative path and the current directory changed.
..
.. bpo: 42005
.. date: 2020-10-11-13-48-03
.. nonce: Jq6Az-
.. section: Library
Fix CLI of :mod:`cProfile` and :mod:`profile` to catch
:exc:`BrokenPipeError`.
..
.. bpo: 41604
.. date: 2020-08-21-15-24-14
.. nonce: rTXleO
.. section: Library
Don't decrement the reference count of the previous user_ptr when
set_panel_userptr fails.
..
.. bpo: 41149
.. date: 2020-06-28-16-13-02
.. nonce: jiZWtJ
.. section: Library
Allow executing callables that have a boolean value of ``False`` when passed
to :class:`Threading.thread` as the target. Patch contributed by Barney
Stratford.
..
.. bpo: 38307
.. date: 2020-03-16-03-03-21
.. nonce: 2cmw2i
.. section: Library
Add an 'end_lineno' attribute to the Class and Function objects that appear
in the tree returned by pyclbr functions. This and the existing 'lineno'
attribute define the extent of class and def statements. Patch by Aviral
Srivastava.
..
.. bpo: 39273
.. date: 2020-01-13-23-37-58
.. nonce: m5hzxV
.. section: Library
The ``BUTTON5_*`` constants are now exposed in the :mod:`curses` module if
available.
..
.. bpo: 33289
.. date: 2018-04-23-13-44-10
.. nonce: anBnUr
.. section: Library
Correct call to :mod:`tkinter.colorchooser` to return RGB triplet of ints
instead of floats. Patch by Cheryl Sabella.
..
.. bpo: 40304
.. date: 2021-01-20-23-03-49
.. nonce: -LK7Ps
.. section: Documentation
Fix doc for type(name, bases, dict). Patch by Boris Verkhovskiy and Éric
Araujo.
..
.. bpo: 42811
.. date: 2021-01-04-22-14-22
.. nonce: HY2beA
.. section: Documentation
Updated importlib.util.resolve_name() doc to use __spec__.parent instead of
__package__. (Thanks Yair Frid.)
..
.. bpo: 40823
.. date: 2020-05-30-13-39-22
.. nonce: yB7K5w
.. section: Tests
Use :meth:`unittest.TestLoader().loadTestsFromTestCase` instead of
:meth:`unittest.makeSuite` in :mod:`sqlite3` tests. Patch by Erlend E.
Aasland.
..
.. bpo: 40810
.. date: 2020-05-30-10-56-38
.. nonce: LPqDLQ
.. section: Tests
In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite pre 3.7.15.
..
.. bpo: 43031
.. date: 2021-01-26-14-48-40
.. nonce: 44nK9U
.. section: Build
Pass ``--timeout=$(TESTTIMEOUT)`` option to the default profile task
``./python -m test --pgo`` command.
..
.. bpo: 36143
.. date: 2021-01-18-20-52-06
.. nonce: kgnIYo
.. section: Build
``make regen-all`` now also runs ``regen-keyword``. Patch by Victor Stinner.
..
.. bpo: 42874
.. date: 2021-01-12-10-06-50
.. nonce: XKK61g
.. section: Build
Removed the grep -q and -E flags in the tzpath validation section of the
configure script to better accommodate users of some platforms (specifically
Solaris 10).
..
.. bpo: 31904
.. date: 2021-01-11-23-26-00
.. nonce: ty8f3h
.. section: Build
Add library search path by wr-cc in add_cross_compiling_paths() for VxWorks.
..
.. bpo: 42856
.. date: 2021-01-07-12-51-38
.. nonce: n3cMHV
.. section: Build
Add ``--with-wheel-pkg-dir=PATH`` option to the ``./configure`` script. If
specified, the :mod:`ensurepip` module looks for ``setuptools`` and ``pip``
wheel packages in this directory: if both are present, these wheel packages
are used instead of ensurepip bundled wheel packages.
Some Linux distribution packaging policies recommend against bundling
dependencies. For example, Fedora installs wheel packages in the
``/usr/share/python-wheels/`` directory and don't install the
``ensurepip._bundled`` package.
..
.. bpo: 41837
.. date: 2021-01-05-20-36-40
.. nonce: bmS7vB
.. section: Windows
Updated Windows installer to include OpenSSL 1.1.1i
..
.. bpo: 42584
.. date: 2020-12-07-11-40-52
.. nonce: AsYnVX
.. section: Windows
Upgrade Windows installer to use SQLite 3.34.0.
..
.. bpo: 42504
.. date: 2021-01-26-14-36-11
.. nonce: ZxWt71
.. section: macOS
Ensure that the value of
sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') is always a string,
even in when the value is parsable as an integer.
..
.. bpo: 43008
.. date: 2021-01-26-18-12-17
.. nonce: mbQUc7
.. section: IDLE
Make IDLE invoke :func:`sys.excepthook` in normal, 2-process mode. Patch by
Ken Hilton.
..
.. bpo: 33065
.. date: 2021-01-10-01-25-43
.. nonce: zmyHYJ
.. section: IDLE
Fix problem debugging user classes with __repr__ method.
..
.. bpo: 23544
.. date: 2019-11-14-23-41-07
.. nonce: 3etemb
.. section: IDLE
Disable Debug=>Stack Viewer when user code is running or Debugger is active,
to prevent hang or crash. Patch by Zackery Spytz.
..
.. bpo: 32631
.. date: 2019-06-30-20-31-09
.. nonce: e7_4BG
.. section: IDLE
Finish zzdummy example extension module: make menu entries work; add
docstrings and tests with 100% coverage.
..
.. bpo: 42979
.. date: 2021-01-28-01-11-59
.. nonce: JrGkrm
.. section: C API
When Python is built in debug mode (with C assertions), calling a type slot
like ``sq_length`` (``__len__()`` in Python) now fails with a fatal error if
the slot succeeded with an exception set, or failed with no exception set.
The error message contains the slot, the type name, and the current
exception (if an exception is set). Patch by Victor Stinner.
..
.. bpo: 43030
.. date: 2021-01-27-10-27-47
.. nonce: loDcD_
.. section: C API
Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with
signed :c:type:`wchar_t`.