Use importlib.metadata if it exists
jayvdb opened this issue · comments
Python 3.8 does not need importlib_metadata
- it is part of stdlib as importlib.metadata
.
File "/usr/lib/python3.8/site-packages/tox_poetry_dev_dependencies/__init__.py", line 5, in <module>
from . import _meta
File "/usr/lib/python3.8/site-packages/tox_poetry_dev_dependencies/_meta.py", line 5, in <module>
import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'
Why the stack trace? How did this happen? There is a mandatory dependency on importlib-metadata
, I do not see how this could have happened.
@jayvdb
Since importlib_metadata
is used exclusively to provide the value for __version__
, accodingly to PEP 396, and my impression is that no one actually relies on the presence of this value (additionally the PEP itself never went to the final stage), it might be worth it getting rid of __version__
entirely.
Is that something that would work for you?
Do you rely on PEP 396 (the presence of __version__
), or are you aware of any project that does?
The maintainers of importlib-metadata themselves got rid of it in this change.
I use a different tox poetry plugin now.