Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-18748: test_io: silence destructor errors#12805

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:masterfromvstinner:test_io_destructor
Apr 12, 2019
Merged

bpo-18748: test_io: silence destructor errors#12805

vstinner merged 1 commit intopython:masterfromvstinner:test_io_destructor
Apr 12, 2019

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedApr 12, 2019
edited by bedevere-bot
Loading

@vstinner
Copy link
MemberAuthor

vstinner commentedApr 12, 2019
edited
Loading

I tagged this PR as a WIP because it doesn't fix all issues:

test_reader_writer_close_error_on_close (test.test_io.CBufferedRWPairTest) ...Exception ignored in: <_io.BufferedRWPair object at 0x7f4aa6fb2c50>ValueError: flush of closed fileException ignored in: <_io.BufferedWriter>ValueError: flush of closed fileoktest_writer_close_error_on_close (test.test_io.CBufferedRWPairTest) ...Exception ignored in: <_io.BufferedWriter>ValueError: flush of closed fileoktest_misbehaved_io (test.test_io.CBufferedRandomTest) ...Exception ignored in: <_io.BufferedRandom>OSError: Raw stream returned invalid position -123Exception ignored in: <_io.BufferedRandom>OSError: Raw stream returned invalid position -123oktest_write_non_blocking (test.test_io.CBufferedRandomTest) ...Exception ignored in: <_io.BufferedRandom>io.UnsupportedOperation: seekok

Remaining failures are related to CBufferedRWPairTest, but I'm not sure that it's a bug in the test or in io.BufferedRWPair. buffered_close() which doesn't call parent IOBase.close() method, wheareas _io_FileIO_close_impl() does call it. I'm always lost in the code base of the io module, so I can be wrong ;-)

The same test logs no exception with the pure Python implementation.

cc@pitrou@methane@serhiy-storchaka

@vstinnervstinner changed the title[WIP] bpo-18748: test_io: silence destructor errorsbpo-18748: test_io: silence destructor errorsApr 12, 2019
@vstinner
Copy link
MemberAuthor

Hum. I started to see the "Exception ignored:" more and more often. I decided to merge this first fix. I will dig into the code for the strange CBufferedRWPairTest case.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
awaiting core reviewskip newstestsTests in the Lib/test dir
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp