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.
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.