Index: Python/symtable.c =================================================================== --- Python/symtable.c (revisão 62993) +++ Python/symtable.c (cópia de trabalho) @@ -188,6 +188,11 @@ static struct symtable * symtable_new(void) { + + if (PyErr_WarnPy3k("the _symtable module has been removed in " + "Python 3.0", 2) < 0) + return NULL; + struct symtable *st; st = (struct symtable *)PyMem_Malloc(sizeof(struct symtable)); Index: Misc/NEWS =================================================================== --- Misc/NEWS (revisão 62993) +++ Misc/NEWS (cópia de trabalho) @@ -23,6 +23,8 @@ Library ------- +- The symtable module has been deprecated for removal in Python 3.0. + - The Canvas module has been deprecated for removal in Python 3.0. - The compiler package has been deprecated for removal in Python 3.0. Index: Lib/symtable.py =================================================================== --- Lib/symtable.py (revisão 62993) +++ Lib/symtable.py (cópia de trabalho) @@ -1,4 +1,8 @@ """Interface to the compiler's internal symbol tables""" +from warnings import warnpy3k +warnpy3k("the symtable module has been removed in Python 3.0", + stacklevel=2) +del warnpy3k import _symtable from _symtable import USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, \ Index: Lib/test/test_symtable.py =================================================================== --- Lib/test/test_symtable.py (revisão 62993) +++ Lib/test/test_symtable.py (cópia de trabalho) @@ -1,6 +1,6 @@ from test import test_support -import symtable +symtable = test_support.import_module('symtable', deprecated=True) import unittest Index: Lib/test/test_py3kwarn.py =================================================================== --- Lib/test/test_py3kwarn.py (revisão 62993) +++ Lib/test/test_py3kwarn.py (cópia de trabalho) @@ -129,7 +129,7 @@ # test.testall not tested as it executes all unit tests as an # import side-effect. all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec', - 'Bastion', 'compiler') + 'Bastion', 'compiler', 'symtable') inclusive_platforms = {'irix':('pure',)} # XXX Don't know if lib-tk is only installed if _tkinter is built. optional_modules = ('bsddb185', 'Canvas')