From b1d136174abb07d66b1f812a3a2364d9fab0c5e2 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 19 Dec 2000 18:21:39 +0000 Subject: 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. --- Modules/regexmodule.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- cgit v0.12