diff --git a/Lib/plat-irix5/FL.py b/Lib/plat-irix5/FL.py index 727da4c9a00..d1b3be1ef37 100755 --- a/Lib/plat-irix5/FL.py +++ b/Lib/plat-irix5/FL.py @@ -2,6 +2,9 @@ # This corresponds to "forms.h". # Recommended use: import FL; ... FL.NORMAL_BOX ... etc. # Alternate use: from FL import *; ... NORMAL_BOX ... etc. +from warnings import warnpy3k +warnpy3k("the FL module has been removed in Python 3.0", stacklevel=2) +del warnpy3k _v20 = 1 _v21 = 1 diff --git a/Lib/plat-irix5/flp.py b/Lib/plat-irix5/flp.py index 4f9175f5fdb..13c926f3ad7 100755 --- a/Lib/plat-irix5/flp.py +++ b/Lib/plat-irix5/flp.py @@ -3,6 +3,10 @@ # # Jack Jansen, December 1991 # +from warnings import warnpy3k +warnpy3k("the flp module has been removed in Python 3.0", stacklevel=2) +del warnpy3k + import string import os import sys diff --git a/Lib/plat-irix6/FL.py b/Lib/plat-irix6/FL.py index 727da4c9a00..d1b3be1ef37 100644 --- a/Lib/plat-irix6/FL.py +++ b/Lib/plat-irix6/FL.py @@ -2,6 +2,9 @@ # This corresponds to "forms.h". # Recommended use: import FL; ... FL.NORMAL_BOX ... etc. # Alternate use: from FL import *; ... NORMAL_BOX ... etc. +from warnings import warnpy3k +warnpy3k("the FL module has been removed in Python 3.0", stacklevel=2) +del warnpy3k _v20 = 1 _v21 = 1 diff --git a/Lib/plat-irix6/flp.py b/Lib/plat-irix6/flp.py index f745472a70d..32e8b9d27df 100644 --- a/Lib/plat-irix6/flp.py +++ b/Lib/plat-irix6/flp.py @@ -3,6 +3,10 @@ # # Jack Jansen, December 1991 # +from warnings import warnpy3k +warnpy3k("the flp module has been removed in Python 3.0", stacklevel=2) +del warnpy3k + import os import sys import FL diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py index 8c84a112152..f3522bbbaf6 100644 --- a/Lib/test/test_py3kwarn.py +++ b/Lib/test/test_py3kwarn.py @@ -133,7 +133,7 @@ class TestStdlibRemovals(unittest.TestCase): 'ihooks', 'mhlib') inclusive_platforms = {'irix' : ('pure', 'AL', 'al', 'CD', 'cd', 'cddb', 'cdplayer', 'CL', 'cl', 'DEVICE', 'GL', - 'gl', 'ERRNO', 'FILE'), + 'gl', 'ERRNO', 'FILE', 'FL', 'flp', 'fl'), 'darwin' : ('autoGIL', 'Carbon', 'OSATerminology', 'icglue', 'Nav', 'MacOS', 'aepack', 'aetools', 'aetypes', 'applesingle', diff --git a/Misc/NEWS b/Misc/NEWS index 13a5932faa7..7154695bb19 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -32,6 +32,9 @@ Extension Modules Library ------- +- The FL, flp, and fl modules from IRIX have been deprecated for removal in + Python 3.0. + - The FILE module on IRIX has been deprecated for removal in Python 3.0. - The ERRNO module on IRIX has been deprecated for removal in Python 3.0. diff --git a/Modules/flmodule.c b/Modules/flmodule.c index e507c9fb586..20e74e93065 100644 --- a/Modules/flmodule.c +++ b/Modules/flmodule.c @@ -2128,6 +2128,11 @@ static PyMethodDef forms_methods[] = { PyMODINIT_FUNC initfl(void) { + + if (PyErr_WarnPy3k("the fl module has been removed in " + "Python 3.0", 2) < 0) + return; + Py_InitModule("fl", forms_methods); if (m == NULL) return;