1.8.0 – 2026-11-26¶
1.8.0 splits parsing a protocol from constructing one: calling a protocol class
with a file parses it, calling it with fields alone builds one, and
from_file and from_fields are the explicit pair. A parse takes no field,
its stops and context only by keyword, and analyze dispatches a payload as
a frame dispatches its next layer. Development moves to a develop branch,
and the documentation is versioned on Read the Docs. Its breaking changes, each
marked a breaking change to and ending with how to migrate, are to the
protocol signatures.
pcapkit.const¶
Changed¶
a per-transport
AppTypemember declares only what differs from its registry: its transport comes from the registry’s__transport__and its service name defaults to its own name, soexp2 = 1022, 'exp2', TransportProtocol.tcpbecomesexp2 = 1022(#3055, #3060). No member’s value,svc,portorprotochanges. The crawler inpcapkit.vendor.reg.apptypewrites that form, so the generated modules shrink accordingly.AppType.__new__’snameloses its'<null>'default.
pcapkit.foundation¶
Added¶
keyword-only
layer,protocolandcontextonip_datagram()andtcp_datagram(), so each parses the payload asDatagram.packetdoes under an extraction given them; a call without them is unchanged (#2947, #3057).
Fixed¶
TCP flow tracing with
analyze=Trueparsed each reassembled payload with none of the extraction’slayer,protocolandcontext, so a stop was ignored and an ESP payload was not decrypted. Under the PCAP and PCAP-NG engines each flow’s reassembler takes them, as TCP reassembly does; the third-party engines hand none, as for reassembly (#2946, #3058).
pcapkit.protocols¶
Changed¶
a breaking change to calling a protocol class, which parses or constructs by the shape of the call (#2840, #3081, #3061, #3069, #3073, #3083, #3090).
Proto(file, length=None, /, *, layer=None, protocol=None, context=None)parses, as the newProtocol.from_filedoes, andProto(*, context=None, **fields)constructs, as the newProtocol.from_fieldsdoes; both dispatch through a versioned family’s base as the call does.fileandlengthare positional-only, and a keyword is never one of them:file=orlength=is a field, refused unless the class’smaketakes it. A parse refuses every keyword but the stops,contextand the class’s own parse keywords, such asframedonDNSandversionon a versioned family’s base, now checked against the member. So_layer,_protocol,__context__andpacketraiseTypeError,layer='none'andlayer='null'raiseFormatErrorrather than setting no stop, aprotocolorcontextof the wrong type raisesRegistryError, andIPv4(octets, version=6)raisesProtocolError. A construction takes the context ascontext; an unknown keyword,_layer,_protocoland__context__included, raises the newUnexpectedKeyword, anUnsupportedCallthat is aTypeErrortoo, andProto(None)raisesTypeError, where it constructed. A protocol overriding__init__takesfiledefaulting toNO_VALUE, then its own parse keywords, the stops,contextand**fields, as Customisation & Extensions shows. To migrate,TCP(data, _layer='Transport', __context__=ctx)becomesTCP(data, layer='Transport', context=ctx),TCP(file=data, length=n)becomesTCP(data, n), and a construction’s__context__=ctxbecomescontext=ctx.a breaking change to the protocol methods that build or parse, which take the construction’s or the parse’s keywords alone (#2840, #3069, #3073). Every protocol’s
maketakes its fields by keyword only.Protocol.from_datatakesdatapositional-only and the context ascontext, refusing__context__,_layerand_protocolwithUnexpectedKeyword, and no longer runs__init__, soProtocol.__reconstructing__is removed.Protocol.analyzeandTransport.analyzetake the code or ports and the payload positional-only, thenlayer,protocolandcontextalone, where they handed any keyword on to the parse.pcapkit.protocols.protocol.OUT_OF_BAND_KEYWORDSis removed, with no alias. To migrate, passmakeits fields by name,UDP.from_data(data=info, __context__=ctx)becomesUDP.from_data(info, context=ctx), andIPv4.analyze(6, payload, _layer='Transport')becomesIPv4.analyze(6, payload, layer='Transport').a breaking change to
SCTP.analyze: it takes the PPID of the DATA or I-DATA chunk carrying the payload, asSCTP.ppidreads it, and dispatches as an SCTP frame does, where it inheritedTransport.analyzeand looked the port pair up among the PPIDs, so its result could differ from the frame’s (#3068, #3071). A port pair now falls back toRaw. To migrate,SCTP.analyze((src, dst), payload)becomesSCTP.analyze(ppid, payload).
Fixed¶
a payload parsed by
Protocol.analyze,Transport.analyze,ip_datagram()or reassembly was dispatched unlike a frame’s next layer (#2945, #3066).Transport.analyzelooks up the lower port, unless only the higher one is registered, where it took the source port whenever that was registered, so a reassembled payload from port 443 to port 80 parses as HTTP rather than as a failed TLS, and aRawfallback records the lower port. A reassembled IP payload gets the datagram’s addresses and IP version, as a frame’s IP layer hands them on, so an ESP Security Association keyed by destination applies to it. A stop atIPv6_Fragkeeps a reassembled IPv6 payload asRaw.a frame parsed with a
protocolstop at an IPv6 extension header – Hop-by-Hop, Routing, Fragment, Destination Options, AH, Mobility, HIP or any other the walk parses – was parsed past it.IPv6’s extension-header walk ends at that header, matched by name or by class, and the rest of the packet is IPv6’sRawupper layer, as at a stop at IPv6 itself. A stop ahead of the Fragment header leaves it unread, so the frame gives IPv6 reassembly nothing (#3067, #3072).
Project infrastructure¶
Changed¶
the next minor release is developed on a
developbranch, andmainis the released line: new work targetsdevelopand a patch fixmain, CI runs on both, and Dependabot’s version updates targetdevelop(#2942, #3056). The new Sync Develop workflow opens one pull request mergingmainintodevelopwhiledeveloplacks its commits, fromsync/main, a mirror ofmaineach run moves, so updating that pull request’s branch never writes tomain(#3079). Publishing, the vendor refresh and releases stay onmain.the documentation is versioned on Read the Docs, at https://pypcapkit.jarryshaw.me/:
latestbuildsdevelop,stablebuildsstable, a mirror ofmainthe new Stable Branch workflow keeps at its head, and each release from the first whose tag carries.readthedocs.yamlbuilds a version of its own (#3077, #3078, #3082, #3086, #3087, #3088). GitHub Pages servesmain’s build alone, at https://jarryshaw.github.io/PyPCAPKit/, with aversions.jsonmapping each version to its Read the Docs URL and a404.htmlsending a path under a listed version, such as/PyPCAPKit/stable/, to the same page there. The sidebar there links to Read the Docs, whose own menu switches versions.
Fixed¶
the job summaries of Unit Tests’ Engines jobs and of the Engine Benchmark showed their tables as source, since GitHub renders each step’s summary on its own. Each step writes a whole table, and the benchmark’s summary shows Markdown tables with the reST beneath, for pasting into the docs (#3054, #3059).