Repository navigation
Commit 03d9237
* WIP: Fix vendored Pipenv sibling requirements.txt (#612)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* WIP: Fix vendored Pipenv sibling requirements.txt (#612)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Wire Pipenv's exported requirements in vendor
A Pipenv project often installs through a `pipenv requirements >
requirements.txt` export (Docker, plain pip). Vendored mode wired only
Pipfile.lock, so that path kept installing the unpatched release, and
the hosted -> vendored takeover turned the export's hosted pin back
into a plain PyPI pin. Re-running vendor answered `already_vendored`,
so `vendor --check` and `vex` stayed red.
Vendoring a Pipenv entry now also rewrites an exact registry pin of
the package in requirements.txt (or an in-root `-r` include) to the
same committed wheel, the way hosted mode rewrites both files. The
ledger entry records both, every revert restores both, a superseding
patch re-wires both, and a re-run over an already wired Pipfile.lock
wires a newly made export. Pins the requirements wiring cannot
rewrite stay named by `pypi_multiple_lockfiles`.
Fixes #612
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Vendor Pipenv's exported requirements.txt too
A Pipenv project often keeps a requirements.txt exported by `pipenv
requirements` for Docker or plain pip installs. Vendored mode wired
only Pipfile.lock, so `pip install -r requirements.txt` kept
installing the unpatched release, and a hosted to vendored switch
turned that file's patched pin back into a registry pin.
A fresh Pipenv vendor now wires the root requirements.txt (and its -r
includes) along with Pipfile.lock when it pins the package, and
revert restores both. If the lock is wired but the requirements file
can't be, the vendor fails as a whole and the lock is put back. A
requirements file that can't be co-wired, or a project vendored
before this change, is still named in the loud
pypi_multiple_lockfiles warning.
Refs #612
Assisted-by: Claude Code:claude-opus-5-5
* Test that co-wired Pipenv files are not contested
`vendor --check` and `vex` read lockfile discovery. With Pipfile.lock
and requirements.txt both pointing at the same vendored wheel, the
regression test now checks that discovery finds the patch in both
files and reports no contest between them.
Refs #612
Assisted-by: Claude Code:claude-opus-5-5
* Pin the both-files takeover contract (#612)
The hosted -> vendored takeover test asserted the old warning that
requirements.txt stays UNPATCHED; it now asserts that the export's
pin is wired to the vendored wheel too.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Harden the in-sync Pipenv export wiring and its revert (#612)
- An in-sync re-run whose committed wheel is missing now rebuilds it and
then wires the pending exported requirements pin, instead of returning
after the rebuild with the export still on the registry.
- The in-sync sibling wiring pins only a committed wheel that
verify_committed_artifact accepts (canonical path for this uuid, ledger
sha256, afterHashes), and wire/rewire_requirements refuse a wheel path
or digest that is not a single plain token (no CR/LF, whitespace or #).
- Re-wiring after a re-export replaces the entry's requirements_line
records for that file instead of appending duplicates, so a later
superseding patch can still re-wire the export.
- revert_pipenv_with_sibling reverts the export first and restores it if
the Pipfile.lock revert then fails, so neither failure leaves the two
files half reverted.
- Moves wire_requirements' doc comment back onto it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent c60845d commit 03d9237
6 files changed
Lines changed: 727 additions & 34 deletions
File tree
- crates
- socket-patch-cli
- tests
- socket-patch-core/src/vendor
- docs/testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
1392 | | - | |
| 1392 | + | |
1393 | 1393 | | |
1394 | 1394 | | |
1395 | 1395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2022 | 2022 | | |
2023 | 2023 | | |
2024 | 2024 | | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
2029 | 2028 | | |
2030 | | - | |
| 2029 | + | |
2031 | 2030 | | |
2032 | 2031 | | |
2033 | 2032 | | |
| |||
2062 | 2061 | | |
2063 | 2062 | | |
2064 | 2063 | | |
2065 | | - | |
| 2064 | + | |
2066 | 2065 | | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
| 2066 | + | |
| 2067 | + | |
2071 | 2068 | | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2072 | 2185 | | |
2073 | 2186 | | |
2074 | 2187 | | |
| |||
0 commit comments