Repository navigation
docs(protocols): name ProtocolBase in every register's Raises, as #1016 ruled (#2316) - #2333
Merged
Merged
Conversation
… ruled (#2316) Problem: Link, Internet and Transport register's Raises said "not a Protocol subclass", and the ProtocolBase.__proto__ comment said values are Protocol subclasses, while _next_layer_entry checks ProtocolBase and the other layers already said so. Fix: name ProtocolBase in those three Raises clauses and the __proto__ comment. The error message keeps naming Protocol, per #1016. Docstring and comment only; the AST is unchanged. Test: test_register_class_guard_unit pins ProtocolBase in every register site's Raises and in the __proto__ comments; it fails on origin/main.
Owner
Author
|
Review: GOOD TO GO at
|
Contributor
|
Coverage: 91.56% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
|
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?
docs — documentation onlyDescription
Closes #2316, as #1016 ruled.
Link.register,Internet.registerandTransport.registernow nameProtocolBaseinRaises:, matching theProtocolBase,SCTP,FrameandPCAPNGsites. So does theProtocolBase.__proto__#:comment.Protocol.test_register_class_guard_unitgains two checks: every register site'sRaises:namesProtocolBase, and the__proto__comments sayProtocolBasesubclass.origin/main, 5 failed (Link, Internet, TCP, UDP,protocol.py).code_ofreports all four as docs-only.