-
Notifications
You must be signed in to change notification settings - Fork 73
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
method resolution surprise on EarthAccessFile
#610
Labels
bug
Something isn't working
Comments
itcarroll
changed the title
method resolution surprise on
method resolution surprise on Jun 25, 2024
EarthAccessGranule
EarthAccessFile
No, don't use |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's something funny going on with the wrapping of
fsspec.spec.AbstractBufferedFile
, where the method resolution isn't coming out as expected.The following gives me an
AssertionError
I don't know about the internals, but
getattr(g, "read")
andg.__getattribute__("read")
both follow the MRO to theread
method offsspec.spec.AbstractBufferedFile
. We don't want that! We want theread
method, given byg.__getattr__("read")
asfsspec.implementations.http.HTTPFile.read
as resulting fromgetattr(g.f)
in the class definition.earthaccess/earthaccess/store.py
Lines 28 to 34 in b7443fe
Is it possible that
__getattr__
should be__getattribute__
?Sorry for the multiple edits; confused myself with two
f
sThe text was updated successfully, but these errors were encountered: