-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace pkg_resources #31
Conversation
Use `importlib.metadata.distributions` instead.
This is needed for entry points.
In `example.ploneintegration`, the `example.addon` zcml gets loaded. In `example.zopeintegration`, the `example.addon` and `example.multipleeps` zcml gets loaded. This is because `example.{addon,multipleeps}/setup.py` has a strange entry point: ``` [z3c.autoinclude.plugin] dummy = dummy ``` This was added to check if our code can handle unexpected entry point contents without breaking. I don't really mind whether the zcml of these packages gets loaded or not, as this should not happen in practice. But the new way of getting the available distributions and their entry points, apparently has this as side effect.
Pull Request Test Coverage Report for Build 13656371879Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for starting this. I have made a fix in commit 5876289: on Python 3.9 we really must use the entry_points
from importlib_metadata
, instead of the built in importlib.metadata
.
And then the tests needed fixing because the new code finds a few more zcml files to load, but this should be fine.
Thanks for finishing the code! |
@jenkins-plone-org please run jobs |
See plone/Products.CMFPlone#4126
Warning
tests are failing, if you remove the last commit, tests run fine, but there is
pkg_resources
still to be removed 🤷🏾