[Python-checkins] r63260 - in python/trunk: 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

brett.cannon python-checkins at python.org
Thu May 15 04:33:56 CEST 2008


Author: brett.cannon
Date: Thu May 15 04:33:55 2008
New Revision: 63260

Log:
Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for removal in 3.0.

Modified:
   python/trunk/Lib/plat-irix5/DEVICE.py
   python/trunk/Lib/plat-irix5/GL.py
   python/trunk/Lib/plat-irix6/DEVICE.py
   python/trunk/Lib/plat-irix6/GL.py
   python/trunk/Lib/test/test_py3kwarn.py
   python/trunk/Misc/NEWS
   python/trunk/Modules/cgen.py
   python/trunk/Modules/glmodule.c

Modified: python/trunk/Lib/plat-irix5/DEVICE.py
==============================================================================
--- python/trunk/Lib/plat-irix5/DEVICE.py	(original)
+++ python/trunk/Lib/plat-irix5/DEVICE.py	Thu May 15 04:33:55 2008
@@ -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

Modified: python/trunk/Lib/plat-irix5/GL.py
==============================================================================
--- python/trunk/Lib/plat-irix5/GL.py	(original)
+++ python/trunk/Lib/plat-irix5/GL.py	Thu May 15 04:33:55 2008
@@ -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

Modified: python/trunk/Lib/plat-irix6/DEVICE.py
==============================================================================
--- python/trunk/Lib/plat-irix6/DEVICE.py	(original)
+++ python/trunk/Lib/plat-irix6/DEVICE.py	Thu May 15 04:33:55 2008
@@ -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

Modified: python/trunk/Lib/plat-irix6/GL.py
==============================================================================
--- python/trunk/Lib/plat-irix6/GL.py	(original)
+++ python/trunk/Lib/plat-irix6/GL.py	Thu May 15 04:33:55 2008
@@ -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

Modified: python/trunk/Lib/test/test_py3kwarn.py
==============================================================================
--- python/trunk/Lib/test/test_py3kwarn.py	(original)
+++ python/trunk/Lib/test/test_py3kwarn.py	Thu May 15 04:33:55 2008
@@ -132,7 +132,8 @@
                         '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',

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Thu May 15 04:33:55 2008
@@ -25,13 +25,16 @@
 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.
 

Modified: python/trunk/Modules/cgen.py
==============================================================================
--- python/trunk/Modules/cgen.py	(original)
+++ python/trunk/Modules/cgen.py	Thu May 15 04:33:55 2008
@@ -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

Modified: python/trunk/Modules/glmodule.c
==============================================================================
--- python/trunk/Modules/glmodule.c	(original)
+++ python/trunk/Modules/glmodule.c	Thu May 15 04:33:55 2008
@@ -7624,5 +7624,10 @@
 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);
 }


More information about the Python-checkins mailing list