Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 Doc/library/symbol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
versions.

.. warning::

The symbol module is deprecated and will be removed in future versions of
Python.

This module also provides one additional data object:


Expand Down
7 changes: 4 additions & 3 deletions 7 Doc/whatsnew/3.9.rst
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,10 @@ Deprecated
Python versions it will raise a :exc:`TypeError` for all floats.
(Contributed by Serhiy Storchaka in :issue:`37315`.)

* The :mod:`parser` module is deprecated and will be removed in future versions
of Python. For the majority of use cases, users can leverage the Abstract Syntax
Tree (AST) generation and compilation stage, using the :mod:`ast` module.
* The :mod:`parser` and :mod:`symbol` modules are deprecated and will be
removed in future versions of Python. For the majority of use cases,
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,
as it is almost exclusively the result of incorrect rich comparator
Expand Down
9 changes: 9 additions & 0 deletions 9 Lib/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
#
# 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--
single_input = 256
file_input = 257
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate the :mod:`symbol` module.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.