A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-January/011881.html below:

[Python-Dev] deprecated regex used by un-deprecated modules

[Python-Dev] deprecated regex used by un-deprecated modules [Python-Dev] deprecated regex used by un-deprecated modulesGuido van Rossum guido@digicool.com
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:
> asynchat
> knee
> poplib
> reconvert
> 
> 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
in regsub.py:

    import warnings
    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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4