Repository navigation
fix(loopback): reject an address family that is not an int (#2289) - #2364
Merged
Merged
Conversation
Owner
Author
|
Review: NEEDS CHANGES at
|
Loopback.make range-checked family and then called family.to_bytes with no type check, so True packed as family 1, '2' and None raised TypeError and 2.0 raised AttributeError. A bool or any non-int family now raises the documented ProtocolError "Loopback: invalid address family: ...", from the same check as the range test. Test: test_make_rejects_a_family_that_is_not_an_int pins the message for True, False, '2', 2.0 and None.
JarryShaw
force-pushed
the
fix/2289-loopback-family-type
branch
from
October 27, 2026 04:09
86e7b28 to
3144adc
Compare
Owner
Author
|
Amended |
Contributor
|
Coverage: 91.58% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
|
4 tasks done
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 #2289.
Loopback.makenow type-checksfamilybefore range-checking it, so aboolor anything else that isn't anintraises the documentedProtocolErrorinstead ofTruepacking as1or'2'raising a bareTypeError.origin/main. Passing on the rebased head.