diff options
author | Guido van Rossum <guido@python.org> | 2000-12-19 18:25:58 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-12-19 18:25:58 (GMT) |
commit | 7292e921fc9b0128a2224eb4cd45c2649211c9cf (patch) | |
tree | 2d45e6f59d276ed6835e96e45a1da6e75995528f /Lib/regsub.py | |
parent | b1d136174abb07d66b1f812a3a2364d9fab0c5e2 (diff) | |
download | cpython-7292e921fc9b0128a2224eb4cd45c2649211c9cf.zip cpython-7292e921fc9b0128a2224eb4cd45c2649211c9cf.tar.gz cpython-7292e921fc9b0128a2224eb4cd45c2649211c9cf.tar.bz2 |
Adding a warning about the regsub module. This also disables further
warnings in this same module, to prevent getting a warning about
importing regex (we *know* that it's obsolete :-).
Diffstat (limited to 'Lib/regsub.py')
-rw-r--r-- | Lib/regsub.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/regsub.py b/Lib/regsub.py index dc95028..a0ca8fe 100644 --- a/Lib/regsub.py +++ b/Lib/regsub.py @@ -10,6 +10,13 @@ splitx(str, pat, maxsplit): split string using pattern as delimiter plus return delimiters """ +import warnings +warnings.warn("the regsub module is deprecated; please use re.sub()", + DeprecationWarning) + +# Ignore further deprecation warnings about this module +warnings.filterwarnings("ignore", "", DeprecationWarning, __name__) + import regex |