Skip to content

Snapshot iterable query keys before removal - #207

Open
muneikh wants to merge 1 commit into
gruns:masterfrom
muneikh:fix-query-removal-key-iterators
Open

muneikh wants to merge 1 commit into
gruns:masterfrom
muneikh:fix-query-removal-key-iterators

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026

Copy link
Copy Markdown

Removing query parameters with an iterator over the query鈥檚 own keys raises RuntimeError: OrderedDict mutated during iteration. This also affects filtered generators over those keys and can leave a partially modified query.

Snapshot iterable keys or items before removal, matching the existing handling of mapping inputs. Add regressions for removing every key and filtering out a retained key; both fail before the change.

Validation: all 15 Query tests and changed-file Flake8 checks pass. The full suite has 76 passes and three legacy IPv6/URL failures on Python 3.13; the same three failures reproduce with unchanged source and the two new tests excluded (74 passes).

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