Repository navigation
Adapt Pipenv pylock test to uv instead of pinning - #1716
Mikola Lysenko (mikolalysenko) wants to merge 2 commits into
Conversation
uv 0.13.2+ refuses the `environments = []` pylock Pipenv writes, so CI pinned uv at 0.13.1 to keep the Pipenv pylock leg green. A maintainer asked for that test to adapt to upstream rather than pin around the change (#1639). The #1368 check now installs the wired pylock with pip 26.2.2 (pip reads `-r pylock.toml` since 26.1 and accepts Pipenv's empty environments list) and must get the PATCHED six. It then installs it with uv: when uv accepts it, uv must get the PATCHED six too; when uv refuses it, uv must refuse Pipenv's untouched pylock with the same error, so the wiring never introduces a refusal. That frees the setup-uv pins to move to the current release, 0.13.5. They stay exact, as scripts/check-tool-pins.py requires. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PwwQCHPjEtXHWXW4SqeBh7
|
bugbot run Generated by Claude Code |
The full-scope dispatch of this PR fails test (windows-latest, 1) on global_folder_values_read_like_yarn, the same failure main's nightly has. #1710 fixes it (a leading backslash is root-relative on Windows) and is waiting on review; port its test-only change so this PR's full-scope run can go green. It no-ops once #1710 lands. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PwwQCHPjEtXHWXW4SqeBh7
|
In the full-scope dispatch 40119121674, That failure isn't caused by this PR: main's 10-24 nightly fails the same test the same way. #1710 fixes it and is waiting on review. Its full-scope run on a real Windows runner was green. I ported its test-only change here in 19b868d. Once #1710 merges, that change has no effect. Every Pipenv and pip leg this PR affects passed in that dispatch. I haven't started a second 187-job full run just to re-check Windows, because #1710 already proved that change on Windows. Generated by Claude Code |
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 19b868d. Configure here.
|
Labeled Ready for review by the burn-down agent.
Slack announcement not sent this run (no send tool available); the next run retries. Generated by Claude Code |
Final review briefWhat it does. Drops CI's Risk: low. It only touches CI pins and test code. Nothing in the shipped CLI changes. Look here
Verified
Changes I made: none. Open questions: none blocking. One note: if uv ever failed for an unrelated reason (e.g. network) on both pylocks with identical Auto-merge (squash) is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
Problem
When uv 0.13.2 shipped (2026-10-19), it started refusing the pylock that Pipenv writes:
That turned the Pipenv pylock legs red (nightly 39376690526) and stalled the merge queue for 2.7 h (#1645). Since then CI has pinned
setup-uvto0.13.1inci.ymlandpipenv-compatibility.yml. #1639 proposed the same pin and was closed with a maintainer's note: "We should try to adapt to the upstream changes rather than pin to the current version." The pin on main is that same workaround, and it keeps CI on a uv release that is now four versions old.Root cause
Pipenv writes
environments = []intopylock.toml, and uv 0.13.2+ reads an empty list as "no environment is supported". Checked locally against a freshly generated Pipenv pylock:error: The target environment is not supported by the lockfile-rThe latest Pipenv (2026.10.2) still writes
environments = []. So this is a disagreement between Pipenv and uv, not something socket-patch's wiring causes.Fix
Test only:
crates/socket-patch-cli/tests/e2e_vex_build/pipenv.rs. The #1368 check, "a PEP 751 installer reading the wired pylock gets the PATCHED six", now runs two installers:pylock-install-patchedstep.pass). If uv refuses it, it must refuse Pipenv's untouched pylock with the sameerror:lines (upstream-refused). The wiring can therefore never be the cause of a uv refusal, and the test recovers on its own if uv or Pipenv changes.Workflows: both
setup-uvpins move from0.13.1to the current0.13.5. They stay exact, becausescripts/check-tool-pins.pyrequires an exact version and that rule exists because of #1645. Only the stale comment ("bump deliberately…") is reworded.No test is removed or moved. Required-check names and
ci-okare unchanged.Also ported: #1710's test-only Windows fix for
global_folder_values_read_like_yarn(19b868d). Without it, this PR's full-scope run fails on the same Windows test main's nightly fails on. Once #1710 merges, that commit has no effect.Proof
Local runs with
SOCKET_PATCH_PIPENV_E2E_REQUIRED=1 SOCKET_PATCH_PIPENV_E2E_VERSIONS=2026.8.0, testpipenv::pipenv_pylock_projects_wire_what_pipenv_installs:ok. The pip step givespylock-install-patched: pass, and the uv step givespylock-uv-install: upstream-refused.ok. Both steps givepass, so the uv-accepting branch still checks the PATCHED bytes.pipenv::andpip::withSOCKET_PATCH_PIP_E2E_VERSIONS=26gave4 passed.scripts/check-tool-pins.pypasses on both workflows,test_check_tool_pinspasses, andcargo fmt --checkis clean on the touched file.pipenv.rs.--all-targetsdoes flagpoetry.rs:485(needless_borrows_for_generic_args), which this PR doesn't touch.These legs run only in the full-scope tier, so lean PR CI doesn't exercise them. I dispatched full-scope run 40119121674 on
a47787c. With uv 0.13.5, every Pipenv leg has passed: 2022.12.19, 2023.12.1, 2024.4.1, 2025.1.3 and 2026.8.0, the last being the pylock one. The pip 22–26 leg has passed too. When I wrote this, 166 jobs had succeeded, none had failed, and 20 were still running.Merge-queue / CI health at the time of this run (2026-10-24 ~17:40 UTC)
test (windows-latest, 1), which CI: fix Windows nightly yarnrc path expectation (#1689) #1710 fixes and which is waiting on review.https://claude.ai/code/session_01PwwQCHPjEtXHWXW4SqeBh7
Note
Low Risk
Changes are CI pins, e2e test logic, and a platform-specific unit-test expectation; no production patch or install behavior.
Overview
Replaces the CI workaround that pinned uv at
0.13.1with an updated e2e assertion model, then bumps uv to0.13.5inci.ymlandpipenv-compatibility.yml(still exact pins percheck-tool-pins).The Pipenv PEP 751 / pylock leg in
pipenv.rsnow validates wiring with pip 26.2.2 (pylock-install-patched) and separately exercises uv. If uv installs the wired lockfile, the install must still carry the PATCHEDsix; if uv rejects it (e.g.environments = []), the test recordsupstream-refusedonly when uv rejects Pipenv’s pristine pylock with the sameerror:lines—so socket-patch wiring cannot be blamed for uv’s refusal. Helperspylock_installanderror_linessupport that split.Also adjusts
global_folder_values_read_like_yarninyarnrc_tests.rsso escapedglobal-folderpaths match Windowspath.resolvebehavior (ported from #1710).Reviewed by Cursor Bugbot for commit 19b868d. Configure here.
Generated by Claude Code