diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-05-14 20:31:38 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-05-14 20:31:38 +0000 |
commit | ddf949f19432ef22b7b42a7054412f83985ff77f (patch) | |
tree | 85de65116c63a2292e3c93984ed7e1a38e1bbab1 | |
parent | 0b6b5236ff47cc5cd87eae52d8a881a91e73e902 (diff) | |
download | cpython-git-ddf949f19432ef22b7b42a7054412f83985ff77f.tar.gz |
The CD and cd modules for IRIX are deprecated for 3.0.
-rwxr-xr-x | Lib/plat-irix5/CD.py | 4 | ||||
-rw-r--r-- | Lib/plat-irix6/CD.py | 4 | ||||
-rw-r--r-- | Lib/test/test_py3kwarn.py | 2 | ||||
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Modules/cdmodule.c | 4 |
5 files changed, 16 insertions, 1 deletions
diff --git a/Lib/plat-irix5/CD.py b/Lib/plat-irix5/CD.py index 8c1e03bc6e..5398f4656c 100755 --- a/Lib/plat-irix5/CD.py +++ b/Lib/plat-irix5/CD.py @@ -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 diff --git a/Lib/plat-irix6/CD.py b/Lib/plat-irix6/CD.py index 8c1e03bc6e..5398f4656c 100644 --- a/Lib/plat-irix6/CD.py +++ b/Lib/plat-irix6/CD.py @@ -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 diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index 4dfc842578..439a58ca3b 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -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', @@ -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. diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c index f8efd395a1..f09b0a4adf 100644 --- a/Modules/cdmodule.c +++ b/Modules/cdmodule.c @@ -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) |