I've indexed a vast majority of the files from top 4K pypi packages to this system, and here are the results about __version__ usage on argparse, cgi, csv, decimal, imaplib, ipaddress, optparse, pickle, platform, re, smtpd, socketserver, tabnanny (result of an quick grep)
The pickle in the last example looks like a result of import
cloudpickle as pickle, so we are safe to eliminate that.
On 2020-10-14, Serhiy Storchaka wrote:I propose to remove __version__ in all stdlib modules. Are there any exceptions?I agree that these kinds of meta attributes are not useful and it would be nice to clean them up. However, IMHO, maybe the cleanup is not worth breaking Python programs. We could remove them from the documentation, add comments (or deprecation warnings) telling people not to use them. I think it would be okay to remove them if we could show that the top N PyPI packages don't use these attributes or at least very few of them do. As someone who regularly tests alpha releases, I've found it quite painful to do since nearly every release is breaking 3rd party packages that my code depends on. I feel we should try hard to avoid breaking things unless there is a strong reason and there is no easy way to provide backwards compatibility. _______________________________________________ Python-Dev mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://firstname.lastname@example.org/message/MI2SLQCZIKBRFX7HCUB7G4B64MTZ6XVC/ Code of Conduct: http://python.org/psf/codeofconduct/