-
-
Notifications
You must be signed in to change notification settings - Fork 184
Closed
Description
Recently, while trying out the ftpfs, I've noticed that to open a binary file-like object for writing by some third-party packages I have to do this:
with open_fs("ftp://anonymous:anonymous@localhost:8021") as fs:
with fs.openbin("test.bin", "wb") as f:
...
Note in the above the mode param used in openbin includes b: Looking at the docs for the mode param it suggests the b is implied via openbin, but b isn't implicitly added to the mode of the file-like that is returned by openbin - this means that, unless b is explicitly provided as above, third-party packages that inspect the mode of the file-like may complain that it is not opened in binary mode.
Should openbin not reflect the implied b by implicitly adding b to the mode?