head's up about private zarr-python API usage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What is your issue?
The Zarr array wrapper in xarray uses zarr.Array._async_array, which is a private attribute, which makes xarray vulnerable to breaking changes if zarr changes anything about that private attribute.
For example: there's an open issue and a PR over in zarr-python about moving all the AsyncArray methods over to the Array class, with the eventual goal of phasing out the AsyncArray class entirely.
So the bad news is that the zarr.Array._async_array attribute might behave differently (e.g., emit a warning) or disappear entirely in a future release of zarr. the good news is that, if the aforementioned warnings / removal does occur, xarray will be able to use public async methods on the Array class to do whatever you are currently using _async_array to do.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in xarray/backends/zarr.py at the Zarr array wrapper around line 287, then review the linked zarr-python issue and PR about moving AsyncArray methods onto Array. Identify every use of Zarr's private _async_array attribute; done means those uses can rely on the public async Array methods once the upstream API is available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100