summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-14 21:12:12 +0000
committerBrett Cannon <bcannon@gmail.com>2008-05-14 21:12:12 +0000
commit577517bde98bf90172314b16512e83c9a5aeee75 (patch)
treec72486e416b32cd110343fe776c3832c94cb3d0b
parentbfacf6c1f069fdf3626a1dafa8f758adc013bede (diff)
downloadcpython-577517bde98bf90172314b16512e83c9a5aeee75.tar.gz
Deprecate CL, CL_old, and cl for 3.0.
-rwxr-xr-xLib/plat-irix5/CL.py4
-rwxr-xr-xLib/plat-irix5/CL_old.py4
-rw-r--r--Lib/plat-irix6/CL.py4
-rw-r--r--Lib/test/test_py3kwarn.py2
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/clmodule.c6
6 files changed, 21 insertions, 2 deletions
diff --git a/Lib/plat-irix5/CL.py b/Lib/plat-irix5/CL.py
index 23259c5548..15130e4306 100755
--- a/Lib/plat-irix5/CL.py
+++ b/Lib/plat-irix5/CL.py
@@ -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:
diff --git a/Lib/plat-irix5/CL_old.py b/Lib/plat-irix5/CL_old.py
index 967b49708c..892f86c011 100755
--- a/Lib/plat-irix5/CL_old.py
+++ b/Lib/plat-irix5/CL_old.py
@@ -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
diff --git a/Lib/plat-irix6/CL.py b/Lib/plat-irix6/CL.py
index 23259c5548..15130e4306 100644
--- a/Lib/plat-irix6/CL.py
+++ b/Lib/plat-irix6/CL.py
@@ -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:
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 2b9eac43e4..78dd53d857 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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',
diff --git a/Misc/NEWS b/Misc/NEWS
index 659cf72316..71d34cdc75 100644
--- 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.
diff --git a/Modules/clmodule.c b/Modules/clmodule.c
index a535e031f5..d3e0edf3e5 100644
--- a/Modules/clmodule.c
+++ b/Modules/clmodule.c
@@ -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;