[Python-checkins] r79078 - python/trunk/Lib/compiler/__init__.py
benjamin.peterson
python-checkins at python.org
Fri Mar 19 00:12:43 CET 2010
Author: benjamin.peterson
Date: Fri Mar 19 00:12:43 2010
New Revision: 79078
Log:
make compiler's py3k warning a full deprecation warning #6837
Modified:
python/trunk/Lib/compiler/__init__.py
Modified: python/trunk/Lib/compiler/__init__.py
==============================================================================
--- python/trunk/Lib/compiler/__init__.py (original)
+++ python/trunk/Lib/compiler/__init__.py Fri Mar 19 00:12:43 2010
@@ -20,9 +20,11 @@
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
More information about the Python-checkins
mailing list