You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(protocols)!: make() takes enum members or ints, dropping the X_default/X_namespace/X_reversed groups #2594
The owner's ruling on #2593 (option 1) sets the convention: make() takes an enum-valued field as the enum member or an int, resolved with the enum's get, with no string-to-member inference inside make(). It also asks that every other make() be reworked to follow it. This carries out the direction pep.rst records under "Deterministic Construction Arguments", which had not been scheduled.
Scope (on main): the make() methods that take the four-argument group X, X_default, X_namespace and X_reversed, resolved by Protocol._make_index inspecting the caller's frame. The heaviest users are mh.py, hip.py, misc/pcapng.py, ipv4.py, ipv6_opts.py and hopopt.py; others include ARP, SSLv2, HTTPv1/HTTPv2, TCP, VLAN, OSPF, the ICMPs, IGMP, AH/ESP, TLS and DTLS. Each such field becomes Enum | int. pep.rst's public resolving helper takes the old four-argument group explicitly, for callers holding a bare string.
Decision needed: what happens to the shipped X_default/X_namespace/X_reversed keywords?
Remove them in 1.6.0 (breaking), as moved shipped names are removed with no re-export, and point callers to the resolving helper (recommended).
Deprecate them for one release with a warning, then remove them.
Recommendation: 1. It matches the house rule against shims, and 1.6.0 already carries other breaking construction changes.
Timing: the change touches most protocol modules, which several open PRs and held branches also edit. Once this is answered, it is blocked until those land.
Owner chose 1, paraphrased: the shipped X_default/X_namespace/X_reversed keywords are removed in 1.6.0, with no deprecation period. Each enum field of make() takes the member or an int, and pep.rst's public helper resolves a bare string for callers that hold one. This is breaking. Blocked: the change touches most protocol modules. It unblocks when no open PR edits pcapkit/protocols/ (gh pr list --state open --json files shows none), so that it lands in one pass without a rebase per protocol.
A worker is preparing this now, for the 1.6.0 release, on top of #2677. It covers every family except radiotap/802.11 and SCTP, which #2657 and #2673 still edit. The PR opens once those have merged. Moved from blocked to wip.
The PR is #2692. A sharded Sonnet cross-review is running: one reviewer per protocol family plus the core resolver, with each required change re-checked independently.
Activity
JarryShaw commentedon Nov 1, 2026
Take 1
JarryShaw commentedon Nov 1, 2026
Owner chose 1, paraphrased: the shipped
X_default/X_namespace/X_reversedkeywords are removed in 1.6.0, with no deprecation period. Each enum field ofmake()takes the member or anint, and pep.rst's public helper resolves a bare string for callers that hold one. This isbreaking.Blocked: the change touches most protocol modules. It unblocks when no open PR edits
pcapkit/protocols/(gh pr list --state open --json filesshows none), so that it lands in one pass without a rebase per protocol.docs(pep): correct stale status lines and drop the redundant release …
JarryShaw commentedon Nov 2, 2026
A worker is preparing this now, for the 1.6.0 release, on top of #2677. It covers every family except radiotap/802.11 and SCTP, which #2657 and #2673 still edit. The PR opens once those have merged. Moved from
blockedtowip.JarryShaw commentedon Nov 2, 2026
The PR is #2692. A sharded Sonnet cross-review is running: one reviewer per protocol family plus the core resolver, with each required change re-checked independently.
refactor(protocols)!: make() takes an enum member or an int, with no …
refactor(protocols)!: make() takes an enum member or an int, with no …
refactor(protocols)!: make() takes an enum member or an int, with no …