Skip to content

Deserializing arrays should not trigger load_metadata #1795

Description

@rabernat

Currently the __setstate__ method on Array just calls __init__.

zarr-python/zarr/core.py

Lines 2567 to 2568 in 6105ef2

def __setstate__(self, state):
self.__init__(**state)

And __init__ contains a call to load_metadata

zarr-python/zarr/core.py

Lines 169 to 170 in 6105ef2

# initialize metadata
self._load_metadata()

This really doesn't make much sense. We should serialize the metadata up with the array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features or improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions