Skip to content

Inconsistency between return type of Group.attrs and AsyncGroup.attrs #2214

@TomAugspurger

Description

@TomAugspurger

Zarr version

v3

Numcodecs version

na

Python Version

na

Operating System

na

Installation

na

Description

There's an inconsistency between Group.attrs and AsyncGroup.attrs. Group.attrs returns an Attributes object while AsyncGroup.attrs returns an Attributes object. Just wanted to confirm that this is deliberate.

I'm planning to add an asdict() method to Attributes for v2 compatibility.

Steps to reproduce

In [13]: g = zarr.open_group(store={}, mode="w")

In [14]: g.attrs
Out[14]: <zarr.core.attributes.Attributes at 0x10bd902e0>

In [15]: g._async_group.attrs
Out[15]: {}

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions