summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-03-18 23:12:43 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-03-18 23:12:43 (GMT)
commit52d4aeac86a89789497b18cc7f2f566007c71728 (patch)
tree290deec1abd8a6b74993562dbcd1f2fc54eb20d9
parentd8fdd7e0abbccb8eef9fc521850189a161120e2a (diff)
downloadcpython-52d4aeac86a89789497b18cc7f2f566007c71728.zip
cpython-52d4aeac86a89789497b18cc7f2f566007c71728.tar.gz
cpython-52d4aeac86a89789497b18cc7f2f566007c71728.tar.bz2
make compiler's py3k warning a full deprecation warning #6837
-rw-r--r--Lib/compiler/__init__.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/compiler/__init__.py b/Lib/compiler/__init__.py
index d75140a..2a6f64f 100644
--- a/Lib/compiler/__init__.py
+++ b/Lib/compiler/__init__.py
@@ -20,9 +20,11 @@ compile(source, filename, mode, flags=None, dont_inherit=None)
compileFile(filename)
Generates a .pyc file by compiling filename.
"""
-from warnings import warnpy3k
-warnpy3k("the compiler package has been removed in Python 3.0", stacklevel=2)
-del warnpy3k
+
+import warnings
+
+warnings.warn("The compiler package is deprecated and removed in Python 3.x.",
+ DeprecationWarning, stacklevel=2)
from compiler.transformer import parse, parseFile
from compiler.visitor import walk