docs: repair the top-level Sphinx pages and cut their timed context - #1014
Conversation
a5dcdf8 to
6d781c0
Compare
|
GOOD TO GO at It also closed the gap I had flagged UNVERIFIED: all 140 I took two of its three optional suggestions, now at
I left the third (the dropped One pre-existing cross-document contradiction it surfaced is fixed in the sibling PR, not here. Delta re-review dispatched. Citations stay frozen at the new head and no file is wider than |
- `ext.rst` imported and called `pack2chain`, which does not exist. The real name is `packet2chain` (`pcapkit/toolkit/scapy.py:70`), so the sample raised `ImportError` as written; a NOTE three lines above already had it right. - `ext.rst` and `index.rst` said engines, reassembly and flow tracing are implemented as `Engine`, `Reassembly` and `TraceFlow` subclasses. All eight shipped engines and all three concrete reassembly and trace-flow classes derive from the `*Base` classes; registration lives on the public class's `__init_subclass__`. Both halves are now stated. - `ext.rst`'s `BufferID` comment described separate IPv4 and IPv6 shapes with an SPI. `foundation/reassembly/data/ip.py:26` is one 4-tuple shared through `_AT`, and no reassembly `BufferID` carries an SPI. - `ext.rst` claimed its table lists all protocol classes; `pcapkit/__init__.py` exports 39 and the table has 38, missing `IPv6_Ext`. The universal is dropped rather than the 255-column grid table edited. - `index.rst` cited "the 12 such parameters in `pcapkit.corekit.io`". An AST count gives 13 methods declaring positional-only parameters, all on `SeekableReader`, and 0 module-level functions; 12 matches no reading, so it now names the methods. - Fixes invalid indentation in a dumper sample, a pyshark-on-3.13 contradiction against the page's own measured table, two nested-markup defects, four typos and an unused hyperlink target. - Cuts timed context per #719, including a 2020 `sphinx-quickstart` banner. `.. deprecated:: 0.8.0` and the changelog's version-bounded prose stay. Citations are frozen: `changelog.rst`'s 19 bare `#nnn` are byte-identical. `tests/project`: 268 passed, 1 skipped, 864 subtests passed. Part of #719.
6d781c0 to
75ef52b
Compare
|
GOOD TO GO at It confirmed both fixes. The restored warning reads naturally and matches It then caught that my own summary phrase was imprecise: "across the schema, protocol and foundation modules" covers only 10 of those 12, since On the vague reason in the restored warning: it did not derive the real mechanism and declined to invent one, which is the right call. It stays as Re-verified at the reviewed head: citations unchanged ( It also agreed with leaving the third suggestion alone — the dropped Merge-order note: this PR and #1011 should land in the same wave, or this one first. |
make pylint,make mypy,make isort) — N/A, no Python changedmake testpasses, and a test case covers the change — I rantests/projectonly (268 passed, 1 skipped, 864 subtests), not the full suitedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, prose only, no user-visible behaviourWhat 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 four depth-1 pages under
docs/source/—changelog.rst,demo.rst,ext.rst,index.rst— as a slice of #719. −37 lines, 102 insertions / 139 deletions.This slice turned out to be mostly accuracy, not concision, and two of the fixes are broken sample code rather than stale prose:
ext.rstimported and calledpack2chain, which has never existed. The function ispacket2chain(pcapkit/toolkit/scapy.py:70, exported at:64), so the documented sample raisedImportError— while a NOTE three lines above spelled it correctly. A second sample hadreturn selfindented 12 spaces under an 11-spacewith.The
*Basesplit is undocumented in three places.ext.rstandindex.rstsaid engines, reassembly and flow tracing are written asEngine,ReassemblyandTraceFlowsubclasses. All eight shipped engines subclassEngineBase(engines/engine.py:81, withEngine(EngineBase[_T])at:213), andreassembly/ip.py:33,reassembly/tcp.py:28,traceflow/tcp.py:35all sit on their*Base. Registration is on the public class's__init_subclass__. This is the same conflation #513 hit from the other side.Two counts were wrong and I re-derived both myself rather than taking them on trust.
pcapkit/__init__.pyexports 39 protocol classes against a table of 38 — the absentee isIPv6_Ext; the universal claim is dropped rather than a 255-column grid table rewritten. Andindex.rst's "the 12 such parameters inpcapkit.corekit.io" matches nothing measurable: an AST count gives 13 methods declaring positional-only parameters, all onSeekableReader, 27 such parameters countingself, 14 without, and 0 module-level functions. It now names the 13 methods, which is whatbpc-poseuractually trips on.Also fixed: a pyshark-on-3.13 prerequisite that contradicted the page's own measured timing table, two genuine nested-inline-markup defects (a literal inside bold, which renders the backticks visibly with no Sphinx warning), four typos, and an unused hyperlink target.
Citations are frozen per the ruling on #719 —
changelog.rstcarries 19 bare#nnnand all are byte-identical. Timed context is cut, including the 2020sphinx-quickstartgenerator banner;.. deprecated:: 0.8.0and the changelog's version-bounded narrative stay.Not done: no Sphinx build. A docutils structural parse of all four pages with roles stubbed came back with zero errors or warnings, and the new cross-reference targets (
EngineBase,ReassemblyBase,TraceFlowBase,SeekableReader) were each confirmedautoclass'd — but the project builds without-n/-W, so a build would not have checked them anyway. The 38:class:targets insideext.rst's grid table are not individually audited; only the membership claim was. The pyshark-3.13 fix rests on the page's own measured table, not on a re-measurement.