Commit f7562564 authored by Guido van Rossum's avatar Guido van Rossum

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.
parent 7c4be902
......@@ -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);
......
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