You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pylint has been complaining about the string module being deprecated for about as long as I can remember. I've seen no indication that it will ever go away completely. It's certainly still the only place to get a number of useful string constants (ascii_letters, digits, punctuation, ...). A bunch of string functions were dumped in the 2-to-3 change. If pylint is going to complain about the string module, I would suggest:
In Python 2, it only complain about names which are no longer present in the Python 3 version:
You were correct that I wasn't using the latest version of pylint. I updated from 1.7.4 to 1.8.3, but I still received the same complaint. I didn't get the warning message on my home computer, and was scratching my head for a long while about why I kept getting that message on my work computer. Then I found a list of deprecated modules in my ~/.pylintrc dating from 2016. I imagine that is the product of a run with --generate-rcfile. Who knows what version of pylint I had installed at that time...
Pylint has been complaining about the string module being deprecated for about as long as I can remember. I've seen no indication that it will ever go away completely. It's certainly still the only place to get a number of useful string constants (ascii_letters, digits, punctuation, ...). A bunch of string functions were dumped in the 2-to-3 change. If pylint is going to complain about the string module, I would suggest:
['atof', 'atof_error', 'atoi', 'atoi_error', 'atol', 'atol_error', 'capitalize', 'center', 'count', 'expandtabs', 'find', 'index', 'index_error', 'join', 'joinfields', 'letters', 'ljust', 'lower', 'lowercase', 'lstrip', 'maketrans', 'replace', 'rfind', 'rindex', 'rjust', 'rsplit', 'rstrip', 'split', 'splitfields', 'strip', 'swapcase', 'translate', 'upper', 'uppercase', 'zfill']
(This would be a useful addition to the Python 2 version before dropping support altogether.)
* In Python 3, disable the warning about string module deprecation altogether. It ain't broken. There's nothing to fix. :-)
The text was updated successfully, but these errors were encountered: