-
-
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
Work around breaking install #26
Conversation
@reebalazs thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
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.
This cannot be merged unluckily.
If you have a package called foo.bar_baz
it will not be found...
... due to dot replaced to dash in module name. See pypa/setuptools#4853 and #25
5857186
to
8e71e67
Compare
@ale-rt hmmm ok. I mean... the fix won't work for However it will work for Let's hope that the real reason gets fixed and we won't need this. Until then... I'll use this branch as a workaround. |
@reebalazs the thing is quite complex... As of today, I have no clue if it is the same because the packaging story evolved quite rapidly. |
To clarify what I mean: I agree that the patch won't work to fix Right now this is "good enough" for me because I don't have any failure with We are in a pickle if we see any |
I see your point @reebalazs and you are probably right :) |
The actual fix would be to figure out why it gets the underscore at the first place. Anything else is just a workaround. |
I am first looking into the failing tests, which had already been failing longer, simply due to testing too old Python versions. Some tests will still fail due to the newer setuptools version. A quick test of the above fix did not yet help here. Curiously, locally on Python 3.9, 3.10 and 3.11 the tests pass. Only the integration tests for 3.12 and 3.13 fail. |
Unfortunately this is not enough. Beyond autoinclude, I get other errors for example from __version__ = pkg_resources.get_distribution("collective.timedevents").version pkg_resources.DistributionNotFound: The ‘collective.timedevents’ distribution was not found and is required by the application This fails too, while the package is successfully installed. So this indicates that the place to work around this is not in autoinclude, but the original problem in setuptools has to be fixed. |
I have it... This should do it: Instead of using: (Pdb++) iter_entry_points
<bound method WorkingSet.iter_entry_points of <pkg_resources.WorkingSet object at 0x7192638f6b50>> We should use the equivalent importlib function: importlib.metadata.entry_points(group="z3c.autoinclude.plugin")[0].dist.name See: https://importlib-metadata.readthedocs.io/en/latest/migration.html |
Or something like this:
|
I think this should be replaced by #28. As you suggest the way to go is to use importlib dist name |
Fixed in release 2.0.0. |
... due to dot replaced to dash in module name.
See pypa/setuptools#4853 and #25