]> granicus.if.org Git - python/commitdiff
Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for removal...
authorBrett Cannon <bcannon@gmail.com>
Thu, 15 May 2008 02:33:55 +0000 (02:33 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 15 May 2008 02:33:55 +0000 (02:33 +0000)
Lib/plat-irix5/DEVICE.py
Lib/plat-irix5/GL.py
Lib/plat-irix6/DEVICE.py
Lib/plat-irix6/GL.py
Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/cgen.py
Modules/glmodule.c

index 7ace8cb0b6c103e95fd8163dd01271f501059ea5..14fd5347b9689c2d54eae64ae0cd78e7153b6127 100755 (executable)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the DEVICE module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 NULLDEV = 0
 BUTOFFSET = 1
 VALOFFSET = 256
index 9f02f65f3a42fff72172e4bb62a664b93eff54d4..d0e0074755b06a3162fd44c1fa404c8cd89e1877 100755 (executable)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the GL module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 NULL = 0
 FALSE = 0
 TRUE = 1
index 7ace8cb0b6c103e95fd8163dd01271f501059ea5..14fd5347b9689c2d54eae64ae0cd78e7153b6127 100644 (file)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the DEVICE module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 NULLDEV = 0
 BUTOFFSET = 1
 VALOFFSET = 256
index 9f02f65f3a42fff72172e4bb62a664b93eff54d4..d0e0074755b06a3162fd44c1fa404c8cd89e1877 100644 (file)
@@ -1,3 +1,7 @@
+from warnings import warnpy3k
+warnpy3k("the GL module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
+
 NULL = 0
 FALSE = 0
 TRUE = 1
index e62228425a6984fdf363c08d813a646114e0a1c5..4a08c51df3c607a6de14d1e7ad5fa9d1b261a1ef 100644 (file)
@@ -132,7 +132,8 @@ class TestStdlibRemovals(unittest.TestCase):
                         'Bastion', 'compiler', 'dircache', 'fpformat',
                         'ihooks', 'mhlib')
     inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
-                                     'cdplayer', 'CL', 'cl'),
+                                     'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
+                                     'gl'),
                           'darwin' : ('autoGIL', 'Carbon', 'OSATerminology',
                                       'icglue', 'Nav', 'MacOS', 'aepack',
                                       'aetools', 'aetypes', 'applesingle',
index ebcaedab26b471e088ee94b477b46bf496dcaaf9..1ff52841986d84fdf18a7b8aa2dbe8760a5325c3 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -25,13 +25,16 @@ Core and Builtins
 Extension Modules
 -----------------
 
-- Support for Windows9x has been removed from the winsound module.
+- Support for Windows 9x has been removed from the winsound module.
 
 - bsddb module updated to version 4.6.4.
 
 Library
 -------
 
+- The DEVICE, GL, gl, and cgen modules (which indirectly includes cgensupport)
+  have been deprecated for removal in Python 3.0.
+
 - The ConfigParser module has been renamed 'configparser'.  The old
   name is now deprecated.
 
index f07d9843bd866a510ef7a48fc54006673d4ba5c8..c63962b11d87cebf36e5e1222f25011779d8f88e 100644 (file)
@@ -17,6 +17,9 @@
 #
 # XXX BUG return arrays generate wrong code
 # XXX need to change error returns into gotos to free mallocked arrays
+from warnings import warnpy3k
+warnpy3k("the cgen module has been removed in Python 3.0", stacklevel=2)
+del warnpy3k
 
 
 import string
index 65907047211e055f39b579338217cada4aaee022..01db9fcb289b96f2f11242cc4a6a36d341d98d92 100644 (file)
@@ -7624,5 +7624,10 @@ static struct PyMethodDef gl_methods[] = {
 void
 initgl(void)
 {
+    
+    if (PyErr_WarnPy3k("the gl module has been removed in "
+                       "Python 3.0", 2) < 0)
+        return;
+    
        (void) Py_InitModule("gl", gl_methods);
 }