New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use importlib.metadata if present #18
Conversation
690b90a
to
408dc49
Compare
Thanks for the pull request! I believe the CI setup may be flawed, so that such a change would never pass the checks. I would need to have a closer look to be sure of that, but that's my impression. I will let you know, once I figure this out and if a change of the CI setup is needed. On the other hand (unrelated to the CI setup flaw), there is a remaining issue in the declaration of the dependencies. Indeed for Python versions that do have |
How about I change the CI so that mypy is only used on py38? And yes, I can adjust setup.cfg to not install the unnecessary dependency. |
Yes, please.
I'd rather do the CI changes myself. Thanks. There are more things I want to change about it anyway. But I will be upfront: I don't know when, meaning your pull request might stay pending for a while. The |
Another thing, I don't want the commit messages to be too tied to GitHub (for example I also host the same code on GitLab). In the commit message we need to be more explicit about what these magic numbers actually refer to, so please transform:
into:
I should add this to the contributing guidelines. |
fwiw, my commit message has an explicit URL, not just a
It makes your plugin incompatible with distros which do not provide packages for importlib-metadata and importlib-resources (and dataclasses and other backports), so it is impossible to import them without installing from pip into system packages, never a good idea. (However |
I see. Well actually I don't see it, because GitHub somehow does not show the URL, it only shows the
Yes
I understand. Maybe you will find this workaround useful (Tox's
Good :) |
So the CI, is "fixed". Honestly if the workaround with I am open to reconsider, if it's a strict blocking issue for anyone. |
That workaround neither works, nor is it relevant. The backport you are depending on is not supposed to be used on versions of Python which have a better stdlib version of the library. These backports degrade over time, as maintaining it is duplicate effort. |
I am confused...
Tox and its plugins absolutely should be installed and run outside of the test environments. What am I missing here?
I see your point. But in that particular case, as far as I know importlib-metadata is still being actively maintained. It looks to me like it even got some fairly recent improvements regarding speed, consistency, reliability. It is not clear to me if these improvements have already been released in Python's standard library version (my impression is that Python 3.8 is more or less at the level of importlib-metadata v1.5.0). I'm trying to get a clearer idea of the pros and cons here: https://gitlab.com/python-devs/importlib_metadata/-/issues/130 |
408dc49
to
60e97e7
Compare
|
Maybe what I am talking about was only introduced in Tox 3.8, with the auto-provision feature, while |
I am talking about talking about tox anyway, CI is indeed fixed. Nice. I'll get this PR updated to not depend on the backport when it isnt needed. |
As far as I know, since Tox 3.8 it does:
-- https://tox.readthedocs.io/en/latest/config.html#conf-requires Also: |
I am still not convinced such a change is worthwhile. In my mind it is not a blocking issue (especially with the auto provisioning feature in Tox 3.8+). If the dependency on |
Closes #17