miguelgrinberg / Flask-HTTPAuth

Simple extension that provides Basic, Digest and Token HTTP authentication for Flask routes
MIT License
1.27k stars 228 forks source link

__version__ is gone #145

Closed solsticedhiver closed 2 years ago

solsticedhiver commented 2 years ago
>>> from flask_httpauth import __version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name '__version__' from 'flask_httpauth' (~/.local/lib/python3.10/site-packages/flask_httpauth.py)
miguelgrinberg commented 2 years ago

Yes, versions are handled in a different way now, this symbol is not needed by the build process anymore.

solsticedhiver commented 2 years ago

How can you get the version of the module, programatically then?

miguelgrinberg commented 2 years ago

Python has a version() function for that:

>>> from importlib.metadata import version
>>> version('flask-httpauth')
'4.5.1.dev0'
solsticedhiver commented 2 years ago

OK. Sorry. Thank you