Skip to content

refactor(pypi): add the helpers for the extra targets - #4492

Open
aignas wants to merge 4 commits into
bazel-contrib:mainfrom
aignas:feat.aignas.extras-helpers
Open

aignas wants to merge 4 commits into
bazel-contrib:mainfrom
aignas:feat.aignas.extras-helpers

Conversation

@aignas

@aignas aignas commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Add the helpers that are needed for creating a target per extra of a
package, split out from #4490 to make the review easier:

  • strip_extras removes the extras from a requirement line, so that the same
    distribution requested with different extras can be handled together.
  • pep508_deps.deps gains keep_extras, which returns the dependencies on
    the extras of other packages as separate nodes, e.g. foo[bar] and
    foo[baz] for foo[bar,baz]. The excludes now match these nodes, so
    that a single extra of a package can be excluded, and the self edges are
    dropped by name.
  • extra_label returns the target name of an extra, e.g. [bar], and
    group_member normalizes a member of a requirement cycle group, e.g.
    Foo[Bar] to foo[bar].

There are no user-facing changes.

Work towards #2786

@aignas
aignas requested a review from rickeylev as a code owner November 13, 2026 12:26
@aignas

aignas commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator Author

This PR was written by an AI coding agent (Claude Code) working under the direction of @aignas, who reviewed the design and the changes. Review comments will be handled by @aignas, possibly with the help of the agent; any agent-drafted replies or follow-up commits are reviewed by @aignas before being posted. An agent monitors CI only to retry flaky network failures.

This comment was generated by an AI agent and reviewed by the user.

This branch has not been deployed

No deployments
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