Repository navigation
Match repeated query parameter values in order - #187
Open
bensynapse wants to merge 1 commit into
Open
bensynapse wants to merge 1 commit into
bensynapse wants to merge 1 commit into
Conversation
2 tasks done
jharibo
added a commit
to jharibo/pookx
that referenced
this pull request
Oct 21, 2026
Every expected value was compared against every received value, so ?x=a&x=b never matched. List values now match pairwise and by count. Taken from h2non#187. Co-authored-by: bensynapse <118375461+bensynapse@users.noreply.github.com>
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.
I run Live Tennis API.
pook.get("http://example.com/?x=a&x=b")rejects a GET for that identical URL. The query matcher compares every expected value with every received value.This compares list values pairwise and checks their count. Repeated values must occur in the expected order. Scalar matching and unrelated query keys keep their existing behavior. The params documentation now explains this distinction.
The regression tests cover both URL and params registration across six client paths, including sync and async HTTPX. Eighteen new cases fail with the original matcher.
hatch run cipasses. The full suite passes 264 tests on Python 3.10 through 3.14, with three expected failures per version. PyPy 3.11 passes 263 tests with the same expected failures. Strict documentation builds,hatch build -candtwine check --strictpass.Validation used aiohttp 3.13.3 and urllib3 2.5.0, both within the declared dependency ranges. Without those local pins, newer dependency APIs produce 31 existing failures on unchanged upstream. The two new aiohttp client cases hit the same existing exception.