Repository navigation
fix(httpv2): accept a plain dict of SETTINGS (#2223) - #2241
Merged
Merged
Conversation
Owner
Author
|
Review: NEEDS CHANGES at
|
HTTP._make_http_settings took a dict branch but called settings.items(multi=True), so a plain dict raised a stdlib TypeError. Call items(multi=True) only on a MultiDict, and plain items() otherwise. Widen the settings annotation and Args to name dict. Test: a plain dict builds the same octets as a list of pairs, keeps insertion order and parses back; an OrderedMultiDict keeps repeated ids.
JarryShaw
force-pushed
the
fix/2223-http2-settings-dict
branch
from
October 26, 2026 03:55
8e0d287 to
9ce7f89
Compare
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?
fix— bug fixDescription
Closes #2223.
HTTP._make_http_settingsaccepted adictbut always calledsettings.items(multi=True), which onlyMultiDicthas, so{1: 2}raisedTypeError: dict.items() takes no keyword arguments.items(multi=True)on aMultiDict,OrderedMultiDictincluded, and plainitems()otherwise. The annotation andArgs:name a plaindict.tests/protocols/application/test_httpv2_settings_dict_2223_unit.py.{1: 2}and{Setting.HEADER_TABLE_SIZE: 2}build000006040000000000000100000002, the same octets as the list.dictbuilds an empty frame.OrderedMultiDictkeeps repeated identifiers.origin/main, 5 failed with theTypeError.tests/protocols/applicationgives 249 passed. The docstring contract and tier guard give 140 passed.