mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Add deprecation warning to modules deprecated since 2000.
This commit is contained in:
parent
b56230b30d
commit
b86a54f395
2 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue