]> granicus.if.org Git - python/commitdiff
The CD and cd modules for IRIX are deprecated for 3.0.
authorBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 20:31:38 +0000 (20:31 +0000)
committerBrett Cannon <bcannon@gmail.com>
Wed, 14 May 2008 20:31:38 +0000 (20:31 +0000)
Lib/plat-irix5/CD.py
Lib/plat-irix6/CD.py
Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/cdmodule.c

index 8c1e03bc6ee091f911da10aeed0f0822c2a98a01..5398f4656cda25a726d7416885466d8445559dbb 100755 (executable)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the CD module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 ERROR           = 0
 NODISC          = 1
 READY           = 2
index 8c1e03bc6ee091f911da10aeed0f0822c2a98a01..5398f4656cda25a726d7416885466d8445559dbb 100644 (file)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the CD module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 ERROR           = 0
 NODISC          = 1
 READY           = 2
index 4dfc84257816483580a42f34d4590959bf905357..439a58ca3bf08c89ddb7ae925e818da1ac43df22 100644 (file)
@@ -131,7 +131,7 @@ class TestStdlibRemovals(unittest.TestCase):
     all_platforms = ('audiodev', 'imputil', 'mutex', 'user', 'new', 'rexec',
                         'Bastion', 'compiler', 'dircache', 'fpformat',
                         'ihooks', 'mhlib')
-    inclusive_platforms = {'irix' : ('pure', 'AL', 'al'),
+    inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd'),
                           'darwin' : ('autoGIL', 'Carbon', 'OSATerminology',
                                       'icglue', 'Nav', 'MacOS', 'aepack',
                                       'aetools', 'aetypes', 'applesingle',
index 4f0f06a3ed58176a6e68eb5df251dc75e1d6bb4a..ca667fbbd081e2accbf63707d4b6f9aa3b2ed574 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,9 @@ Extension Modules
 Library
 -------
 
+- The cd and CD modules for IRIX have been deprecated for removal in
+  Python 3.0.
+
 - The al and AL modules for IRIX have been deprecated for removal in
   Python 3.0.
 
index f8efd395a19af167795d5749dfdbc2a8d3805798..f09b0a4adf7afc58f060844ad13c8ff31ac8fa20 100644 (file)
@@ -758,6 +758,10 @@ void
 initcd(void)
 {
        PyObject *m, *d;
+       
+       if (PyErr_WarnPy3k("the cd module has been removed in "
+                          "Python 3.0", 2) < 0)
+           return;
 
        m = Py_InitModule("cd", CD_methods);
        if (m == NULL)