zarr-developers / VirtualiZarr

Create virtual Zarr stores from archival data files using xarray syntax
https://virtualizarr.readthedocs.io/en/latest/
Apache License 2.0
95 stars 18 forks source link

requires-python = ">=3.10" #127

Closed abarciauskas-bgse closed 4 months ago

abarciauskas-bgse commented 4 months ago

Fix for an error that arises when using python3.9:

Python 3.9.19 (main, Mar 19 2024, 16:08:27) 
[Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from virtualizarr import open_virtual_dataset

Traceback (most recent call last):
...
  File "/github/developmentseed/VirtualiZarr/virtualizarr/manifests/manifest.py", line 36, in ChunkEntry
    def from_kerchunk(cls, path_and_byte_range_info: list[str | int]) -> "ChunkEntry":
TypeError: unsupported operand type(s) for |: 'type' and 'type'

as I believe the type union operator was only implemented in 3.10: https://docs.python.org/3/whatsnew/3.10.html#pep-604-new-type-union-operator

TomNicholas commented 4 months ago

Do you particularly need 3.9? Julia removed support for it in https://github.com/TomNicholas/VirtualiZarr/pull/112 for this exact reason.

(Also clearly we need to release this package so we're not all just using main - I'm trying to push that in https://github.com/orgs/zarr-developers/discussions/70#discussioncomment-9577781)

abarciauskas-bgse commented 4 months ago

@TomNicholas I don't need 3.9 at all, I just happened to notice that the package wasn't working in 3.9 as that was my default python3 version.

TomNicholas commented 4 months ago

Sorry I misread what this PR does - I see now this is just something that should have been added in Julia's PR!

Thanks @abarciauskas-bgse !