diff options
author | Guido van Rossum <guido@python.org> | 2000-12-19 18:25:58 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-12-19 18:25:58 +0000 |
commit | e4cc90e54ab71a652326a28ce6a7d73dc6b323d1 (patch) | |
tree | d2fb5838228936dd4a4ba3a141bffa5ef98c4054 /Lib/regsub.py | |
parent | f7562564da4d50d9b9300eb04f293b2aca3caab7 (diff) | |
download | cpython-e4cc90e54ab71a652326a28ce6a7d73dc6b323d1.tar.gz |
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 dc95028b34..a0ca8fe41e 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 |