Deprecate the compiler package for removal in 3.0.

This commit is contained in:
Brett Cannon 2008-05-10 02:58:26 +00:00
parent af87804831
commit 6192df10b6
4 changed files with 11 additions and 2 deletions

View File

@ -5,6 +5,9 @@
Python compiler package Python compiler package
*********************** ***********************
.. deprecated:: 2.6
The compiler package has been removed in Python 3.0.
.. sectionauthor:: Jeremy Hylton <jeremy@zope.com> .. sectionauthor:: Jeremy Hylton <jeremy@zope.com>
@ -34,6 +37,7 @@ The basic interface
.. module:: compiler .. module:: compiler
:synopsis: Python code compiler written in Python. :synopsis: Python code compiler written in Python.
:deprecated:
The top-level of the package defines four functions. If you import The top-level of the package defines four functions. If you import

View File

@ -20,6 +20,9 @@ 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)
del warnpy3k
from compiler.transformer import parse, parseFile from compiler.transformer import parse, parseFile
from compiler.visitor import walk from compiler.visitor import walk

View File

@ -1,7 +1,7 @@
import compiler import test.test_support
compiler = test.test_support.import_module('compiler', deprecated=True)
from compiler.ast import flatten from compiler.ast import flatten
import os, sys, time, unittest import os, sys, time, unittest
import test.test_support
from random import random from random import random
from StringIO import StringIO from StringIO import StringIO

View File

@ -23,6 +23,8 @@ Extension Modules
Library Library
------- -------
- The compiler package has been deprecated for removal in Python 3.0.
- The Bastion and rexec modules have been deprecated for removal in Python 3.0. - The Bastion and rexec modules have been deprecated for removal in Python 3.0.
- The bsddb185 module has been deprecated for removal in Python 3.0. - The bsddb185 module has been deprecated for removal in Python 3.0.