Deprecate CL, CL_old, and cl for 3.0.

This commit is contained in:
Brett Cannon 2008-05-14 21:12:12 +00:00
parent 54c77aa459
commit 650f5161f4
6 changed files with 21 additions and 2 deletions

View file

@ -1,5 +1,9 @@
# Backward compatible module CL. # Backward compatible module CL.
# All relevant symbols are now defined in the module cl. # All relevant symbols are now defined in the module cl.
from warnings import warnpy3k
warnpy3k("the CL module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
try: try:
from cl import * from cl import *
except ImportError: except ImportError:

View file

@ -8,6 +8,10 @@
# #
# originalFormat parameter values # originalFormat parameter values
# #
from warnings import warnpy3k
warnpy3k("the CL_old module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
MAX_NUMBER_OF_ORIGINAL_FORMATS = 32 MAX_NUMBER_OF_ORIGINAL_FORMATS = 32
# Audio # Audio

View file

@ -1,5 +1,9 @@
# Backward compatible module CL. # Backward compatible module CL.
# All relevant symbols are now defined in the module cl. # All relevant symbols are now defined in the module cl.
from warnings import warnpy3k
warnpy3k("the CL module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
try: try:
from cl import * from cl import *
except ImportError: except ImportError:

View file

@ -132,7 +132,7 @@ class TestStdlibRemovals(unittest.TestCase):
'Bastion', 'compiler', 'dircache', 'fpformat', 'Bastion', 'compiler', 'dircache', 'fpformat',
'ihooks', 'mhlib') 'ihooks', 'mhlib')
inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb', inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
'cdplayer'), 'cdplayer', 'CL', 'cl'),
'darwin' : ('autoGIL', 'Carbon', 'OSATerminology', 'darwin' : ('autoGIL', 'Carbon', 'OSATerminology',
'icglue', 'Nav', 'MacOS', 'aepack', 'icglue', 'Nav', 'MacOS', 'aepack',
'aetools', 'aetypes', 'applesingle', 'aetools', 'aetypes', 'applesingle',

View file

@ -32,6 +32,9 @@ Extension Modules
Library Library
------- -------
- The CL, CL_old, and cl modules for IRIX have been deprecated for removal in
Python 3.0.
- The cdplayer module for IRIX has been deprecated for removal in Python 3.0. - The cdplayer module for IRIX has been deprecated for removal in Python 3.0.
- The cddb module for IRIX has been deprecated for removal in Python 3.0. - The cddb module for IRIX has been deprecated for removal in Python 3.0.

View file

@ -961,7 +961,11 @@ void
initcl(void) initcl(void)
{ {
PyObject *m, *d, *x; PyObject *m, *d, *x;
if (PyErr_WarnPy3k("the cl module has been removed in "
"Python 3.0", 2) < 0)
return;
m = Py_InitModule("cl", cl_methods); m = Py_InitModule("cl", cl_methods);
if (m == NULL) if (m == NULL)
return; return;