Repository navigation
Write MutableMapping paths through mapping keys - #400
Merged
dgilland merged 1 commit intoNov 1, 2026
Merged
Conversation
agammann
approved these changes
Nov 1, 2026
agammann
left a comment
Contributor
There was a problem hiding this comment.
I checked both path-writing branches at ab8a2ee. UserDict and ChainMap now go through their mapping keys, and missing nested paths create dictionaries rather than list-style containers. The ten new cases for set_, set_with, update, and update_with pass locally on Python 3.14.8; I did not run the full suite or supported-version matrix.
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.
Path setters treat UserDict and ChainMap as ordinary objects, assigning attributes instead of mapping entries. This silently leaves the mapping data unchanged. Dispatch mutable mappings through their key interface, including selection of intermediate dictionary containers.
Ten regression cases cover set_/set_with, update/update_with, nested values and integer keys across both standard-library mapping classes. All ten fail before the fix. Python 3.12: 3089 tests pass with 100% coverage. Python 3.10: 3087 pass with the two real-time debounce tests excluded; repeated complete runs hit those existing timing failures, and unchanged upstream reproduces test_debounce. Ruff and source mypy pass. Final diff inspected.
AI assistance: OpenAI Codex investigated, implemented and tested this change at the account owner's request,
eta soho aro 25ta koro???. No independent human review is claimed.