]> granicus.if.org Git - python/commitdiff
Deprecate CL, CL_old, and cl for 3.0.
authorBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 21:12:12 +0000 (21:12 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 21:12:12 +0000 (21:12 +0000)
Lib/plat-irix5/CL.py
Lib/plat-irix5/CL_old.py
Lib/plat-irix6/CL.py
Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/clmodule.c

index 23259c5548904a01b5628582055f7c749a807f80..15130e4306eaa9786e85e7568473fe0d3832bd9c 100755 (executable)
@@ -1,5 +1,9 @@
 # Backward compatible 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:
     from cl import *
 except ImportError:
index 967b49708c895efa1ab3c84a90541c84e2c42101..892f86c0114c5a9f92e0bb73666dc719f34d5ee2 100755 (executable)
@@ -8,6 +8,10 @@
 #
 # 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
 
 # Audio
index 23259c5548904a01b5628582055f7c749a807f80..15130e4306eaa9786e85e7568473fe0d3832bd9c 100644 (file)
@@ -1,5 +1,9 @@
 # Backward compatible 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:
     from cl import *
 except ImportError:
index 2b9eac43e4bef48f35e30d02c103d2bf92db7dc8..78dd53d85770e21a71f1c7c6bba0233606a0ac07 100644 (file)
@@ -132,7 +132,7 @@ class TestStdlibRemovals(unittest.TestCase):
                         'Bastion', 'compiler', 'dircache', 'fpformat',
                         'ihooks', 'mhlib')
     inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
-                                     'cdplayer'),
+                                     'cdplayer', 'CL', 'cl'),
                           'darwin' : ('autoGIL', 'Carbon', 'OSATerminology',
                                       'icglue', 'Nav', 'MacOS', 'aepack',
                                       'aetools', 'aetypes', 'applesingle',
index 659cf72316a6fea24eb94190b26c4dfaebefb299..71d34cdc75b7c2c8cdecfe61784df46ba766d253 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,9 @@ Extension Modules
 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 cddb module for IRIX has been deprecated for removal in Python 3.0.
index a535e031f530ae92f73445918d73e65386310658..d3e0edf3e5b14ea80b74e06ed100e90d9317bd4c 100644 (file)
@@ -961,7 +961,11 @@ void
 initcl(void)
 {
        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);
        if (m == NULL)
                return;