You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
InstalledPackageResolver: Note when a package provides no import names
Add a debug-level warning when neither _top_level_declared() nor
_top_level_inferred() is unable to find any provided import names in a
package.
This _might_ be a symptom of a weird Python environment with missing
metadata (like @layus is currently experiencing with Bazel's
rules_python rule set: In the directory structure that rules_python
makes available to build steps that depend on a Python package, the
necessary metadata files (RECORD or top-level.txt) needed by
importlib_metadata in order to determine a package's import names are
not included.
However, this situation might(?) also happen with any package that
provides executable tools rather than importable modules (think e.g.
uv, ruff, or similar).
Hence we leave this as a debug-level message for now: We don't want a
scary warning for something that might be legitimate, but a debug-level
message can still be found by a user that is e.g. debugging a case where
a declared dependency is reported as both undeclared and unused.
0 commit comments