Skip to content

gh-137288: Fix bug where boolean expressions are not associated with the correct exception handler #137310

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 7 commits into from
Aug 5, 2025

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Aug 1, 2025

@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.14 bugs and security fixes labels Aug 1, 2025
@picnixz picnixz added needs backport to 3.14 bugs and security fixes and removed 3.14 bugs and security fixes labels Aug 1, 2025
@encukou
Copy link
Member

encukou commented Aug 4, 2025

This looks reasonable to me but I don't know this code enough to review it.

However, the fix will require bumping the PYC magic number in 3.14.0rc2 :( Heads up, @hugovk

@markshannon
Copy link
Member

The code changes look good to me.

I think this needs a separate pyc magic number bump for the backport.
On main: 3654 -> 3655, and for 3.14: 3624 -> 3625.

This reverts commit af2128c.
@iritkatriel iritkatriel merged commit 1f2026b into python:main Aug 5, 2025
41 checks passed
@miss-islington-app
Copy link

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @iritkatriel, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1f2026b8a239b3169c0cad0157eb08358152b4c1 3.14

iritkatriel added a commit to iritkatriel/cpython that referenced this pull request 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>
@bedevere-app
Copy link

bedevere-app bot commented Aug 5, 2025

GH-137427 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python implicit boolean conversion in logical operations bypasses try/except on 3.14.0rc1
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy