diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index 749de9e7ab4..da1fc3e4e2b 100644 --- a/Modules/regexmodule.c +++ b/Modules/regexmodule.c @@ -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);