Index: Misc/NEWS =================================================================== --- Misc/NEWS (revisão 63016) +++ Misc/NEWS (cópia de trabalho) @@ -23,6 +23,8 @@ Library ------- +- The symtable/_symtable modules has been deprecated for removal in Python 3.0. + - The fpformat module has been deprecated for removal in Python 3.0. - The dl module has been deprecated for removal in Python 3.0. Index: Lib/symtable.py =================================================================== --- Lib/symtable.py (revisão 63016) +++ 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 63016) +++ 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 63016) +++ 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', 'dircache', 'fpformat') + 'Bastion', 'compiler', 'dircache', 'fpformat', 'symtable', '_symtable') inclusive_platforms = {'irix':('pure',)} # XXX Don't know if lib-tk is only installed if _tkinter is built. optional_modules = ('bsddb185', 'Canvas', 'dl') Index: Modules/symtablemodule.c =================================================================== --- Modules/symtablemodule.c (revisão 63016) +++ Modules/symtablemodule.c (cópia de trabalho) @@ -8,6 +8,7 @@ static PyObject * symtable_symtable(PyObject *self, PyObject *args) { + struct symtable *st; PyObject *t; @@ -51,6 +52,10 @@ init_symtable(void) { PyObject *m; + + if (PyErr_WarnPy3k("the symtable module has been removed in " + "Python 3.0", 2) < 0) + return; m = Py_InitModule("_symtable", symtable_methods); if (m == NULL)