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 AppType member declares only what differs from its registry: its transport comes from the registry’s __transport__ and its service name defaults to its own name, so exp2 = 1022, 'exp2', TransportProtocol.tcp becomes exp2 = 1022 (#3055, #3060). No member’s value, svc, port or proto changes. The crawler in pcapkit.vendor.reg.apptype writes that form, so the generated modules shrink accordingly. AppType.__new__’s name loses its '<null>' default.

pcapkit.foundation

Added

Fixed

  • TCP flow tracing with analyze=True parsed each reassembled payload with none of the extraction’s layer, protocol and context, 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 new Protocol.from_file does, and Proto(*, context=None, **fields) constructs, as the new Protocol.from_fields does; both dispatch through a versioned family’s base as the call does. file and length are positional-only, and a keyword is never one of them: file= or length= is a field, refused unless the class’s make takes it. A parse refuses every keyword but the stops, context and the class’s own parse keywords, such as framed on DNS and version on a versioned family’s base, now checked against the member. So _layer, _protocol, __context__ and packet raise TypeError, layer='none' and layer='null' raise FormatError rather than setting no stop, a protocol or context of the wrong type raises RegistryError, and IPv4(octets, version=6) raises ProtocolError. A construction takes the context as context; an unknown keyword, _layer, _protocol and __context__ included, raises the new UnexpectedKeyword, an UnsupportedCall that is a TypeError too, and Proto(None) raises TypeError, where it constructed. A protocol overriding __init__ takes file defaulting to NO_VALUE, then its own parse keywords, the stops, context and **fields, as Customisation & Extensions shows. To migrate, TCP(data, _layer='Transport', __context__=ctx) becomes TCP(data, layer='Transport', context=ctx), TCP(file=data, length=n) becomes TCP(data, n), and a construction’s __context__=ctx becomes context=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 make takes its fields by keyword only. Protocol.from_data takes data positional-only and the context as context, refusing __context__, _layer and _protocol with UnexpectedKeyword, and no longer runs __init__, so Protocol.__reconstructing__ is removed. Protocol.analyze and Transport.analyze take the code or ports and the payload positional-only, then layer, protocol and context alone, where they handed any keyword on to the parse. pcapkit.protocols.protocol.OUT_OF_BAND_KEYWORDS is removed, with no alias. To migrate, pass make its fields by name, UDP.from_data(data=info, __context__=ctx) becomes UDP.from_data(info, context=ctx), and IPv4.analyze(6, payload, _layer='Transport') becomes IPv4.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, as SCTP.ppid reads it, and dispatches as an SCTP frame does, where it inherited Transport.analyze and 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 to Raw. To migrate, SCTP.analyze((src, dst), payload) becomes SCTP.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.analyze looks 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 a Raw fallback 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 at IPv6_Frag keeps a reassembled IPv6 payload as Raw.

  • a frame parsed with a protocol stop 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’s Raw upper 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 develop branch, and main is the released line: new work targets develop and a patch fix main, CI runs on both, and Dependabot’s version updates target develop (#2942, #3056). The new Sync Develop workflow opens one pull request merging main into develop while develop lacks its commits, from sync/main, a mirror of main each run moves, so updating that pull request’s branch never writes to main (#3079). Publishing, the vendor refresh and releases stay on main.

  • the documentation is versioned on Read the Docs, at https://pypcapkit.jarryshaw.me/: latest builds develop, stable builds stable, a mirror of main the new Stable Branch workflow keeps at its head, and each release from the first whose tag carries .readthedocs.yaml builds a version of its own (#3077, #3078, #3082, #3086, #3087, #3088). GitHub Pages serves main’s build alone, at https://jarryshaw.github.io/PyPCAPKit/, with a versions.json mapping each version to its Read the Docs URL and a 404.html sending 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).