Repository navigation
fix(const): find hyphenated HTTP methods by value in Method._missing_ (#2284) - #2351
Merged
Merged
Conversation
Owner
Author
|
Review: NEEDS CHANGES at
|
…#2284) Method._missing_ upper-cased the value and checked member names only, so Method('baseline-control') and Method('version-control') minted unregistered members (idempotent=False) instead of returning BASELINE_CONTROL and VERSION_CONTROL, whose names differ from their values. Fall back to _value2member_map_ with the upper-cased value before minting. Changed in the vendor template and mirrored identically into the generated pcapkit.const.http.method. Test: tests/const/test_const_method_missing_value_2284_unit.py covers both methods in any case, non-method strings still minting, get() staying case-sensitive, and template parity.
JarryShaw
force-pushed
the
fix/2284-http-method-hyphen
branch
from
October 27, 2026 02:23
501a9f1 to
78543cb
Compare
Owner
Author
|
Amended |
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 #2284.
Method._missing_now also looks up_value2member_map_with the upper-cased value before minting an unregistered member, so a hyphenated method likebaseline-controlresolves to its real member (with its registryidempotent/safeflags) in any case.origin/main. Passing on the rebased head.