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
As it's case with most Python packages, if you run i.e:
print("psutil version:", psutil.__version__)
you'll end up getting package version, i.e: psutil: 5.7.2
However, if I do the same for distro package, i.e:
print("distro:", distro.__version__)
I'll immediately get Module 'distro' has no '__version__' member
Would it be possible to add this functionality in one of the future versions instead of having to resort to hacks/workarounds in order to print distro package version as part of a Python app.
Activity
jdufresne commentedon Jul 1, 2021
The modern way to do this is with importlib.metadata.
jdufresne commentedon Jul 2, 2021
Thanks for the report. Resolved in a3da4d4.