Repository navigation
docs(utilities): drop the change-over-time narration from the small subtrees - #1017
Conversation
…ubtrees Covers `pcapkit/utilities/`, `toolkit/`, `dumpkit/`, `interface/` and the top-level `pcapkit/*.py`. Timed-context cuts per #719, plus three prose repairs a cross-review asked for. - `exceptions.py` carried the most: the `BaseError` bullets, the `stacklevel` "negated" note, the `_excepthook` `limit=0` note and the `_threading_excepthook` paragraph all narrated what the design used to be. They now state why it is what it is. The `extract_stack()`-versus-frame-walk rationale is kept. - `interface/misc.py`, `dumpkit/pcap.py`, `common.py`, `__main__.py`, `compat.py`, `decorators.py` and `toolkit/scapy.py` lose "used to", "now", "today", "previously" and "no longer". - The `Formats` comment claimed the registries' eight keys are what make the aliases spellable. They are not -- the `Literal` listing all eight is. Measured: the eight keys resolve to **four** dumpers, so the old list of three aliases also omitted `'text'`. It now names every alias by its target. - `__main__.py` had a cut leave "only worked" with nothing to anchor it; now present tense. `dumpkit/pcap.py` called `UInt32Field` "the alternative way to pack them", asserting uniqueness for a class the dumper does not use -- it packs with `struct.Struct('<IIII')`. No code changed: for all 8 files the AST with docstrings stripped is identical to `main`. Citations are frozen -- per-file multisets byte-identical, `GH-356` and CPython's `gh-90500` included. `pcapkit/corekit/multidict.py` is untouched, and that is **not** an exemption claim: it says it is "inspired and based on" Werkzeug rather than a verbatim port, and it raises pcapkit's own `MissingKeyError` and `UnsupportedCall`, which a verbatim port would not. It is also outside this slice. How much is verbatim is unknown, and werkzeug is not installed, so it needs an upstream diff first. `tests/project`: 268 passed, 1 skipped, 864 subtests passed. Part of #719.
751f5b5 to
1409c29
Compare
|
NEEDS CHANGES at The required fix was a causal link I had introduced. The rewritten Measuring the alias structure made it worse than the review thought: the eight keys resolve to four dumpers — Two smaller ones also fixed: a cut had left "only worked" in A claim of mine is withdrawn. I wrote that Re-verified at the new head: AST identical to |
|
GOOD TO GO at It settled the one thing I could not. I asked whether And it explained why the question arose at all: the Tree group's file extension is It also verified the One pre-existing imprecision it flagged, not a regression: the sentence says "passing the strings", plural for It accepted the |
make pylint,make mypy,make isort) — N/A, no code changed; proved by AST comparisonmake testpasses, and a test case covers the change — I rantests/project(268 passed, 1 skipped, 864 subtests) andtests/utilities tests/toolkit tests/interface, not the full suitedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, docstrings and comments onlyWhat is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingchore— anything elseDescription of your pull request and other information
The small-subtree remainder of
pcapkit/for #719 —utilities/,toolkit/,dumpkit/,interface/and the three top-levelpcapkit/*.pyfiles. 8 of 26 files changed, +40/−57.This slice is timed-context work and nothing else, and I would rather say so than imply a concision pass that did not happen. The prose in these subtrees was already dense, so the agent that swept it cut change-over-time narration and left rationale-heavy passages —
exceptions.pyespecially — alone. The deeper concision pass onexceptions.pyand theregister_apptypeprose remains open under #719.Most of the change is in
pcapkit/utilities/exceptions.py, where four passages narrated what the design used to be rather than what it is: theBaseErrorbullets, thestacklevel"negated" note, the_excepthooklimit=0note, and the_threading_excepthookparagraph. They now state the reason directly. Theextract_stack()-versus-frame-walk rationale is kept, as is bothimportlib.reloadcaveat.No code changed, and it is checked rather than asserted. For all 8 files the AST with every docstring stripped is byte-identical to
main. Citations are frozen: 17 occurrences, per-file multisets identical. I also confirmed the one factual claim the sweep made in passing — thatBaseErrordoes not setsys.tracebacklimit— by grep: the name appears only inside docstrings atexceptions.py:111,:185,:341,:350.pcapkit/corekit/multidict.pyis deliberately untouched. Its module docstring says the implementation is based on Werkzeug, and a verbatim upstream port is exempt from house style. werkzeug is not installed in the repo venv, so it could not be diffed against upstream to establish whether its docstrings are verbatim — it needs that diff before anyone sweeps it. 626 lines, 0 citations.Not verified: no Sphinx build, and no mechanical sweep for nested inline markup or split literals across the untouched text of these files. The 6
tests/dumpkitfailures seen during the sweep are allFileNotFoundError: sample capture 'test.pcapng' not found— the generated-fixture gap in a fresh worktree, not this diff;tests/dumpkitcollected and imported fine.