[Python-Dev] deprecated regex used by un-deprecated modules
Guido van Rossum
Fri, 19 Jan 2001 11:53:39 -0500
> There are several modules in the standard library that use the regex
> module. When they are imported, they print a warning about using a
> deprecated module. I think this is bad form. Either the modules that
> depend on regex should by updated to use re or they should be
> deprecated themselves.
> I discovered the following offenders:
> I would suggest fixing asynchat and poplib and deprecating knee. The
> reconvert module may be a special case.
Agreed. There's an idiom to disable the warning, which you can find
warnings.filterwarnings("ignore", "", DeprecationWarning, __name__)
(The "" should be replaced by the specific warning message though.)
--Guido van Rossum (home page: http://www.python.org/~guido/)