Skip to content

Remove _merge_url_query once httpx2 merges params into the URL query #146

Description

@lesnik512

Context

httpx2 replaces a URL's query string whenever params are sent, including client-level params (pydantic/httpx2#905). #145 (released in 0.17.1) works around this with _merge_url_query in src/httpware/client.py, applied in build_request, _prepare_request and stream on both Client and AsyncClient.

Blocked on

An httpx2 release that merges params into the existing URL query. Candidate fix: pydantic/httpx2#966 (open, unreviewed as of 2026-09-28). An earlier attempt, pydantic/httpx2#1026, was closed unmerged.

When unblocked

  1. Check the upstream semantics match ours: per-request params win on the same key, repeated URL keys are kept, client params keep the URL query, params={} keeps the URL query.
  2. Raise the httpx2 floor in pyproject.toml to the release containing the fix.
  3. Delete _merge_url_query and its six call sites; pass url straight through again.
  4. Keep tests/test_url_query_merge.py: it should pass unchanged against upstream behaviour. If a case fails, upstream semantics differ and that is a behaviour change for users to call out in the release.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions