Adding a warning about the regex module. This is the first official

use of PyErr_Warn()!  This module is a good guinea pig because it's
been obsolete since 1.5.0 was released.
This commit is contained in:
Guido van Rossum 2000-12-19 18:21:39 +00:00
parent fad81f0838
commit b1d136174a

View file

@ -656,6 +656,9 @@ initregex(void)
m = Py_InitModule("regex", regex_global_methods);
d = PyModule_GetDict(m);
PyErr_Warn(PyExc_DeprecationWarning,
"the regex module is deprecated; please use the re module");
/* Initialize regex.error exception */
v = RegexError = PyErr_NewException("regex.error", NULL, NULL);