From: Guido van Rossum Date: Tue, 19 Dec 2000 18:21:39 +0000 (+0000) Subject: Adding a warning about the regex module. This is the first official X-Git-Tag: v2.1a1~521 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1d136174abb07d66b1f812a3a2364d9fab0c5e2;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Modules/regexmodule.c b/Modules/regexmodule.c index 749de9e7ab48..da1fc3e4e2b6 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);