Commit bce08bd
Repair lazy-imports patch queue broken by D107679841
Summary:
D107679841 corrupted `third-party/python/3.14/patches/16-lazy-imports/lazy-imports.patch`, breaking patch application (`validate_patch_integrity`). It had three defects:
1. **Malformed hunk count** in the `Lib/importlib/__init__.py` hunk. The change grew the body by 8 lines (added `_UNSET = object()` plus blanks, and replaced one `return` with the `kwargs` block) but only bumped the hunk header `53 -> 59` (+6). With the count short by 2, `patch` stopped early and reported `malformed patch at line 3669: """Call the invalidate_caches() method...`.
2. **`_UNSET` placed inconsistently.** The patch inserted `_UNSET = object()` just before `set_lazy_imports`, while `patched/Lib/importlib/__init__.py` (and the 3.12 file) place it at the top, right after `from ._bootstrap import __import__`. This made `pristine+patches` diverge from `patched/`. The hunk is now regenerated directly from `diff(pristine, patched)` (`@@ -59,6 +59,60 @@`, `_UNSET` at the top).
3. **New test file missing from `patched/`.** The diff added a creation hunk for `Lib/test/lazyimports/set_lazy_imports_excluding_preserves_eager.py` to the `.patch` but never committed the file to the `patched/` subtree, and that creation hunk also miscounted (`+1,20` for a 23-line file). The file is now added (byte-for-byte from the patch) and the count corrected to `+1,23`.
Reviewed By: itamaro
Differential Revision: D108370070
fbshipit-source-id: 7856a2c6e104a68cdfe2903c3945caa484e5a9661 parent ccebbb4 commit bce08bd
1 file changed
Lines changed: 23 additions & 0 deletions
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments