-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improve interop with importlib.metadata
: variation without importlib_metadata
#199
Conversation
Thanks! Does this somehow avoid the exception you found in setuptools tests in this comment? |
For setuptools, it should be fine abravalheri/setuptools#14 (tests should OK, docs failing but that is unrelated). (I went ahead and already added fixed the |
Aha, so this is functionally similar to the original version of #195 (before involving I prefer this approach. I'll give it a day or so in case anyone else wants to weigh in, but if not then I'd like to merge this and cut another release. |
It is very nuanced 😅 The reason for introducing Trying to import If setuptools did not have to use vendoring, then yes using |
What are the next steps for this to be merged? |
- Bump PORTREVISION for package change PR: 280646 Obtained from: pypa/pyproject-hooks#199
- Bump PORTREVISION for package change PR: 280646 Obtained from: pypa/pyproject-hooks#199
Hi @takluyver, @jaraco (and/or any other maintainers) is this approach (or the one in #195 which includes |
I unfortunately have paged out the rich context, but I agree that it sounds as if this narrow and surgical fix may be a very solid improvement. Let's go with it for now. Thanks for the diligent investigation and proposal. |
Would it be possible to make a release with this soon? The bug this aims to fix is basically update blocker for pyproject-hooks for any distro-like entities. |
And for any distro which has upgraded pyproject-hooks unaware of this cannot update affected packages - pex for example. |
@pradyunsg or @takluyver ^ |
Sorry for the delay. |
v1.2 is tagged and on PyPI now - thanks for your patience and for the periodic reminders. |
1.2 has broken build's test suite when using Backend path is |
😮💨 Sorry. I have no idea what's the right thing to do here now. #165 was meant to improve how an in-tree backend was loaded, but broke setuptools in some scenarios (#192). This PR was meant to fix that, but it seems that it's broken something in another scenario. 😞 Maybe we should have used I'm sorely tempted to declare that pyproject-hooks now requires Python 3.10 or above, and you should just pin whichever version works for you on older Python versions. I'm normally pretty keen on backwards compatibility, so I'd welcome a better solution, but I don't have the time or energy to wade through importlib stuff to figure this out. And I don't know how we can trust that the next solution won't just lead to another of these bugs popping up somewhere. |
Let's have the discussion on that in #206. |
This is basically the same as #195 but without using
importlib_metadata
.Feel free to close if #195 is preferred.
This might be worthy considering:
i.e. while this approach decreases the "spooky action at distance" of a transitive dependency installing
importlib_metadata
, it may also be more error prone if some dependency is indeed usingimportlib_metadata
.Closes #192