Skip to content

Use encapsulated pugrub interface - #21647

Merged
konstin merged 12 commits into
codex/upstream-version-rangesfrom
codex/pubgrub-dependency-conflict-api
Oct 21, 2026
Merged

konstin merged 12 commits into
codex/upstream-version-rangesfrom
codex/pubgrub-dependency-conflict-api

Conversation

@konstin

@konstin konstin commented Sep 13, 2026 •

Copy link
Copy Markdown
Member

Avoid calling into PubGrub's implementation details by using dedicated methods. Match Term::Positive directly to borrow the version range without requiring a public Term::unwrap_positive.

Paired with astral-sh/pubgrub#80 and astral-sh/pubgrub#86. Use the released astral-pubgrub 0.7.0 and astral-version-ranges 0.2.3, with the unstable state API enabled for uv's incremental resolver.

Stacked on #21648.

Some(version.clone()),
dependency_versions.encoded_versions().clone(),
));
// Find a dependency from a package to the current package.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De-indented but same logic

@konstin konstin changed the title Use pubgrub dependency and conflict queries Use encapsulated pugrub interface Sep 13, 2026
@konstin konstin added the internal A refactor or improvement that is not user-facing label Sep 13, 2026
@konstin
konstin marked this pull request as ready for review September 13, 2026 21:29
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Make `Term::unwrap_positive` crate-private, matching upstream. External
callers can borrow the version set by matching `Term::Positive`.

Paired with astral-sh/uv#21647, which removes
uv's remaining call.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Sep 19, 2026
Make `Term::unwrap_positive` crate-private, matching upstream. External
callers can borrow the version set by matching `Term::Positive`.

Paired with astral-sh/uv#21647, which removes
uv's remaining call.
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from 745ec08 to 5b63204 Compare September 20, 2026 14:04
@konstin
konstin changed the base branch from main to codex/upstream-version-ranges September 20, 2026 14:04
@konstin
konstin added this pull request to stack #21862 September 20, 2026 15:50
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from 3ebacee to a72e48f Compare October 12, 2026 08:52
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from a72e48f to b8901f5 Compare October 12, 2026 09:24
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from b8901f5 to 2fd9aa1 Compare October 12, 2026 09:28
konstin added a commit to astral-sh/pubgrub that referenced this pull request Oct 17, 2026
Avoid uv calling into pubgrub's implementation details by using
dedicated methods instead. Paired with
astral-sh/uv#21647.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Oct 17, 2026
Make `Term::unwrap_positive` crate-private, matching upstream. External
callers can borrow the version set by matching `Term::Positive`.

Paired with astral-sh/uv#21647, which removes
uv's remaining call.
konstin added a commit to astral-sh/pubgrub that referenced this pull request Oct 17, 2026
Make `Term::unwrap_positive` crate-private, matching upstream. External
callers can borrow the version set by matching `Term::Positive`.

Paired with astral-sh/uv#21647, which removes
uv's remaining call.
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from 2fd9aa1 to 26af54c Compare October 19, 2026 13:23
@konstin
konstin force-pushed the codex/pubgrub-dependency-conflict-api branch from 26af54c to 611860d Compare October 21, 2026 09:48
@codspeed

codspeed Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 5.22%

2 warnings

⚠️ Unable to measure the execution of 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 8 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚡ 1 improved benchmark
✅ 118 untouched benchmarks
⏩ 54 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Walltime marker_to_dnf_platform_specific_python_versions 544 ns 517 ns +5.22%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/pubgrub-dependency-conflict-api (6fff49f) with codex/upstream-version-ranges (3aa28c1)

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@konstin
konstin removed this pull request from stack #21862 October 21, 2026 10:58
@konstin
konstin added this pull request to stack #22791 October 21, 2026 10:58
@konstin
konstin merged commit 43001eb into main Oct 21, 2026
236 checks passed
@konstin
konstin deleted the codex/pubgrub-dependency-conflict-api branch October 21, 2026 11:20

This branch was previously deployed

1 inactive deployment
automations — 6fff49f3 Deployed Oct 21, 2026 by konstin via review / security review #52042
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant