]> granicus.if.org Git - python/commitdiff
make compiler's py3k warning a full deprecation warning #6837
authorBenjamin Peterson <benjamin@python.org>
Thu, 18 Mar 2010 23:12:43 +0000 (23:12 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 18 Mar 2010 23:12:43 +0000 (23:12 +0000)
Lib/compiler/__init__.py

index d75140aa72235ea85ab8a8d164fd305baa0e429f..2a6f64fa5092dce6221c3f6bdeebdfefbc2d3249 100644 (file)
@@ -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