]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-112087: Make `list.extend(dict)` behave atomically (#117438)
authorSam Gross <colesbury@gmail.com>
Tue, 2 Apr 2024 14:45:00 +0000 (10:45 -0400)
committerGitHub <noreply@github.com>
Tue, 2 Apr 2024 14:45:00 +0000 (10:45 -0400)
commit027fa2eccf39ddccdf7b416d16601277a7112054
treea116ac1f4e6a1fcd4ef327e742850a92cb146a0f
parent954d616b4c8cd091214aa3b8ea886bcf9067243a
gh-112087: Make `list.extend(dict)` behave atomically (#117438)

Add a special case for `list.extend(dict)` and `list(dict)` so that those
patterns behave atomically with respect to modifications to the list or
dictionary.

This is required by multiprocessing, which assumes that
`list(_finalizer_registry)` is atomic.
Objects/listobject.c