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
fix(reassembly): Deferred cannot be pickled under protocol 0 or 1 #2423
Deferred (pcapkit/foundation/reassembly/data/data.py) declares __slots__ with no __getstate__/__setstate__, so it cannot be pickled under pickle protocols 0 or 1 at all — this is independent of the AppType/EnumRegistry pickle fix landing in #2421 and reproduces for any Deferred instance, including a bare Deferred(..., 42, b'x') holding a plain int.
To Reproduce
importpicklefrompcapkit.foundation.reassembly.data.dataimportDeferredd=Deferred(lambdap, b: None, 42, b'x')
pickle.dumps(d, protocol=0) # or protocol=1
Expected behavior
Either Deferred gets a __getstate__/__setstate__ pair compatible with __slots__ (the standard pattern), or the class documents that it requires protocol 2+ (Python's default since 3.0, so likely low real-world impact, but worth stating explicitly if not fixed).
Additional context
Found during review of #2421 (AppType reassembly ports). Protocols 2–5 work correctly. Scoped out of that PR since it's a pre-existing gap, not something #2421 introduced.
Activity
docs(changelog): cite PR #2424 alongside #2423 in the Deferred pickle…
fix(reassembly): make Deferred picklable under protocol 0 and 1 (#2423)
fix(reassembly): make Deferred picklable under protocol 0 and 1 (#2423)
fix(protocols): revert #2432's RegistryError message to name Protocol (…
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base
feat(internet): implement ICMP and ICMPv6, sharing a thin dispatch base