-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
topic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The PyCell_GET
and PyCell_SET
macros are not safe for free-threading builds. First, they don't the correct locking. Second, PyCell_GET
returns a borrowed reference.
For CPython internals, the usages of these macros can be replaced (either with PyCell_GetRef()
, PyCell_SetTakeRef()
, or similar). For external API users, these macros will need to be marked as deprecated, at least for free-threaded builds.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
topic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error