summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-05-15 03:32:11 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-05-15 03:32:11 (GMT)
commit4652537ba4433e96a485c5ac9b855786c4a5eb04 (patch)
treebdd66ca61bf43bffcbf2287934daf27df3e95f83
parent707e384a7a42a90fd39754e89638ddadef722030 (diff)
downloadcpython-4652537ba4433e96a485c5ac9b855786c4a5eb04.zip
cpython-4652537ba4433e96a485c5ac9b855786c4a5eb04.tar.gz
cpython-4652537ba4433e96a485c5ac9b855786c4a5eb04.tar.bz2
Deprecate imgfile for removal in 3.0.
-rwxr-xr-xLib/test/test_imgfile.py5
-rw-r--r--Lib/test/test_py3kwarn.py2
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/imgfile.c5
4 files changed, 11 insertions, 3 deletions
diff --git a/Lib/test/test_imgfile.py b/Lib/test/test_imgfile.py
index ecc02ea..39e8917 100755
--- a/Lib/test/test_imgfile.py
+++ b/Lib/test/test_imgfile.py
@@ -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):
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index b7199a3..1d0c37f 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -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',
diff --git a/Misc/NEWS b/Misc/NEWS
index 3f7a6e0..0339353 100644
--- 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.
diff --git a/Modules/imgfile.c b/Modules/imgfile.c
index bb85a78..baa6ead 100644
--- a/Modules/imgfile.c
+++ b/Modules/imgfile.c
@@ -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;