summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-12-19 18:21:39 (GMT)
committerGuido van Rossum <guido@python.org>2000-12-19 18:21:39 (GMT)
commitb1d136174abb07d66b1f812a3a2364d9fab0c5e2 (patch)
tree9699a920ebaa713f024f98f8b7741e2153c43713 /Modules
parentfad81f08380080bb370c71c6cd0562e5329a4660 (diff)
downloadcpython-b1d136174abb07d66b1f812a3a2364d9fab0c5e2.zip
cpython-b1d136174abb07d66b1f812a3a2364d9fab0c5e2.tar.gz
cpython-b1d136174abb07d66b1f812a3a2364d9fab0c5e2.tar.bz2
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.
Diffstat (limited to 'Modules')
-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);