| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
can_modify_dict() is stricter than ASSERT_DICT_LOCKED() for frozendict. It uses PyUnstable_Object_IsUniquelyReferenced() which matters for free-threaded builds. Replace anydict_setitem_take2() with setitem_take2_lock_held(). It's no longer useful to have two functions.
There was a problem hiding this comment.
Just to share my thoughts:
It does not mean -1 on this change but prefer to listen other core devs opinion.
Sorry, something went wrong.
There was a problem hiding this comment.
I changed my mind after DM with Victor.
Since the current assertion is only meaningful when the refcount is not 1.
cpython/Include/internal/pycore_critical_section.h
Lines 55 to 58 in c6a142f
Sorry, something went wrong.
|
This change does multiple things:
|
Sorry, something went wrong.
|
Merged. Thanks for your review @corona10. |
Sorry, something went wrong.
can_modify_dict() is stricter than ASSERT_DICT_LOCKED() for frozendict. It uses PyUnstable_Object_IsUniquelyReferenced() which matters for free-threaded builds. Replace anydict_setitem_take2() with setitem_take2_lock_held(). It's no longer useful to have two functions.
can_modify_dict() is stricter than ASSERT_DICT_LOCKED() for frozendict. It uses PyUnstable_Object_IsUniquelyReferenced() which matters for free-threaded builds. Replace anydict_setitem_take2() with setitem_take2_lock_held(). It's no longer useful to have two functions.
| Back | FazBrowse Home | New Git URL |
can_modify_dict() is stricter than ASSERT_DICT_LOCKED() for frozendict. It uses PyUnstable_Object_IsUniquelyReferenced() which matters for free-threaded builds.
Replace anydict_setitem_take2() with setitem_take2_lock_held(). It's no longer useful to have two functions.