◐ Shell
clean mode source ↗

gh-151483: Make `PyCodeObject._co_unique_id` conditional on `Py_GIL_D… by weixlu · Pull Request #151484 · python/cpython

@weixlu

@weixlu weixlu commented

Jun 15, 2026

edited by bedevere-app Bot

Loading

Copy link Copy Markdown

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.

I have run ./python -m test and it seems fine.

@python-cla-bot

python-cla-bot Bot commented

Jun 15, 2026

edited

Loading

Copy link Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented

Jun 15, 2026

Copy link Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment