-
-
Notifications
You must be signed in to change notification settings - Fork 273
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
Deprecate the experimental v3 implementation #1802
Deprecate the experimental v3 implementation #1802
Conversation
…the experimental v3 implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea. I could also see warning if the environment variable is even set, but I defer on that.
@@ -22,9 +23,21 @@ | |||
DEFAULT_ZARR_VERSION = 2 | |||
|
|||
v3_api_available = os.environ.get("ZARR_V3_EXPERIMENTAL_API", "0").lower() not in ["0", "false"] | |||
_has_warned_about_v3 = False # to avoid printing the warning multiple times |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was the default but 🤷🏽
https://docs.python.org/3/library/warnings.html#the-warnings-filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I certainly tried this first. It's possible this would have worked if I had put warning elsewhere, but as implemented, the warning is emitted multiple times without this switch. I think this is due to the fact that assert_zarr_v3_api_available
is used in various places around the library.
global _has_warned_about_v3 | ||
if v3_api_available and not _has_warned_about_v3: | ||
warnings.warn( | ||
"The experimental Zarr V3 implementation in this version of Zarr-Python is not " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
(TIL emoji names are case sensitive)
…into dep/experimental-v3-impl
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1802 +/- ##
=======================================
Coverage 99.98% 99.98%
=======================================
Files 38 38
Lines 14640 14655 +15
=======================================
+ Hits 14638 14653 +15
Misses 2 2
|
This PR adds a FutureWarning to
assert_zarr_v3_api_available
to alert users that this version of Zarr is being replaced with a spec complaint v3 version.TODO: