make compiler's py3k warning a full deprecation warning #6837

This commit is contained in:
Benjamin Peterson 2010-03-18 23:12:43 +00:00
parent d8fdd7e0ab
commit 52d4aeac86
1 changed files with 5 additions and 3 deletions

View File

@ -20,9 +20,11 @@ compile(source, filename, mode, flags=None, dont_inherit=None)
compileFile(filename) compileFile(filename)
Generates a .pyc file by compiling 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) import warnings
del warnpy3k
warnings.warn("The compiler package is deprecated and removed in Python 3.x.",
DeprecationWarning, stacklevel=2)
from compiler.transformer import parse, parseFile from compiler.transformer import parse, parseFile
from compiler.visitor import walk from compiler.visitor import walk