Skip to content
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 instead of pkg_resources to manage entry points #296

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Dec 8, 2023

We test the modified functions in test_utils.py

@nhuet nhuet marked this pull request as draft December 8, 2023 14:41
@nhuet nhuet force-pushed the pkg_resources_deprecated branch from 0db82b4 to 971bf06 Compare December 8, 2023 15:06
@nhuet nhuet marked this pull request as ready for review December 8, 2023 15:06
- reason 1: in colab, we need to reload some packages via
  importlib.reload which messes with pkg_resources
- reason 2: the use of pkg_resources is deprecated in favor of
  importlib. See warning in https://setuptools.pypa.io/en/latest/pkg_resources.html

We test the modified functions in test_utils.py

NB: the behaviour and nature of importlib.metadata.entry_points() is
different for python <3.10 and >=3.10
@nhuet nhuet marked this pull request as draft December 11, 2023 09:16
@nhuet nhuet force-pushed the pkg_resources_deprecated branch from 971bf06 to a86bac3 Compare December 11, 2023 09:16
The import of c++ library is failing for an unknown reason only on
github runner.
This is during an import of Astar solver inside the domain module (which
could also raise a philosophical issue about a domain from hub needing a
solver from hub, whereas dependencies for domains and solvers are separated
into 2 extras.
@nhuet nhuet force-pushed the pkg_resources_deprecated branch from a86bac3 to 570d399 Compare December 11, 2023 09:58
@nhuet nhuet marked this pull request as ready for review December 11, 2023 10:42
Copy link
Collaborator

@fteicht fteicht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good for me, thanks @nhuet !

@fteicht fteicht merged commit f503a77 into airbus:master Dec 11, 2023
38 checks passed
@nhuet nhuet deleted the pkg_resources_deprecated branch December 12, 2023 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants