Email Re: [Python-projects] Pylint complaining of string module prevents use of variables like string.printable

subject
Re: [Python-projects] Pylint complaining of string module prevents use of variables like string.printable
date
2005/10/26 17:41
Bonjour,

My work-aound this problem has been to define another module called xstring.py
that imports string, creates variable like printable that it then exports and
add pylint warning supression inside that xstring.py module.  Then the other
code imports xstring instead of string.

However, I would have liked to name that'proxy' module stringx.py instead of
xstring.py.  But pylint complains about any module whose name *starts* with
"string".  This is the other problem that I mentionned in my previous email.

Thanks,

Pierre Rouleau




Nicolas Chauvat <nicolas.chauvat@logilab.fr> on 10/26/2005 05:08:37 PM

To:   Pierre Rouleau/impath@impath
cc:   python-projects@logilab.org

Subject:  Re: [Python-projects] Pylint complaining of string module prevents use
      of variables like string.printable





Bonjour,

On Wed, Oct 26, 2005 at 04:47:46PM -0400, Pierre_Rouleau@ImpathNetworks.com
wrote:
> Pylint (all recent versions including 0.8) complains about the import of the
> string module with W0402 warning, stating that it is obsolete.
> ...

That is the issue number 1192 in our tracker. We are working on
putting this tracker online so that everyone can look at it. The last
comment about this issue says that it is difficult to solve without
making a special case for string in the test function.

I suppose that if someone can offer some code that implements the
change (in a generic way if possible, so that other deprecation
warnings of the same type can be added) it will quickly make its way
into the next release.

--
Nicolas Chauvat

logilab.fr - services en informatique avancée et gestion de connaissances