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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
skip test when no chmod (wasi), fix doc lint
  • Loading branch information
inventshah committed Jul 11, 2025
commit 66e64b655d898c4b8b3d759a8858603f1ff4c7f9
3 changes: 2 additions & 1 deletion Lib/test/test_wave.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
from test import audiotests
from test import support
from test.support.os_helper import unwritable_filepath
from test.support.os_helper import unwritable_filepath, skip_unless_working_chmod
import io
import struct
import sys
Expand Down Expand Up @@ -197,6 +197,7 @@ def test_read_wrong_sample_width(self):
with self.assertRaisesRegex(wave.Error, 'bad sample width'):
wave.open(io.BytesIO(b))

@skip_unless_working_chmod
def test_write_to_protected_file(self):
# gh-136523: Wave_write.__del__ should not throw
stderr = io.StringIO()
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fix :func:`wave.Wave_write.__del__` raising :exc:`AttributeError` when attempting to open an unwritable file.
Fix ``wave.Wave_write.__del__`` raising :exc:`AttributeError` when attempting to open an unwritable file.
Loading