GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — Fix lock-only PEP 440 pin spellings missing patches (#604) by mikolalysenko · Pull Request #1334 · SocketDev/socket-patch Conversation
|
| Case | Test | Before | After |
|---|---|---|---|
hosted, lock-only six==1.16 / ==1.16.0.0 / ==01.16.0 against a mock that has the patch only under @1.16.0: redirected, line rewritten, notInstalled: true |
mode_migration_pypi::lock_only_pep440_equivalent_pin_is_patched |
FAILED | ok |
hosted + vendored: the batch carries the spelled and the @1.16.0 purl, lockfileOnlyPackages stays 1 |
scan_requirements_lock_only::lock_only_scan_queries_pep440_equivalent_spellings |
FAILED | ok |
| spelling generation (pad, trim, leading zeros, non-releases) | utils::pep440::tests::equivalent_release_spellings_pad_and_trim |
new | ok |
Red was verified by disabling the query expansion.
cargo test -p socket-patch-core --lib: 6110 passedcargo test -p socket-patch-cli --no-fail-fast (whole suite, non-ignored): every binary passes except e2e_vendor_cargo_build's two old-toolchain cases. Those fail locally only, with "Bad CPU type in executable" from an x86 rustup 1.41 toolchain on arm64, which is unrelated.cargo clippy --workspace --all-features -- -D warnings: clean. cargo fmt --all -- --check: my files clean (the upstream/mod.rs diff is pre-existing on main)🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Empty commit to open the draft PR. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On a fresh checkout (no venv), requirements.txt discovery sent a pin as written: `six==1.16` became `pkg:pypi/[email protected]`, `==1.16.0.0` became `@1.16.0.0`, `==01.16.0` became `@01.16.0`. pip installs the registry release 1.16.0 for all three, but the patch API keys it `@1.16.0`, so the scan said "No patches available" and the unpatched release was installed. The same file with a venv holding six was patched. Scan now also asks the API for the other PEP 440 spellings of a lockfile-only PyPI pure-release pin (leading zeros dropped, release padded or trimmed to at least three segments). A patch returned under another spelling is counted as that lockfile-only package, so `notInstalled` and the vendored baseline pre-check see it. The rewriters already match `==` pins under PEP 440 (#478). Fixes #604 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
BugBot review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
✅ 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 6843538. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Resolve conflicts with #1335 (uv workspace member): keep both the PEP 440 lock-only pin test and the uv workspace Hatch-member test with its helpers in mode_migration_pypi.rs, and keep both the lock-only discovery bullet and main's reworded hosted-requirements bullet in docs/testing/uv-compatibility.md. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Picks up #1351 (Go read-only module cache); no conflicts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Picks up #1296 (v5 migration docs); no conflicts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Resolve conflicts with #1334/#1335 in mode_migration_pypi.rs (keep the hatch pylock test alongside the PEP 440 lock-only and uv workspace member tests) and with main's CLI_CONTRACT.md edits (keep both the redirect_hatch_lock_regenerated and redirect_requirements_direct_reference rows). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Lock-only requirements.txt discovery sends PEP 440-equivalent pins verbatim (six==1.16 → pkg:pypi/[email protected]), so a fresh checkout reports "No patches available" while the same file with a venv is patched
There was an error while loading. Please reload this page.