|
|
@ -81,13 +81,13 @@ Interpreter improvements:
|
|
|
|
* a number of Python builtins (range, tuple, set, frozenset, list, dict) are
|
|
|
|
* a number of Python builtins (range, tuple, set, frozenset, list, dict) are
|
|
|
|
now sped up using :pep:`590` vectorcall;
|
|
|
|
now sped up using :pep:`590` vectorcall;
|
|
|
|
* garbage collection does not block on resurrected objects;
|
|
|
|
* garbage collection does not block on resurrected objects;
|
|
|
|
* a number of Python modules (:mod:`_abc`, :mod:`!audioop`, :mod:`_bz2`,
|
|
|
|
* a number of Python modules (:mod:`!_abc`, :mod:`!audioop`, :mod:`!_bz2`,
|
|
|
|
:mod:`_codecs`, :mod:`_contextvars`, :mod:`!_crypt`, :mod:`_functools`,
|
|
|
|
:mod:`!_codecs`, :mod:`!_contextvars`, :mod:`!_crypt`, :mod:`!_functools`,
|
|
|
|
:mod:`_json`, :mod:`_locale`, :mod:`math`, :mod:`operator`, :mod:`resource`,
|
|
|
|
:mod:`!_json`, :mod:`!_locale`, :mod:`math`, :mod:`operator`, :mod:`resource`,
|
|
|
|
:mod:`time`, :mod:`_weakref`) now use multiphase initialization as defined
|
|
|
|
:mod:`time`, :mod:`!_weakref`) now use multiphase initialization as defined
|
|
|
|
by PEP 489;
|
|
|
|
by PEP 489;
|
|
|
|
* a number of standard library modules (:mod:`!audioop`, :mod:`ast`, :mod:`grp`,
|
|
|
|
* a number of standard library modules (:mod:`!audioop`, :mod:`ast`, :mod:`grp`,
|
|
|
|
:mod:`_hashlib`, :mod:`pwd`, :mod:`_posixsubprocess`, :mod:`random`,
|
|
|
|
:mod:`!_hashlib`, :mod:`pwd`, :mod:`!_posixsubprocess`, :mod:`random`,
|
|
|
|
:mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) are now using
|
|
|
|
:mod:`select`, :mod:`struct`, :mod:`termios`, :mod:`zlib`) are now using
|
|
|
|
the stable ABI defined by PEP 384.
|
|
|
|
the stable ABI defined by PEP 384.
|
|
|
|
|
|
|
|
|
|
|
@ -203,7 +203,7 @@ The :mod:`ast` module uses the new parser and produces the same AST as
|
|
|
|
the old parser.
|
|
|
|
the old parser.
|
|
|
|
|
|
|
|
|
|
|
|
In Python 3.10, the old parser will be deleted and so will all
|
|
|
|
In Python 3.10, the old parser will be deleted and so will all
|
|
|
|
functionality that depends on it (primarily the :mod:`parser` module,
|
|
|
|
functionality that depends on it (primarily the :mod:`!parser` module,
|
|
|
|
which has long been deprecated). In Python 3.9 *only*, you can switch
|
|
|
|
which has long been deprecated). In Python 3.9 *only*, you can switch
|
|
|
|
back to the LL(1) parser using a command line switch (``-X
|
|
|
|
back to the LL(1) parser using a command line switch (``-X
|
|
|
|
oldparser``) or an environment variable (``PYTHONOLDPARSER=1``).
|
|
|
|
oldparser``) or an environment variable (``PYTHONOLDPARSER=1``).
|
|
|
@ -366,7 +366,7 @@ wait until the cancellation is complete also in the case when *timeout* is
|
|
|
|
<= 0, like it does with positive timeouts.
|
|
|
|
<= 0, like it does with positive timeouts.
|
|
|
|
(Contributed by Elvis Pranskevichus in :issue:`32751`.)
|
|
|
|
(Contributed by Elvis Pranskevichus in :issue:`32751`.)
|
|
|
|
|
|
|
|
|
|
|
|
:mod:`asyncio` now raises :exc:`TyperError` when calling incompatible
|
|
|
|
:mod:`asyncio` now raises :exc:`TypeError` when calling incompatible
|
|
|
|
methods with an :class:`ssl.SSLSocket` socket.
|
|
|
|
methods with an :class:`ssl.SSLSocket` socket.
|
|
|
|
(Contributed by Ido Michael in :issue:`37404`.)
|
|
|
|
(Contributed by Ido Michael in :issue:`37404`.)
|
|
|
|
|
|
|
|
|
|
|
@ -589,7 +589,7 @@ a non-blocking socket. (Contributed by Donghee Na in :issue:`39259`.)
|
|
|
|
os
|
|
|
|
os
|
|
|
|
--
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
|
|
Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:`si_code`.
|
|
|
|
Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for :attr:`!si_code`.
|
|
|
|
(Contributed by Donghee Na in :issue:`38493`.)
|
|
|
|
(Contributed by Donghee Na in :issue:`38493`.)
|
|
|
|
|
|
|
|
|
|
|
|
Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and
|
|
|
|
Exposed the Linux-specific :func:`os.pidfd_open` (:issue:`38692`) and
|
|
|
@ -861,7 +861,7 @@ Deprecated
|
|
|
|
Python versions it will raise a :exc:`TypeError` for all floats.
|
|
|
|
Python versions it will raise a :exc:`TypeError` for all floats.
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`37315`.)
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`37315`.)
|
|
|
|
|
|
|
|
|
|
|
|
* The :mod:`parser` and :mod:`symbol` modules are deprecated and will be
|
|
|
|
* The :mod:`!parser` and :mod:`!symbol` modules are deprecated and will be
|
|
|
|
removed in future versions of Python. For the majority of use cases,
|
|
|
|
removed in future versions of Python. For the majority of use cases,
|
|
|
|
users can leverage the Abstract Syntax Tree (AST) generation and compilation
|
|
|
|
users can leverage the Abstract Syntax Tree (AST) generation and compilation
|
|
|
|
stage, using the :mod:`ast` module.
|
|
|
|
stage, using the :mod:`ast` module.
|
|
|
@ -889,7 +889,7 @@ Deprecated
|
|
|
|
it for writing and silencing a warning.
|
|
|
|
it for writing and silencing a warning.
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`28286`.)
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`28286`.)
|
|
|
|
|
|
|
|
|
|
|
|
* Deprecated the ``split()`` method of :class:`_tkinter.TkappType` in
|
|
|
|
* Deprecated the ``split()`` method of :class:`!_tkinter.TkappType` in
|
|
|
|
favour of the ``splitlist()`` method which has more consistent and
|
|
|
|
favour of the ``splitlist()`` method which has more consistent and
|
|
|
|
predicable behavior.
|
|
|
|
predicable behavior.
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`38371`.)
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`38371`.)
|
|
|
@ -898,11 +898,11 @@ Deprecated
|
|
|
|
deprecated and will be removed in version 3.11.
|
|
|
|
deprecated and will be removed in version 3.11.
|
|
|
|
(Contributed by Yury Selivanov and Kyle Stanley in :issue:`34790`.)
|
|
|
|
(Contributed by Yury Selivanov and Kyle Stanley in :issue:`34790`.)
|
|
|
|
|
|
|
|
|
|
|
|
* binhex4 and hexbin4 standards are now deprecated. The :mod:`binhex` module
|
|
|
|
* binhex4 and hexbin4 standards are now deprecated. The :mod:`!binhex` module
|
|
|
|
and the following :mod:`binascii` functions are now deprecated:
|
|
|
|
and the following :mod:`binascii` functions are now deprecated:
|
|
|
|
|
|
|
|
|
|
|
|
* :func:`~binascii.b2a_hqx`, :func:`~binascii.a2b_hqx`
|
|
|
|
* :func:`!b2a_hqx`, :func:`!a2b_hqx`
|
|
|
|
* :func:`~binascii.rlecode_hqx`, :func:`~binascii.rledecode_hqx`
|
|
|
|
* :func:`!rlecode_hqx`, :func:`!rledecode_hqx`
|
|
|
|
|
|
|
|
|
|
|
|
(Contributed by Victor Stinner in :issue:`39353`.)
|
|
|
|
(Contributed by Victor Stinner in :issue:`39353`.)
|
|
|
|
|
|
|
|
|
|
|
@ -950,7 +950,7 @@ Deprecated
|
|
|
|
Removed
|
|
|
|
Removed
|
|
|
|
=======
|
|
|
|
=======
|
|
|
|
|
|
|
|
|
|
|
|
* The erroneous version at :data:`unittest.mock.__version__` has been removed.
|
|
|
|
* The erroneous version at :data:`!unittest.mock.__version__` has been removed.
|
|
|
|
|
|
|
|
|
|
|
|
* :class:`!nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been removed.
|
|
|
|
* :class:`!nntplib.NNTP`: ``xpath()`` and ``xgtitle()`` methods have been removed.
|
|
|
|
These methods are deprecated since Python 3.3. Generally, these extensions
|
|
|
|
These methods are deprecated since Python 3.3. Generally, these extensions
|
|
|
@ -987,7 +987,7 @@ Removed
|
|
|
|
removed. They were deprecated since Python 3.7.
|
|
|
|
removed. They were deprecated since Python 3.7.
|
|
|
|
(Contributed by Victor Stinner in :issue:`37320`.)
|
|
|
|
(Contributed by Victor Stinner in :issue:`37320`.)
|
|
|
|
|
|
|
|
|
|
|
|
* The :meth:`~threading.Thread.isAlive()` method of :class:`threading.Thread`
|
|
|
|
* The :meth:`!isAlive()` method of :class:`threading.Thread`
|
|
|
|
has been removed. It was deprecated since Python 3.8.
|
|
|
|
has been removed. It was deprecated since Python 3.8.
|
|
|
|
Use :meth:`~threading.Thread.is_alive()` instead.
|
|
|
|
Use :meth:`~threading.Thread.is_alive()` instead.
|
|
|
|
(Contributed by Donghee Na in :issue:`37804`.)
|
|
|
|
(Contributed by Donghee Na in :issue:`37804`.)
|
|
|
@ -1035,7 +1035,7 @@ Removed
|
|
|
|
``asyncio.Condition`` and ``asyncio.Semaphore``.
|
|
|
|
``asyncio.Condition`` and ``asyncio.Semaphore``.
|
|
|
|
(Contributed by Andrew Svetlov in :issue:`34793`.)
|
|
|
|
(Contributed by Andrew Svetlov in :issue:`34793`.)
|
|
|
|
|
|
|
|
|
|
|
|
* The :func:`sys.getcounts` function, the ``-X showalloccount`` command line
|
|
|
|
* The :func:`!sys.getcounts` function, the ``-X showalloccount`` command line
|
|
|
|
option and the ``show_alloc_count`` field of the C structure
|
|
|
|
option and the ``show_alloc_count`` field of the C structure
|
|
|
|
:c:type:`PyConfig` have been removed. They required a special Python build by
|
|
|
|
:c:type:`PyConfig` have been removed. They required a special Python build by
|
|
|
|
defining ``COUNT_ALLOCS`` macro.
|
|
|
|
defining ``COUNT_ALLOCS`` macro.
|
|
|
@ -1046,11 +1046,11 @@ Removed
|
|
|
|
the ``__annotations__`` attribute instead.
|
|
|
|
the ``__annotations__`` attribute instead.
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`40182`.)
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`40182`.)
|
|
|
|
|
|
|
|
|
|
|
|
* The :meth:`symtable.SymbolTable.has_exec` method has been removed. It was
|
|
|
|
* The :meth:`!symtable.SymbolTable.has_exec` method has been removed. It was
|
|
|
|
deprecated since 2006, and only returning ``False`` when it's called.
|
|
|
|
deprecated since 2006, and only returning ``False`` when it's called.
|
|
|
|
(Contributed by Batuhan Taskaya in :issue:`40208`)
|
|
|
|
(Contributed by Batuhan Taskaya in :issue:`40208`)
|
|
|
|
|
|
|
|
|
|
|
|
* The :meth:`asyncio.Task.current_task` and :meth:`asyncio.Task.all_tasks`
|
|
|
|
* The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks`
|
|
|
|
have been removed. They were deprecated since Python 3.7 and you can use
|
|
|
|
have been removed. They were deprecated since Python 3.7 and you can use
|
|
|
|
:func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead.
|
|
|
|
:func:`asyncio.current_task` and :func:`asyncio.all_tasks` instead.
|
|
|
|
(Contributed by Rémi Lapeyre in :issue:`40967`)
|
|
|
|
(Contributed by Rémi Lapeyre in :issue:`40967`)
|
|
|
@ -1230,7 +1230,7 @@ Build Changes
|
|
|
|
* The ``COUNT_ALLOCS`` special build macro has been removed.
|
|
|
|
* The ``COUNT_ALLOCS`` special build macro has been removed.
|
|
|
|
(Contributed by Victor Stinner in :issue:`39489`.)
|
|
|
|
(Contributed by Victor Stinner in :issue:`39489`.)
|
|
|
|
|
|
|
|
|
|
|
|
* On non-Windows platforms, the :c:func:`setenv` and :c:func:`unsetenv`
|
|
|
|
* On non-Windows platforms, the :c:func:`!setenv` and :c:func:`!unsetenv`
|
|
|
|
functions are now required to build Python.
|
|
|
|
functions are now required to build Python.
|
|
|
|
(Contributed by Victor Stinner in :issue:`39395`.)
|
|
|
|
(Contributed by Victor Stinner in :issue:`39395`.)
|
|
|
|
|
|
|
|
|
|
|
@ -1319,7 +1319,7 @@ New Features
|
|
|
|
the garbage collector respectively.
|
|
|
|
the garbage collector respectively.
|
|
|
|
(Contributed by Pablo Galindo Salgado in :issue:`40241`.)
|
|
|
|
(Contributed by Pablo Galindo Salgado in :issue:`40241`.)
|
|
|
|
|
|
|
|
|
|
|
|
* Added :c:func:`_PyObject_FunctionStr` to get a user-friendly string
|
|
|
|
* Added :c:func:`!_PyObject_FunctionStr` to get a user-friendly string
|
|
|
|
representation of a function-like object.
|
|
|
|
representation of a function-like object.
|
|
|
|
(Patch by Jeroen Demeyer in :issue:`37645`.)
|
|
|
|
(Patch by Jeroen Demeyer in :issue:`37645`.)
|
|
|
|
|
|
|
|
|
|
|
@ -1361,7 +1361,7 @@ Porting to Python 3.9
|
|
|
|
and refers to a constant string.
|
|
|
|
and refers to a constant string.
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`38650`.)
|
|
|
|
(Contributed by Serhiy Storchaka in :issue:`38650`.)
|
|
|
|
|
|
|
|
|
|
|
|
* The :c:type:`PyGC_Head` structure is now opaque. It is only defined in the
|
|
|
|
* The :c:type:`!PyGC_Head` structure is now opaque. It is only defined in the
|
|
|
|
internal C API (``pycore_gc.h``).
|
|
|
|
internal C API (``pycore_gc.h``).
|
|
|
|
(Contributed by Victor Stinner in :issue:`40241`.)
|
|
|
|
(Contributed by Victor Stinner in :issue:`40241`.)
|
|
|
|
|
|
|
|
|
|
|
@ -1384,12 +1384,12 @@ Porting to Python 3.9
|
|
|
|
|
|
|
|
|
|
|
|
* :c:func:`PyObject_IS_GC` macro was converted to a function.
|
|
|
|
* :c:func:`PyObject_IS_GC` macro was converted to a function.
|
|
|
|
|
|
|
|
|
|
|
|
* The :c:func:`PyObject_NEW` macro becomes an alias to the
|
|
|
|
* The :c:func:`!PyObject_NEW` macro becomes an alias to the
|
|
|
|
:c:macro:`PyObject_New` macro, and the :c:func:`PyObject_NEW_VAR` macro
|
|
|
|
:c:macro:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro
|
|
|
|
becomes an alias to the :c:macro:`PyObject_NewVar` macro. They no longer
|
|
|
|
becomes an alias to the :c:macro:`PyObject_NewVar` macro. They no longer
|
|
|
|
access directly the :c:member:`PyTypeObject.tp_basicsize` member.
|
|
|
|
access directly the :c:member:`PyTypeObject.tp_basicsize` member.
|
|
|
|
|
|
|
|
|
|
|
|
* :c:func:`PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function:
|
|
|
|
* :c:func:`!PyObject_GET_WEAKREFS_LISTPTR` macro was converted to a function:
|
|
|
|
the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset`
|
|
|
|
the macro accessed directly the :c:member:`PyTypeObject.tp_weaklistoffset`
|
|
|
|
member.
|
|
|
|
member.
|
|
|
|
|
|
|
|
|
|
|
|