-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[gridfs] more closely implement io.IOBase #387
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
[gridfs] more closely implement io.IOBase #387
Conversation
Not sure how I should follow up on this... Anyone? @behackett ? |
@terencehonles we are interested in supporting
That's interesting... perhaps we can just start returning the number of bytes written? The docstring says |
@ShaneHarvey I can add the test and remove You're basically asking me to keep as close to I'd go further and suggest we should add a deprecation warning and a "future flag" which will allow |
Yes that's what I'm asking. We don't want to claim we support |
We have not had any requests to add |
We don't actually use hint, so it's sufficient for us to I left a Sphinx comment note in |
Allows GridOut to be wrapped with zipfile.ZipFile from the stdlib.
Allows GridOut to be wrapped with zipfile.ZipFile from the stdlib. (cherry picked from commit 481600b)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PYTHON-1695
I'm testing out moving our system to using Python3.7. We have an instance where we are using ZipFile on a
GridOut
instance. Because seekable() is defined as part of the IO API the ZipFile implementation does not handle anAttributeError
coming from accessing theseekable
method.This appears to be a change in the
ZipFile
implementation between Python3.6 and Python3.7.The
GridOut
implementation is relatively close to implementingio.IOBase
so I figured I would close the gap, have it subclassio.IOBase
and also note where it diverges from theio.IOBase
behavior.I don't use
ZipFile
against aGridIn
instance and it diverges fromio.IOBase
in that it doesn't return the number of bytes written so I refrained from making it a subclass ofio.IOBase