-
-
Notifications
You must be signed in to change notification settings - Fork 330
Group __getattr__ should raise AttributeError #88
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
Comments
Same for me. I'm trying to use zarr within dask, which uses cloudpickle to send arbitrary objects over the wire. Cloudpickle tests for a 'transient' attribute on objects it tries to pickle with hasattr. Hasattr expects an AttributeError if the attribute does not exist, en will gracefully swallow that and return False. Instead now (trying to pickle a zarr group) it gets a KeyError, which is raised. If we agree on this I can provide a PR with this change. It is important to me :-) |
Yes a PR would be great, happy to review and make a quick micro release if
that helps.
…On Thursday, December 1, 2016, Vincent Schut ***@***.***> wrote:
Same for me. I'm trying to use zarr within dask, which uses cloudpickle to
send arbitrary objects over the wire. Cloudpickle tests for a '*transient*'
attribute on objects it tries to pickle with hasattr. Hasattr expects an
AttributeError if the attribute does not exist, en will gracefully swallow
that and return False. Instead now (trying to pickle a zarr group) it gets
a KeyError, which is raised.
If we agree on this I can provide a PR with this change. It is important
to me :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/alimanfoo/zarr/issues/88#issuecomment-264225955>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAq8QngiH6FpuP4V3Hu74rmxTz3TjPyjks5rDvoNgaJpZM4Ko7HN>
.
--
Alistair Miles
Head of Epidemiological Informatics
Centre for Genomics and Global Health <http://cggh.org>
The Wellcome Trust Centre for Human Genetics
Roosevelt Drive
Oxford
OX3 7BN
United Kingdom
Email: [email protected]
Web: http://purl.org/net/aliman
Twitter: https://twitter.com/alimanfoo
Tel: +44 (0)1865 287721
|
I created a PR: https://github.com/alimanfoo/zarr/pull/95 |
This issue cggh/scikit-allel#137 shows that Group should raise AttributeError instead of KeyError when attribute access fails.
The text was updated successfully, but these errors were encountered: