◐ Shell
clean mode source ↗

Make `PyCodeObject._co_unique_id` conditional on `Py_GIL_DISABLED`

Feature or enhancement

Proposal:

PyCodeObject._co_unique_id is currently declared unconditionally, but its usage is entirely in free-threaded code paths. So maybe we can make _co_unique_id only present when Py_GIL_DISABLED is enabled.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs