# 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_ <!-- gh-linked-prs --> ### Linked PRs * gh-127272 * gh-130383 <!-- /gh-linked-prs -->