Skip to content

feat(pypi): warn about the dependencies that are not in the hub - #46

Draft
aignas wants to merge 1 commit into
feat.aignas.extras-edges-04-platform-envsfrom
feat.aignas.extras-edges-05-warn-missing-deps
Draft

aignas wants to merge 1 commit into
feat.aignas.extras-edges-04-platform-envsfrom
feat.aignas.extras-edges-05-warn-missing-deps

Conversation

@aignas

@aignas aignas commented Nov 22, 2026

Copy link
Copy Markdown
Owner

A lock file that is compiled for fewer platforms or Python versions
than the hub is used with silently drops dependencies, e.g. tomli for
coverage[toml] on Python 3.10. The whl repositories now load
target_platform_envs from the hub and print a warning that names the
package, the missing dependency and its marker if it can be needed on
any target platform. The warnings for an extra are only printed when
the extra is used: at loading time if the hub requests it, otherwise by
the extra_select target when another package depends on it.

Part of #41. Based on the previous PR of the stack.

Work towards bazel-contrib#2786

The dependencies from the wheel METADATA that are not in the hub are
left out, which is only correct if they are not needed on any of the
target platforms, e.g. when the lock file is compiled for Python 3.12
and the hub is also used with Python 3.10. The whl repositories now load
the marker environments of the target platforms from the hub and print
a warning that names the package, the missing dependency and its marker.
The warnings about the dependencies of an extra are only printed if the
extra is used, i.e. it is requested in the hub or another package
depends on it through its extra_select target.

Work towards bazel-contrib#2786
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.

1 participant