Skip to content

Remove raw URL cache keys - #22629

Merged
zanieb merged 1 commit into
zaniebot/pep508-unsafe-url-20261015from
zaniebot/safe-url-cache-key-20261015
Oct 16, 2026
Merged

zanieb merged 1 commit into
zaniebot/pep508-unsafe-url-20261015from
zaniebot/safe-url-cache-key-20261015

Conversation

@astral-automations-bot

Copy link
Copy Markdown
Contributor

url::Url implements CacheKey, allowing raw URLs to be used directly as cache keys. Remove that implementation in favor of SafeUrl. Require CacheKey only when caching a Requirement, so the unsafe-url feature can still parse requirements with url::Url without making those requirements cacheable.

Stacked on #22623.

@astral-automations-bot astral-automations-bot Bot added the internal A refactor or improvement that is not user-facing label Oct 16, 2026
@zanieb
zanieb force-pushed the zaniebot/safe-url-cache-key-20261015 branch from 66eddd8 to d6b8882 Compare October 16, 2026 02:12
@zanieb
zanieb added this pull request to stack #22614 October 16, 2026 02:13
@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 14.91%

⚠️ 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

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ ⚠️ Simulation discover_workspace_from_all_members_with_excludes 163.4 ms 142.2 ms +14.91%

Tip

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


Comparing zaniebot/safe-url-cache-key-20261015 (94fabd1) with zaniebot/pep508-unsafe-url-20261015 (f506d96)

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

@zanieb
zanieb force-pushed the zaniebot/safe-url-cache-key-20261015 branch from d6b8882 to 94fabd1 Compare October 16, 2026 13:59
@zanieb
zanieb merged commit bf1847d into main Oct 16, 2026
268 of 273 checks passed
@zanieb
zanieb deleted the zaniebot/safe-url-cache-key-20261015 branch October 16, 2026 15:16

This branch was previously deployed

1 inactive deployment
automations — 94fabd14 Deployed Oct 16, 2026 by zanieb via review / security review #51339
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.

2 participants