zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

improve control over warnings

Open d-v-b opened this issue 7 months ago • 0 comments

As we deprecate old v2 functionality and continue to support Zarr features that are not defined in a specification document (like many codecs), I think zarr-python will continue to emit a lot of warnings in the forseeable future. But these warnings are annoying for users who have already been warned, so we should provide a simple way to turn them off.

Two concrete proposals:

  • Make all the warnings we emit zarr-flavored, e.g.:
class ZarrFutureWarning(FutureWarning): 
    ...

...
warning.warns('this will change', ZarrFutureWarning)
  • Provide some top-level functions for silencing warnings. these would be light wrappers around the built in system for suppressing warnings.

d-v-b avatar May 25 '25 13:05 d-v-b