Skip to content

improve control over warnings #3096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
d-v-b opened this issue May 25, 2025 · 0 comments · May be fixed by #3098
Open

improve control over warnings #3096

d-v-b opened this issue May 25, 2025 · 0 comments · May be fixed by #3098
Labels
enhancement New features or improvements

Comments

@d-v-b
Copy link
Contributor

d-v-b commented May 25, 2025

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 d-v-b linked a pull request May 25, 2025 that will close this issue
@dstansby dstansby added the enhancement New features or improvements label May 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants