Skip to content

[3.14] gh-137288: Fix bug where boolean expressions are not associated with the correct exception handler (GH-137310). #137427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 12, 2025

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Aug 5, 2025

…ociated with the correct exception handler (pythonGH-137310).

(cherry picked from commit 1f2026b)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@encukou
Copy link
Member

encukou commented Aug 11, 2025

Re-applying the blocker tag since the issue was closed.

@encukou
Copy link
Member

encukou commented Aug 11, 2025

Changing the MAGIC_NUMBER for a maintenance release requires discussion in python-dev and notification of community stakeholders.

IMO, fixing it in RC is probably the best thing to do, though it is pretty unfortunate.
@hugovk Your thoughts on this?

(cc @hroncok)

@hroncok
Copy link
Contributor

hroncok commented Aug 11, 2025

Oh. We will branch Fedora 43 tomorrow (which doubles the fun). We can handle this, it's just a tad tedious.

@hugovk I'd appreciate some extra time for our rebuild, ideally by releasing rc2 with this fix sooner than planned and adding rc3 to the release schedule instead. Alternatively, we can backport this ourselves, but then our next build of rc1 gains a rc2-like magic number, which might be confusing.

@encukou
Copy link
Member

encukou commented Aug 12, 2025

I've bumped the version in the test, and I've opened the discussion on python-dev list Discourse, as the test requested: https://discuss.python.org/t/heads-up-possible-pyc-magic-number-change-in-3-14-0rc2/102095

I don't think this is worth spinning up the release machinery -- that's a lot of work for multiple people. If we want to avoid confusion for Fedora users, maybe skip rc2 (reserving it for rc1 with this patch), and release rc3 instead. (But I'm not sure what the impact of skipping a RC version is.)

But, @hugovk, it would be good to merge this ASAP.

@hugovk
Copy link
Member

hugovk commented Aug 12, 2025

Thanks Petr for approving this PR and opening the discussion.

Let's merge this now. I'll have a think about doing an early rc2 and extra rc3, I'd prefer that over skipping an rc2.

@hugovk hugovk merged commit 0ccf244 into python:3.14 Aug 12, 2025
45 checks passed
hroncok pushed a commit to fedora-python/cpython that referenced this pull request Aug 12, 2025
…ociated with the correct exception handler (pythonGH-137310). (python#137427)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@@ -278,6 +278,7 @@ Known values:
Python 3.14a7 3623 (Add BUILD_INTERPOLATION & BUILD_TEMPLATE opcodes)
Python 3.14b1 3624 (Don't optimize LOAD_FAST when local is killed by DELETE_FAST)
Python 3.14b3 3625 (Fix handling of opcodes that may leave operands on the stack when optimizing LOAD_FAST)
Python 3.14b5 3626 (Fix missing exception handlers in logical expression)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should say 3.14rc2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I opened #137665 to also add the missing 3.14 numbers to main and then we can backport.

@hroncok
Copy link
Contributor

hroncok commented Aug 12, 2025

I'll have a think about doing an early rc2 and extra rc3, I'd prefer that over skipping an rc2.

I am probably OK backporting this. No need for an actual release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker type-bug An unexpected behavior, bug, or error
Projects
Development

Successfully merging this pull request may close these issues.

4 participants