[Python-checkins] r63279 - in python/trunk: Lib/test/test_imgfile.py Lib/test/test_py3kwarn.py Misc/NEWS Modules/imgfile.c

brett.cannon python-checkins at python.org
Thu May 15 05:32:11 CEST 2008


Author: brett.cannon
Date: Thu May 15 05:32:11 2008
New Revision: 63279

Log:
Deprecate imgfile for removal in 3.0.

Modified:
   python/trunk/Lib/test/test_imgfile.py
   python/trunk/Lib/test/test_py3kwarn.py
   python/trunk/Misc/NEWS
   python/trunk/Modules/imgfile.c

Modified: python/trunk/Lib/test/test_imgfile.py
==============================================================================
--- python/trunk/Lib/test/test_imgfile.py	(original)
+++ python/trunk/Lib/test/test_imgfile.py	Thu May 15 05:32:11 2008
@@ -4,9 +4,10 @@
    Roger E. Masse
 """
 
-from test.test_support import verbose, unlink, findfile
+from test.test_support import verbose, unlink, findfile, import_module
 
-import imgfile, uu
+imgfile = import_module('imgfile', deprecated=True)
+import uu
 
 
 def testimage(name):

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 05:32:11 2008
@@ -134,7 +134,7 @@
     inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb',
                                      'cdplayer', 'CL', 'cl', 'DEVICE', 'GL',
                                      'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl',
-                                     'fm', 'GET', 'GLWS'),
+                                     'fm', 'GET', 'GLWS', 'imgfile'),
                           '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 05:32:11 2008
@@ -32,6 +32,8 @@
 Library
 -------
 
+- The imgfile module from IRIX has been deprecated for removal in Python 3.0.
+
 - The GLWS module from IRIX has been deprecated for removal in Python 3.0.
 
 - The GET module from IRIX has been deprecated for removal in Python 3.0.

Modified: python/trunk/Modules/imgfile.c
==============================================================================
--- python/trunk/Modules/imgfile.c	(original)
+++ python/trunk/Modules/imgfile.c	Thu May 15 05:32:11 2008
@@ -491,6 +491,11 @@
 initimgfile(void)
 {
 	PyObject *m, *d;
+	
+	if (PyErr_WarnPy3k("the imgfile module has been removed in "
+	                   "Python 3.0", 2) < 0)
+	    return;
+	
 	m = Py_InitModule("imgfile", imgfile_methods);
 	if (m == NULL)
 		return;


More information about the Python-checkins mailing list