-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
[v3] remove old v2 code entirely #1849
Comments
What are the implications for backward compatibility? |
@jeromekelleher the proposed change would remove API backwards compatibility, but I don't think we plan to keep the v2 API when we release v3 anyway -- v2 has a very large API surface area, it would be a burden to maintain purely for legacy reasons. The v3 codebase does support reading zarr v2, so removing the v2 code does not change functional compatibility with zarr v2. @jni suggested that we publish the final release of |
I see - if there's good compatibility on v2 stores with the new v3 code, and reasonable backward compatibility with old code bases, then I agree cutting out the old v2 code entirely is the right approach. As an invested user, I'm just a bit anxious that we're not contemplating a Python 2 to Python 3 style change here! |
Can you elaborate on this? |
Well, discussions about making a new v2 package and/or maintaining the old v2 code within the Zarr-Python repo raise questions about compatibility. If good compatibility with existing v2 stores and code was a first-order concern, then these wouldn't even be on the table, I would have thought.
That's quite a big thing, though. I agree there's a lot of sprawl around the v2 API that could be removed without breaking much, but surely there's an idiomatic core of functionality around creating/opening/reading/writing arrays that will be the same? Are there deprecations on the bits of v2 that are going to break when v3 drops? I think you guys are doing a great job by the way, I just want to get my head around what's being planned here. I would rather not have my code broken unless it's necessary, but I understand you've got to break some eggs sometimes. |
Your code will not break if you pin your There are two possibilities to minimize disruption. The first would be to include the old |
I see - so we are doing Python 2 -> Python 3 then... I wouldn't underestimate the disruption and ill-will caused by suddenly breaking people's code with a version update. If it is a major change and widespread breakage is expected, then I think a new "zarr3" package should at least be considered. Is there some documentation about what's going to break and not? |
I don't think breaking changes to
If I recall correctly, a stand-alone "zarr3" proposal did come up in past discussions, but we decided against it it for a variety of reasons. First, there are problems with making a completely new package as a response to breaking changes. This would be simple for users who don't want to change their code, but it would harm many other users. New users will be confused when they see And, as a matter of precedent, we have signaled breaking changes with the major version number before:
We still need to provide resources for people migrating from |
Thanks @d-v-b, all very helpful. Maybe I should open an issue for this, but has adding deprecation warnings to stuff that's going to break in Zarr v3 to the current v2 code been considered? This would be a helpful thing for people who don't necessarily keep up to date with package development, and would at least get a warning that their code will break in the near future (and need to start pinning their deps to zarr<3). |
uuuh. 😅
Correct. 😉 This is why I think the zarr2 idea is the bare minimum for this migration. In that situation, even folks who don't get the memo, and whose code inadvertently breaks when v3 is released, have a very quick pressure release valve for e.g. getting their CI green again: replace
I wasn't around then, but I suspect the number of folks depending on zarr was much smaller then. So I don't think it's such a direct comparison. |
I think this is the main missing piece of this discussion. We are keeping the same top level API for |
see #1898 |
Davis and I discussed this in the community meeting today, where I strongly advocated for using a new name for the new API. At the time I didn't have the context from #1849 (comment) that the new API will be mostly compatible with the existing API. However, it is still rather problematic to make API changes in Python: In the npm and rust and go ecosystems, you can more freely make API changes when you change the major version, because you can have a single program that transitively depends on multiple major versions of the same package --- different major versions essentially count as independent packages. In Python not only is this is not possible, it is also fairly common to have unversioned dependencies listed in requirements.txt files. Creating a zarr2 module name and a zarr2 package is better than nothing but still means everything needs to be updated just to not break. zarr-python is used by a ton of scientific / research code that by its nature is unmaintained and incompatible API changes are sure to create a lot of problems down the road. Pros to keeping
Cons to keeping
I think the extent of the API breakage determines which option is most favorable. If, say, 95% of existing uses of zarr-python will continue working with the new version, then keeping the same name would be a reasonable choice. But if a significantly larger fraction of existing uses are broken, then I think it would be better to use a new name. |
This issue hasn't received an update from us in a while, despite the conversation advancing considerably (specially in the weekly developer meeting). I'm about to put a PR up removing the old
Why aren't we going with a new package name?
I would encourage folks to read the draft migration guide (#2102) and provide feedback on how we can communicate this decision best. |
This is a more broad alternative to #1791 -- basically we remove all the old v2 code in favor of the v3 efforts. Happy to hear thoughts on this.
The text was updated successfully, but these errors were encountered: