mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
fad81f0838
commit
b1d136174a
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue