14.10.20 23:25, Batuhan Taskaya пише:
> 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)
> 
> 
> rawdata/clean/argparse/setup.py
> 
> |argparse.__version__|

If it refers to the third-party argparse module, which uses
argparse.__version__ in its setup.py, it is __version__ of that
third-party module, not the one from the stdlib.

> rawdata/pypi/junitparser-1.4.1/bin/junitparser
> 
> |argparse.__version__|

argparse.__version__ is used for displaying the version of the
junitparser script. Of course the version of argparse (1.1 in the
stdlib) does not have any relation with the version of junitparser
(currently 1.4.1), so this is purely a misuse.


> rawdata/pypi/interpret_community-0.15.1/interpret_community/mlflow/mlflow.py
> 
> 
> |pickle.__version__|
> 
> The pickle in the last example looks like a result of import cloudpickle
> as pickle, so we are safe to eliminate that.

So it seems that there is only one usage of __version__ from the stdlib
modules, and that that one is a bug. Reported.

It seems pretty safe to just remove __version__ variables.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/GRJTXCRUDEUQZE2IYSBKFJYKGS7AXZXA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to