-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
dict.update() mutation check too broad #132617
Copy link
Copy link
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
The
dict.update()modification check can be erroneously triggered by modifications to different dictionaries that happen to share the underlying keys objects.For example, in the following program, the creation and modification of the
f2object can lead to an incorrectRuntimeErrorraised in the main thread that operates on distinct dictionaries.Linked PRs
dict.update()mutation check #134815dict.update()mutation check (gh-134815) #135581dict.update()mutation check (gh-134815) #135582