Skip to content

Ignore None consistently in URI template list expansions - #161

Open
machines-6657 wants to merge 2 commits into
python-hyper:mainfrom
machines-6657:codex/ignore-none-list-values
Open

machines-6657 wants to merge 2 commits into
python-hyper:mainfrom
machines-6657:codex/ignore-none-list-values

Conversation

@machines-6657

Copy link
Copy Markdown

Summary

Ignore None consistently when expanding list arguments. The 3.0.1 changelog
documents this behavior, but simple/reserved/fragment, query/continuation and
non-exploded semicolon expansions still include the literal text None.
For example, {?x} with x=["a", None, "b"] currently produces
?x=a,None,b; the corrected expansion is ?x=a,b.

The filters use is not None, preserving defined empty strings and numeric zero
and leaving the caller's list unchanged. Regression coverage includes all 16
operator/explode forms, empty/zero controls and mutation checks. Existing empty
collection and mapping behavior is outside this change.

Validation

  • Against the unchanged base implementation, the added regression class has 22
    failing subtests; the mutation controls pass.
  • Python 3.11, Windows: full suite, 61 tests and 102 subtests passed.
  • Black, Flake8, mypy and git diff --check passed.
  • The full upstream interpreter matrix and documentation build were not run.

AI assistance was used to investigate, implement and verify this change.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant