Stop wheel Requires-Dist leakage by removing pinned req edges from inner library targets#4531
Closed
Copilot wants to merge 2 commits into
Closed
Stop wheel Requires-Dist leakage by removing pinned req edges from inner library targets#4531Copilot wants to merge 2 commits into
Requires-Dist leakage by removing pinned req edges from inner library targets#4531Copilot wants to merge 2 commits into
Conversation
✅ Deploy Preview for nifty-bassi-e26446 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Agent-Logs-Url: https://github.com/envoyproxy/toolshed/sessions/4742986f-2bfa-40e7-af6d-36361ac8ad85 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix wheel metadata leak for multiple wheels
Stop wheel May 14, 2026
Requires-Dist leakage by removing pinned req edges from inner library targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pants package ::was still emitting leaked pinned deps (==...) into wheelMETADATAfor 18 packages because innertoolshed_library(...)targets carried//py/deps:reqs#*edges. This change applies the same structural fix asaio.corerepo-wide: keep runtime metadata sourced fromsetup.cfgpublish reqs, not from inner source target transitive deps.Library target cleanup (18 packages)
//py/deps:reqs#*dependencies from affected innertoolshed_library(...)targets.aio-core,envoy-base-utils,envoy-github-release) where they were attached via//py/deps:reqs#....Test dependency rebalance
tests/BUILDtoolshed_tests(...)targets so tests keep access to runtime/test-time imports after library-edge removal.Special-case leak paths resolved
envoy.distribution.release: removed the req-edge path that produced duplicateenvoy-github-releaseleakage.envoy.code.check: eliminated sibling-package leakage from the inner library target shape.mypy-abstractsandpytest-abstracts: removed req-edge leaks from inner library targets so wheel requirements are driven by publish reqs.Example of the applied pattern:
Original prompt
Context
PR #4527 fixed the wheel-METADATA leak in
py/aio.corewhere pinned//py/deps:reqs#*targets attached to the innerpython_sources(viatoolshed_library(dependencies=[...])inpy/aio.core/aio/core/BUILD) were being transitively pulled into the wheel'sRequires-Dist. A follow-up PR adds a CI verifier (py/tools/publish_check/check_wheel_metadata.py) that walksdist/*.whland compares each wheel's runtimeRequires-Dist(excluding; extra == ...entries) against the matchingpy/<pkg>/setup.cfg[options] install_requires, asserting set equality.Running that verifier locally against the current
pants package ::output shows that 18 of 23 wheels still leak the same wayaio.coredid before PR #4527. This issue is to fix all of them in one mechanical pass so the verifier goes fully green and the next release cycle ships clean wheels.Currently clean (do not touch)
These wheels already match their
setup.cfgexactly and must remain clean:abstractsaio.core(already fixed by PR py/aio.core: Fix wheel dep metadata #4527 — use as the canonical reference shape)pytest-iterspytest-patchestoolshed-test-publish-pkg(the fixture atpy/_test_publish_pkg)Verifier output (the spec for this PR)
The following entries are what the verifier reports as
unexpected Requires-Dist (leaked from pants/deps?)for each wheel. Each(name, specifier)tuple corresponds to a Requires-Dist entry that is NOT in that package'ssetup.cfgand must be removed from the wheel METADATA. Some are leaked third-party pinned deps (==<lockfile-pin>); some are leaked sibling toolshed packages (aio-core==0.11.0, etc.).