Skip to content

gh-136523: fix wave.Wave_write emitting an unraisable when open raises #136529

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
Jul 13, 2025

Conversation

inventshah
Copy link
Contributor

@inventshah inventshah commented Jul 11, 2025

Fixes #136523, by moving builtins.open inside the try-except block and always calling initfp (which does not raise) for Wave_write.

@python-cla-bot
Copy link

python-cla-bot bot commented Jul 11, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Jul 11, 2025

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.

@inventshah inventshah changed the title gh-136523: fix Wave_write.__del__ raise after attempt to open protected file gh-136523: fix wave.Wave_write emitting an unraisable when open raises Jul 12, 2025
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

Thank you for your contribution, @inventshah.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jul 13, 2025
@serhiy-storchaka serhiy-storchaka merged commit 171de05 into python:main Jul 13, 2025
49 checks passed
@miss-islington-app
Copy link

Thanks @inventshah for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 13, 2025
… raises (pythonGH-136529)

(cherry picked from commit 171de05b4884d1353044417ea51a4efcb55ba633)

Co-authored-by: Sachin Shah <39803835+inventshah@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 13, 2025
… raises (pythonGH-136529)

(cherry picked from commit 171de05b4884d1353044417ea51a4efcb55ba633)

Co-authored-by: Sachin Shah <39803835+inventshah@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 13, 2025

GH-136606 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 Jul 13, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jul 13, 2025

GH-136607 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 13, 2025
serhiy-storchaka pushed a commit that referenced this pull request Jul 13, 2025
…n raises (GH-136529) (GH-136607)

(cherry picked from commit 171de05)

Co-authored-by: Sachin Shah <39803835+inventshah@users.noreply.github.com>
@inventshah inventshah deleted the fix-gh-136523 branch July 13, 2025 06:56
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception raised from Wave_write.__del__() after failed attempt to open file for write operation
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