]> granicus.if.org Git - python/commitdiff
Deprecate imgfile for removal in 3.0.
authorBrett Cannon <bcannon@gmail.com>
Thu, 15 May 2008 03:32:11 +0000 (03:32 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 15 May 2008 03:32:11 +0000 (03:32 +0000)
Lib/test/test_imgfile.py
Lib/test/test_py3kwarn.py
Misc/NEWS
Modules/imgfile.c

index ecc02ea67ae1a8090dcda6c0e9257760888471f2..39e891769d121b533f0d24842b30367a35ef3f0a 100755 (executable)
@@ -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):
index b7199a3c30e6a310cd70c1157cd5a589ceab3c72..1d0c37fad7a1e5b0cf0562f40e56f77db5682eea 100644 (file)
@@ -134,7 +134,7 @@ class TestStdlibRemovals(unittest.TestCase):
     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',
index 3f7a6e008a396d3d99bb1bc9026d096ed526b68e..0339353c4c28d68b5a82478956056a48a54f02a7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,8 @@ Extension Modules
 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.
index bb85a78d5c295d761191757b8c202a835933ffb6..baa6eadb4a7b69b295163a99018970191b5704ab 100644 (file)
@@ -491,6 +491,11 @@ void
 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;