Skip to content

gh-155486: Allow non-compact integers in TO_BOOL_INT - #155531

Merged
Fidget-Spinner merged 4 commits into
python:mainfrom
marinelay:gh-155486
Aug 13, 2026
Merged

gh-155486: Allow non-compact integers in TO_BOOL_INT#155531
Fidget-Spinner merged 4 commits into
python:mainfrom
marinelay:gh-155486

Conversation

@marinelay

@marinelay marinelay commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This PR adds an exact-integer guard, _GUARD_TOS_EXACT_INT, for TO_BOOL_INT, allowing non-compact exact integers to remain specialized

@marinelay
marinelay requested a review from markshannon as a code owner August 11, 2026 04:41
@bedevere-app

bedevere-app Bot commented Aug 11, 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.

@python-cla-bot

python-cla-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

Comment thread Python/bytecodes.c
@cocolato

Copy link
Copy Markdown
Member

thanks for doing this, could you please add a new test to test the guard elimination?

@marinelay

Copy link
Copy Markdown
Contributor Author

thanks for doing this, could you please add a new test to test the guard elimination?

Sure. I added a test for the guard elimination.
Please let me know if any changes are needed.

Comment thread Lib/test/test_capi/test_opt.py
@cocolato

cocolato commented Aug 12, 2026

Copy link
Copy Markdown
Member

LGTM now. The failed CI seems unrelated to the current changes I'll look into the failed CI. @Fidget-Spinner If you have time, please take a look, thanks!

@cocolato

cocolato commented Aug 13, 2026

Copy link
Copy Markdown
Member

I found that the CI failure was caused by a bug in GDB 17.1 on AArch64. I’ll try to fix the JIT GDB tests later.

@Fidget-Spinner
Fidget-Spinner merged commit cd98657 into python:main Aug 13, 2026
81 of 83 checks passed
@Fidget-Spinner Fidget-Spinner added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 13, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @marinelay for the PR, and @Fidget-Spinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @marinelay and @Fidget-Spinner, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker cd98657f0a8767e44c1db40dadedb5e278f7bdac 3.15

@Fidget-Spinner

Copy link
Copy Markdown
Member

@marinelay can you please open a backport?

@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155699 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 13, 2026
@bedevere-app

bedevere-app Bot commented Aug 13, 2026

Copy link
Copy Markdown

GH-155700 is a backport of this pull request to the 3.15 branch.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants