bpo-40759: Deprecate the symbol module (GH-20364)


Automerge-Triggered-By: @pablogsal
(cherry picked from commit cf88871d6a9c12e7b7e5f4d65abc2ec6e2fe952e)

Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
diff --git a/Lib/symbol.py b/Lib/symbol.py
index 36e0eec..aaac8c9 100644
--- a/Lib/symbol.py
+++ b/Lib/symbol.py
@@ -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