GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.14] gh-137288: Fix bug where boolean expressions are not associated with the correct exception handler (GH-137310). by iritkatriel · Pull Request #137427 · python/cpython

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Aug 5, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

(cherry picked from commit 1f2026b)

  • Issue: Python implicit boolean conversion in logical operations bypasses try/except on 3.14.0rc1 #137288

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iritkatriel
[3.14] pythongh-137288: Fix bug where boolean expressions are not ass…
9f60d4f
…ociated with the correct exception handler (pythonGH-137310).

(cherry picked from commit 1f2026b)

Co-authored-by: Irit Katriel <[email protected]>
@iritkatriel
iritkatriel requested a review from markshannon as a code owner August 5, 2025 19:12
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 5, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 5, 2025
Python implicit boolean conversion in logical operations bypasses try/except on 3.14.0rc1 #137288
Closed
@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error and removed awaiting core review labels Aug 5, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Aug 5, 2025
gh-137288: Fix bug where boolean expressions are not associated with the correct exception handler #137310
Merged
@encukou encukou added the release-blocker label Aug 11, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Release and Deferred blockers 🚫 Aug 11, 2025
@github-project-automation github-project-automation Bot added this to Release and Deferred blockers 🚫 Aug 11, 2025
@encukou

encukou commented Aug 11, 2025

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Aug 11, 2025

Copy link
Copy Markdown
Member

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 reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hroncok

ghost commented Aug 11, 2025 •
edited by hroncok
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Petr Viktorin
Update magic number in tests
f30c791
@encukou
encukou requested review from brettcannon, ericsnowcurrently, ncoghlan and warsaw as code owners August 12, 2025 09:21
@encukou

ghost commented Aug 12, 2025

Copy link
Copy Markdown
Member

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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

encukou
encukou approved these changes Aug 12, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added the awaiting merge label Aug 12, 2025
@hugovk

ghost commented Aug 12, 2025

Copy link
Copy Markdown
Member

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.

hroncok reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk
hugovk merged commit 0ccf244 into python:3.14 Aug 12, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Release and Deferred blockers 🚫 Aug 12, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 12, 2025
hroncok
hroncok reviewed Aug 12, 2025
View reviewed changes
Comment thread Include/internal/pycore_magic_number.h
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)

ghost Aug 12, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

ghost Aug 12, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

#137664

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

ghost Aug 12, 2025

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk hugovk mentioned this pull request Aug 12, 2025
gh-137288: Update 3.14 magic numbers #137665
Merged
@hroncok

ghost commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

ghost commented Aug 12, 2025

Copy link
Copy Markdown
Member

I've decided anyway to do rc2 on Thursday, and add an rc3 on 2025-09-16. It's better to get this out for testing early.

  • https://discuss.python.org/t/early-3-14-0-rc2-and-extra-rc3/102151
  • PEP 745: Move RC2 earlier and add RC3 peps#4544
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@hugovk hugovk hugovk left review comments
@encukou encukou encukou approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
+1 more reviewer
@hroncok hroncok hroncok left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

release-blocker type-bug An unexpected behavior, bug, or error

Projects

Release and Deferred blockers 🚫
Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@iritkatriel @encukou @hroncok @hugovk
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.