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 :-).
This commit is contained in:
Guido van Rossum 2000-12-19 18:25:58 +00:00
parent b1d136174a
commit 7292e921fc
1 changed files with 7 additions and 0 deletions

View File

@ -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