Repository navigation
Conversation
13 of 24 tasks
DinoV
force-pushed
the
gh149816
branch
2 times, most recently
from
October 22, 2026 23:17
2f8aa46 to
72a0e10
Compare
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.
There's a couple of remaining issues with doing a setaddr. If we have a split dictionary we're not increfing the dictionary. Also, when we insert a split key it takes a lock which can cause the object/dict locks to be released so we need to guard against that.
The code here is pretty complex so it's also an attempt to simplify it.
_PyObject_StoreInstanceAttributeloses any Py_GIL_DISABLEd ifdef's, instead we just have the main path withPy_BEGIN_CRITICAL_SECTIONandFT_ATOMIC_LOAD_UINT8and so on just turn into nothing when we're in the free threaded build. I've also just updated things to go directly to_PyDict_SetItem_LockHeldwhen we're doing the dictionary version and madestore_instance_attr_lock_heldonly be used when we don't have a materialized dictionary. Going through the fast split dictionary case it dictinsert isn't substantially different but it really complicates reasoning about what's going on here and causes `store_instance_attr_lock_held to need to handle a lot more cases.