-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
api: make buffer public api #2664
Conversation
"Please use zarr.buffer and zarr.abc.buffer modules instead.", | ||
FutureWarning, | ||
stacklevel=2, | ||
) |
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.
put this in to prompt a discussion -- numcodecs depends on this module already... which sucks.
@normanrz - do you have thoughts on how to proceed? Options are:
- keep
zarr.core
but document it as private. We've managed to do this in the Xarray project with few issues. - change the import in
numcodecs
and make a new release
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.
We can easily skip documenting some 'public' (without a _
) modules, which would probably help:
Lines 64 to 76 in f9c2024
def skip_submodules( | |
app: sphinx.application.Sphinx, | |
what: str, | |
name: str, | |
obj: object, | |
skip: bool, | |
options: dict[str, Any] | |
) -> bool: | |
# Skip documenting zarr.codecs submodules | |
# codecs are documented in the main zarr.codecs namespace | |
if what == "module" and name.startswith("zarr.codecs."): | |
skip = True | |
return skip |
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 would also lean towards 1. Changing numcodecs would almost certainly also require some backwards-compat shim in zarr-python.
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.
Alright, let's do that. I'll close this and open a doc-only PR later today.
It's a shame because I quite liked how this shook out. But it is what it is is.
This PR moves
zarr.core.buffer
tozarr.abc.buffer
andzarr.buffer
, paving the way to make the rest ofzarr.core
private in a follow up PR.Towards #2621