Skip to content

remove partial codec initialization #2881

Description

@d-v-b

Some codec classes (like the blosc codec) can be partially initialized, where codec creation succeeds but the resulting object is not actually serializable because certain fields that are required for serialization are nullable for codec creation. I believe the logic for this pattern was to spare users the burden of specifying codec properties that depend on the data type of their array, like bloscshuffle. The cost of this pattern is code complexity, indirection, and irregularity of the codec API surface.

Now that we have easier methods for automatically specifying codecs (e.g, the "auto" value in create_array), I don't think we need to support partial codec initialization any more. So we should remove this functionality from the codecs that use it, and instead require codecs are fully valid for serialization when they are constructed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions