sinoroc / tox-poetry-dev-dependencies

Tox plugin to help working with Poetry-based projects

Home Page:https://pypi.org/project/tox-poetry-dev-dependencies/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

I use a different tox poetry plugin now.

@jayvdb For info, which plugin are you using? I want to link to it in the README, so that people can find alternatives easily.

These are the ones I have so far:

For info, the removal of __version__ and thus the dependency on importlib-metadata has been released in v0.0.4.