Skip to content

Use PEP 508 URLs for build backend requirements - #2754

Closed
charliermarsh wants to merge 1 commit into
mainfrom
charlie/codex-uv-build-requirement-urls
Closed

charliermarsh wants to merge 1 commit into
mainfrom
charlie/codex-uv-build-requirement-urls

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

We parse build-system.requires as PEP 508 requirements in the build backend, reserving distribution-URL classification for uv's direct-build validation. The frontend supplies the build requirements before invoking the backend, so the backend does not need Git parsing or archive-extension inference for those URLs.

This intentionally accepts some build-system URLs that the backend previously rejected, such as uv_build @ hg+https://example.com/uv-build or an archive download endpoint without a filename extension. Requirement syntax and project dependency parsing remain unchanged. Direct builds retain the richer URL parser and its existing errors.

On Linux x86_64 with Rust 1.99.0 and the stripped minimal-size profile, uv-build decreases from 3,075,808 to 3,029,232 bytes (46,576 bytes, 1.51%) against main at e37c1f0c6.

All 68 backend tests, strict clippy, and formatting pass. A regression test exercises successful backend metadata generation and rejection by direct-build validation for the same Mercurial URL. Comparisons across 180 URL cases, 756 marker cases, and the CLI/archive corpus found only the intended build-system URL validation changes; previously successful builds produce identical output.

This absorbs the standalone-binary size benefit of #2753, so their savings should not be added together.

@astral-automations-bot astral-automations-bot Bot added bug Something isn't working compatibility Compatibility with a specification or another tool labels Oct 14, 2026
@codspeed

codspeed Bot commented Oct 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 69 untouched benchmarks
⏩ 35 skipped benchmarks1


Comparing charlie/codex-uv-build-requirement-urls (bcbfc13) with main (e37c1f0)

Open in CodSpeed

Footnotes

  1. 35 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. ↩

@astral-automations-bot

Copy link
Copy Markdown

Promoted to #22577.

This branch was successfully deployed

1 active deployment
automations — bcbfc13b Deployed Oct 14, 2026 by charliermarsh via review-code-quality / code quality review #10197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working compatibility Compatibility with a specification or another tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant