Closed cottsay closed 8 months ago
Looks like a change in setuptools broke the unit tests (which is distinctly unsurprising). I'll follow up with a fix tomorrow.
What does a 'distribution' mean in this context?
In short: there is a 1-to-1 mapping of distributions and things that you can "pip install". Distributions can carry more than one top-level module, but you can think of distributions as a "python package" to some extent.
What order are 'distribution's returned from distribution()? Alphabetical? Path-length? Something else?
From what I can tell, the path discovery order is respected but I'm not sure the order within each path is consistent. If you have a distribution "A-1.0" on your system and it is shadowed by a distribution "A-1.1" by something on your PYTHONPATH
, you should always discover "A-1.1" first.
Later versions of importlib.metadata
make this discovery process easier but I think we need to drop Python 3.6 and 3.7 support to access those new functions.
Unrelated fix for CI: #606
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d29f38d
) 83.32% compared to head (f8439ff
) 83.30%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
It seems that the behavior of the
importlib.metadata.entry_points
function changed in Python 3.10 to automatically de-duplicate distributions, but prior to that the "shadowed" distributions were also enumerated. This change specifically ignores "shadowed" distributions so that they aren't identified as extension point overwrites.Fixes #562 Closes #596 When released, will eventually close ros2/ci#737.