mirror of https://github.com/python/cpython.git
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:
parent
b1d136174a
commit
7292e921fc
|
@ -10,6 +10,13 @@
|
|||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue