diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-03-22 18:33:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-22 18:33:34 (GMT) |
commit | bace59d8b8e38f5c779ff6296ebdc0527f6db14a (patch) | |
tree | 81aa39edc1e15004da1d54507484609ab0745e22 /Doc/whatsnew | |
parent | 044cf94f610e831464a69a8e713dad89878824ce (diff) | |
download | cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.zip cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.gz cpython-bace59d8b8e38f5c779ff6296ebdc0527f6db14a.tar.bz2 |
bpo-39999: Improve compatibility of the ast module. (GH-19056)
* Re-add removed classes Suite, slice, Param, AugLoad and AugStore.
* Add docstrings for dummy classes.
* Add docstrings for attribute aliases.
* Set __module__ to "ast" instead of "_ast".
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.9.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index 9f9e895..b11c29b 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -593,12 +593,19 @@ Deprecated (Contributed by Victor Stinner in :issue:`39353`.) -* :mod:`ast` classes ``Index`` and ``ExtSlice`` are considered deprecated +* :mod:`ast` classes ``slice``, ``Index`` and ``ExtSlice`` are considered deprecated and will be removed in future Python versions. ``value`` itself should be used instead of ``Index(value)``. ``Tuple(slices, Load())`` should be used instead of ``ExtSlice(slices)``. (Contributed by Serhiy Storchaka in :issue:`32892`.) +* :mod:`ast` classes ``Suite``, ``Param``, ``AugLoad`` and ``AugStore`` + are considered deprecated and will be removed in future Python versions. + They were not generated by the parser and not accepted by the code + generator in Python 3. + (Contributed by Batuhan Taskaya in :issue:`39639` and :issue:`39969` + and Serhiy Storchaka in :issue:`39988`.) + * The :c:func:`PyEval_InitThreads` and :c:func:`PyEval_ThreadsInitialized` functions are now deprecated and will be removed in Python 3.11. Calling :c:func:`PyEval_InitThreads` now does nothing. The :term:`GIL` is initialized @@ -704,11 +711,6 @@ Removed defining ``COUNT_ALLOCS`` macro. (Contributed by Victor Stinner in :issue:`39489`.) -* The ``ast.Suite``, ``ast.Param``, ``ast.AugLoad`` and ``ast.AugStore`` - node classes have been removed due to no longer being needed. - (Contributed by Batuhan Taskaya in :issue:`39639` and :issue:`39969` - and Serhiy Storchaka in :issue:`39988`.) - Porting to Python 3.9 ===================== |