Repository navigation
fix(ipv6_ext): stop the base make's keywords leaking into subclasses that ignore them (#2286) - #2358
Merged
Merged
Conversation
Owner
Author
|
Review: NEEDS CHANGES at
|
…that ignore them (#2286) Problem: _declared_keywords unions make signatures over the whole MRO, so IPv6_Ext.make's len and data stayed allowed on every extension header subclass, whose own make ignores them: IPv6_Route(len=99) built the same octets as IPv6_Route(), and a misspelling was steered to the dead keyword. Fix: a new ProtocolBase.__own_make_keywords__ marker, read per class like the __keywords__ None opt-out, keeps a base's make parameters out of the allowlist once a subclass overrides make. IPv6_Ext sets it; the IPv6_Ext.make note on allowlist widening is corrected. Test: every IPv6_Ext subclass refuses len/data unless its own make declares them and still accepts next; a unit test pins the marker's scope.
JarryShaw
force-pushed
the
fix/2286-ipv6-ext-make-keywords
branch
from
October 27, 2026 03:06
5f182c5 to
64ab232
Compare
Owner
Author
|
Amended |
Owner
Author
|
Ready to merge at
|
Contributor
|
Coverage: 91.58% (unit tier, Python 3.15,
Per-file detail: the |
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix — bug fixDescription
Closes #2286.
ProtocolBase.__own_make_keywords__, letsIPv6_Extkeeplenanddatato its ownmakerather than leaking them to every subclass that overridesmakeand never reads them.IPv6_Route(len=99)now raisesUnsupportedCallinstead of being silently dropped; subclasses that declare their owndata(IPv6_Route,MH) still accept it.origin/main. Passing on the rebased head.