Skip to content
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

Group __getattr__ should raise AttributeError #88

Closed
alimanfoo opened this issue Nov 3, 2016 · 3 comments · Fixed by #95
Closed

Group __getattr__ should raise AttributeError #88

alimanfoo opened this issue Nov 3, 2016 · 3 comments · Fixed by #95
Milestone

Comments

@alimanfoo
Copy link
Member

This issue cggh/scikit-allel#137 shows that Group should raise AttributeError instead of KeyError when attribute access fails.

@vincentschut
Copy link
Contributor

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 :-)

@alimanfoo
Copy link
Member Author

alimanfoo commented Dec 1, 2016 via email

@vincentschut
Copy link
Contributor

I created a PR: https://github.com/alimanfoo/zarr/pull/95

@alimanfoo alimanfoo added this to the v2.2 milestone Jan 26, 2017
@alimanfoo alimanfoo modified the milestones: v2.2, v2.1.4 Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants