From: Georg Brandl Date: Fri, 17 Feb 2006 11:29:04 +0000 (+0000) Subject: Add deprecation warning to modules deprecated since 2000. X-Git-Tag: v2.5a0~628 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b86a54f395f734d5e7f24c6ac14225c5b77dcc1f;p=python Add deprecation warning to modules deprecated since 2000. --- diff --git a/Lib/gopherlib.py b/Lib/gopherlib.py index 01eab0a3d9..226eda6e98 100644 --- a/Lib/gopherlib.py +++ b/Lib/gopherlib.py @@ -2,6 +2,9 @@ __all__ = ["send_selector","send_query"] +import warnings +warnings.warn("the gopherlib module is deprecated", DeprecationWarning) + # Default selector, host and port DEF_SELECTOR = '1/' DEF_HOST = 'gopher.micro.umn.edu' diff --git a/Modules/rgbimgmodule.c b/Modules/rgbimgmodule.c index 67b5521092..a2b91c4b2a 100644 --- a/Modules/rgbimgmodule.c +++ b/Modules/rgbimgmodule.c @@ -759,6 +759,11 @@ initrgbimg(void) m = Py_InitModule("rgbimg", rgbimg_methods); if (m == NULL) return; + + if (PyErr_Warn(PyExc_DeprecationWarning, + "the rgbimg module is deprecated")) + return; + d = PyModule_GetDict(m); ImgfileError = PyErr_NewException("rgbimg.error", NULL, NULL); if (ImgfileError != NULL)