gh-115961: Add name and mode attributes for compressed file-like objects#116036
Conversation
…e objects
* Add name and mode attributes for compressed and archived file-like objects
in modules bz2, lzma, tarfile and zipfile.
* Change the value of the mode attribute of GzipFile from integer (1 or 2)
to string ('rb' or 'wb').
* Change the value of the mode attribute of ZipExtFile from 'r' to 'rb'.
223fd79 to
874c8eb
Compare
eendebakpt
left a comment
There was a problem hiding this comment.
Looks good! Some changes are not backwards compatible, but every change is properly documented.
gpshead
left a comment
There was a problem hiding this comment.
Nice. This is much more consistent across all our file like ducks.
I'm not worried about things like the old gzip 1 and 2 values as I don't expect anyone to ever have used them. Similar for the old 'r' that should've been a 'rb'.
If anything comes up depending on this during the betas we can revisit.
|
📚 Documentation preview 📚: https://cpython-previews--116036.org.readthedocs.build/