summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/regexmodule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c
index 749de9e..da1fc3e 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);