Skip to content
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

Backport(v1.16): test: fix IOError about Tempfile closed when GC (#4515) #4591

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Aug 15, 2024

Backported from 3b27984. (#4515)

Backported from 3b27984.

---

`Tempfile#binmode` returns `File` object, not own `Tempfile`
object.
So, GC will cause its finalizer and the file can be closed during
the test.
This is the cause why these tests sometimes fail by
`IOError: closed stream`.

Signed-off-by: Daijiro Fukuda <[email protected]>
@daipom daipom added this to the v1.16.6 milestone Aug 15, 2024
@daipom daipom merged commit 260a7f5 into v1.16 Aug 16, 2024
16 checks passed
@daipom daipom deleted the v1.16-backport-4515 branch August 16, 2024 01:05
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.

2 participants