You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LZ4FrameFile.flush() flushes the underlying file in read mode, so Python 3.13 prints "I/O operation on closed file" at garbage collection #351
On Python 3.13, an io.BufferedReader wrapped around a read-mode LZ4FrameFile prints an ignored exception when it is garbage-collected after the underlying file has been closed. Python 3.12 is silent on the same code.
Exception ignored in: <_io.BufferedReader>
Traceback (most recent call last):
File ".../lz4/frame/__init__.py", line 753, in flush
self._fp.flush()
ValueError: I/O operation on closed file.
LZ4FrameFile.flush() only writes compressor output when the file is writable, but it always calls self._fp.flush(). In read mode there is nothing to flush.
Suggested fix: return early unless the file is writable, so read mode never touches _fp:
Activity
bsauvage1 commentedon Oct 30, 2026
Matching joblib issue: joblib/joblib#1929