Commit cc1b09f9 authored by Georg Brandl's avatar Georg Brandl

Add deprecation warning to modules deprecated since 2000.

parent 7bcdfb3b
......@@ -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'
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment