gh-152238: Revert gh-150490 and gh-152200. (gh-152232)

Revert commits:
    gh-151593: Fix dead lock in PyDict insert_split_key() (#152200)
    gh-150490: Raise PyType_Modified for insertion into split dictionary (#150489)

For gh-150489, it violates locking discipline and results in deadlocks,
gh-151593 is an example of it being hit in CI.  The attempted fix 
gh-152200 avoids the deadlock but introduces a data-race.  The race
window is small but can be triggered with pure Python code.
This commit is contained in:
Neil Schemenauer 2026-06-26 11:20:41 -07:00 committed by GitHub
parent 5a549e82b8
commit 9626ef87f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1412 additions and 1308 deletions

View file

@ -1286,6 +1286,7 @@ specialize_attr_loadclassattr(PyObject *owner, _Py_CODEUNIT *instr,
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_OUT_OF_VERSIONS);
return 0;
}
write_u32(cache->keys_version, shared_keys_version);
specialize(instr, is_method ? LOAD_ATTR_METHOD_WITH_VALUES : LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES);
}
else {