Skip to content

Group __getattr__ should raise AttributeError #88

Closed

Description

@alimanfoo

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

Activity

  1. vincentschut commented on Dec 1, 2016

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

  2. alimanfoo commented on Dec 1, 2016

    @alimanfoo
    MemberAuthor
  3. modified the milestones: v2.2, v2.1.4 on Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions