Skip to content

Commit

Permalink
Add deprecation warning to modules deprecated since 2000.
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld committed Feb 17, 2006
1 parent b56230b commit b86a54f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/gopherlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 5 additions & 0 deletions Modules/rgbimgmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b86a54f

Please sign in to comment.