49fe6cf8f6
Three things, all on top of the items 32/34/37 branch.
1. Python 3.11 build fix. `python-install` failed with
`SyntaxError: f-string expression part cannot include a backslash`:
`f"...{held.count(ord(b'\n'))}"` is legal only from 3.12 (PEP 701) and
pyproject declares >=3.11. The newline byte is a module constant now.
2. The cmp count reader, re-pinned on GNU diffutils 3.10. Codex flagged
that `b` is not one of cmp's suffix letters (od takes it, cmp does
not); probing the rest of the set found three more divergences in the
same function, plus two of my own that the first version of
integ/unix/cmp/{n,i}.json had pinned as golden:
- cmp's letters are kKMGTPEZY with the B/iB variants -- no b/c/w and
no lowercase past k, so `-n 1b` is exit 2. New CMP_SIZE_UNITS,
separate from OD_SIZE_UNITS.
- the ceiling is INTMAX, not UINTMAX: 7E passes, 8E/1Z/1Y do not, and
overflow reports as the same invalid-value error, not od's "too
large". Q/R are absent from diffutils 3.10's gnulib, so `0Q` is
invalid where `0Z` is a valid zero.
- the count reads at base 0: `-n 010` is 8 bytes, `0x400` is 1024.
The decoder is one parse_base0/parseBase0 twin shared with od,
which had the rule inline; int(s, 0) cannot stand in because py3
rejects `010`.
- the Try-help line carries the `cmp: ` prefix (diffutils routes it
through error()). USAGE_HINT_PREFIX already knew this; the string
was hand-written and bypassed it, so it is built by a named
usage_hint/usageHint that extra_operand_error shares.
- a bad SKIP1 names the whole SKIP1:SKIP2 pair, a bad SKIP2 names
only itself, matching where xstrtoumax stopped.
OD_COUNT_PATTERN becomes XSTRTOUMAX_PATTERN, since cmp shares it.
n.json now pins `-n 1b` and `-n 010` directly. 36 mirrored unit tests
per side, up from 19.
3. Removed the top-of-file docstrings from the three new python test
files, per the CLAUDE.md rule.
Verified: both integ batteries 5648/0 on ram+disk, core vitest 677 files
9040 passed, python suite green, mypy 1874 files, typecheck/eslint/knip
clean, all six gates at baseline. py and ts also diffed against each
other over 42 parseCount inputs: identical accept/reject and identical
below 2**53, differing only in double representation above it (as od
already does), which is documented in the TS docstring.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>