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
AttributeError: '_WriteBufferStream' object has no attribute '_last_mtime'
yesssssss. What you describe is what I initially saw. I re-tested as I wrote this issue and saw None instead. As you realized, it's because I lost mode="wb" in the open call. I'll fix the title & initial comment. Thanks.
changed the title [-]`mtime` is None for writable `GzipFile` instances[/-][+]`mtime` property throws exception writable `GzipFile` instances[/+]on Oct 29, 2026
Activity
pythongh-160860: Fix value of GzipFIle.mtime of writable stream
aisk commentedon Oct 29, 2026
I think you mean
gzip.open(io.BytesIO(), 'wb', mtime=1234567)?On main that raises
AttributeError: '_WriteBufferStream' object has no attribute '_last_mtime'rather than returning None.jepler commentedon Oct 29, 2026
yesssssss. What you describe is what I initially saw. I re-tested as I wrote this issue and saw
Noneinstead. As you realized, it's because I lostmode="wb"in the open call. I'll fix the title & initial comment. Thanks.[-]`mtime` is None for writable `GzipFile` instances[/-][+]`mtime` property throws exception writable `GzipFile` instances[/+]