Skip to content

[3.14] gh-133982: Run unclosed file test on all io implementations (gh-134165) #134433

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 1 commit into from
May 21, 2025

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 21, 2025

Update test_io _check_warn_on_dealloc to use self. to dispatch to
different I/O implementations.

Update the _pyio implementation to match expected behavior, using the
same _dealloc_warn design as the C implementation uses to report the
topmost __del__ object.

The FileIO one now matches all the others, so can use IOBase. There was
a missing check on closing (self._fd must be valid), add that check
(cherry picked from commit 5b0e827)

Co-authored-by: Cody Maloney cmaloney@users.noreply.github.com

…thongh-134165)

Update `test_io` `_check_warn_on_dealloc` to use `self.` to dispatch to
different I/O implementations.

Update the `_pyio` implementation to match expected behavior, using the
same `_dealloc_warn` design as the C implementation uses to report the
topmost `__del__` object.

The FileIO one now matches all the others, so can use IOBase. There was
a missing check on closing (self._fd must be valid), add that check
(cherry picked from commit 5b0e827)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
@ambv ambv merged commit fade04e into python:3.14 May 21, 2025
43 checks passed
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.

3 participants