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(protocols): Info field order follows PyPy's attribute layout, not the declared fields #2003
On PyPy, Info field order depends on earlier instances of the same class. PyPy reorders an instance's attribute storage to match the first instance it saw, and Info reads its field order from those attributes. So to_dict(), and anything rebuilt from it, can list fields in a different order from CPython.
Construction is keyword-only, yes. The order still matters on the way back, when a protocol is rebuilt from its to_dict(). Two lookups infer structure from key order:
Protocol._lookup_payload treats the last nested key as the payload (keys[-1]);
IPv6._lookup_exthdr rebuilds the extension-header chain by walking items(multi=True) in order.
On PyPy, with main's Info, a cut frame rebuilds at 902 octets against 14273 on the wire, and an IPv6 hop-dst-dst chain at 56 against 76. Details are in #2009.
If order shouldn't matter, the fix belongs in those two lookups (option 2 on #2009). The payload and header chain would come from the protocol's declared structure, so Info needs no recorded order and #2009 closes. Shall I go that way?
so Protocol should look up payload by the protocol name, not the last key; IPv6 extension header chain is ordered using the OrderedMultiInfo and that one is specifically ordered.
Understood: Protocol._lookup_payload will find the payload by the protocol's name rather than by the last key. A worker has started. It will also check, on PyPy, why the repeated-extension-header rebuild still fails when the chain sits in an OrderedMultiInfo. #2009 closes as superseded.
Activity
JarryShaw commentedon Oct 21, 2026
i think the order is not required to preserve? Info and Schema construction are keywords only.
JarryShaw commentedon Oct 21, 2026
Construction is keyword-only, yes. The order still matters on the way back, when a protocol is rebuilt from its
to_dict(). Two lookups infer structure from key order:Protocol._lookup_payloadtreats the last nested key as the payload (keys[-1]);IPv6._lookup_exthdrrebuilds the extension-header chain by walkingitems(multi=True)in order.On PyPy, with
main'sInfo, a cut frame rebuilds at 902 octets against 14273 on the wire, and an IPv6hop-dst-dstchain at 56 against 76. Details are in #2009.If order shouldn't matter, the fix belongs in those two lookups (option 2 on #2009). The payload and header chain would come from the protocol's declared structure, so
Infoneeds no recorded order and #2009 closes. Shall I go that way?JarryShaw commentedon Oct 21, 2026
so Protocol should look up payload by the protocol name, not the last key; IPv6 extension header chain is ordered using the OrderedMultiInfo and that one is specifically ordered.
JarryShaw commentedon Oct 21, 2026
Understood:
Protocol._lookup_payloadwill find the payload by the protocol's name rather than by the last key. A worker has started. It will also check, on PyPy, why the repeated-extension-header rebuild still fails when the chain sits in anOrderedMultiInfo. #2009 closes as superseded.fix(protocols): hold the IPv6 extension headers in extension_headers (#…
fix(protocols): carry the dispatch keys in to_dict, guess no payload (#…
fix(protocols): rebuild the IPv6 chain from __exthdr__ alone (#2003)
docs(corekit): document Info.__included__ and Data's metadata lists (#…
fix(protocols): keep __exthdr__ as a tuple of parser and info pairs (#…
fix(protocols): find the payload by protocol name and follow IPv6 nex…
docs(protocols): fifth whole-repo pass over application, misc and the…