mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-40759: Deprecate the symbol module (GH-20364)
Automerge-Triggered-By: @pablogsal
This commit is contained in:
parent
b7d79b4f36
commit
cf88871d6a
4 changed files with 19 additions and 3 deletions
|
@ -17,6 +17,11 @@ the definitions of the names in the context of the language grammar. The
|
||||||
specific numeric values which the names map to may change between Python
|
specific numeric values which the names map to may change between Python
|
||||||
versions.
|
versions.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
The symbol module is deprecated and will be removed in future versions of
|
||||||
|
Python.
|
||||||
|
|
||||||
This module also provides one additional data object:
|
This module also provides one additional data object:
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -692,9 +692,10 @@ 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` module is deprecated and will be removed in future versions
|
* The :mod:`parser` and :mod:`symbol` modules are deprecated and will be
|
||||||
of Python. For the majority of use cases, users can leverage the Abstract Syntax
|
removed in future versions of Python. For the majority of use cases,
|
||||||
Tree (AST) generation and compilation stage, using the :mod:`ast` module.
|
users can leverage the Abstract Syntax Tree (AST) generation and compilation
|
||||||
|
stage, using the :mod:`ast` module.
|
||||||
|
|
||||||
* Using :data:`NotImplemented` in a boolean context has been deprecated,
|
* Using :data:`NotImplemented` in a boolean context has been deprecated,
|
||||||
as it is almost exclusively the result of incorrect rich comparator
|
as it is almost exclusively the result of incorrect rich comparator
|
||||||
|
|
|
@ -11,6 +11,15 @@
|
||||||
#
|
#
|
||||||
# make regen-symbol
|
# make regen-symbol
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
warnings.warn(
|
||||||
|
"The symbol module is deprecated and will be removed "
|
||||||
|
"in future versions of Python",
|
||||||
|
DeprecationWarning,
|
||||||
|
stacklevel=2,
|
||||||
|
)
|
||||||
|
|
||||||
#--start constants--
|
#--start constants--
|
||||||
single_input = 256
|
single_input = 256
|
||||||
file_input = 257
|
file_input = 257
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Deprecate the :mod:`symbol` module.
|
Loading…
Add table
Add a link
Reference in a new issue