intake / intake-esm

An intake plugin for parsing an Earth System Model (ESM) catalog and loading assets into xarray datasets.
https://intake-esm.readthedocs.io
Apache License 2.0
135 stars 46 forks source link

conda installs 2023.4.20 with python=3.8, even though support for py3.8 was dropped #598

Closed klindsay28 closed 1 year ago

klindsay28 commented 1 year ago

When I run the command

mamba create -c conda-forge -n intake_esm python=3.8 intake-esm

I get a py38 environment that includes 2023.4.20 of intake-esm, even though support for py38 was dropped in #564. If I try to import intake_esm inside python running in this environment, I get the error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/klindsay/miniconda3/envs/intake_esm/lib/python3.8/site-packages/intake_esm/__init__.py", line 9, in <module>
    from .core import esm_datastore
  File "/Users/klindsay/miniconda3/envs/intake_esm/lib/python3.8/site-packages/intake_esm/core.py", line 21, in <module>
    from .cat import ESMCatalogModel
  File "/Users/klindsay/miniconda3/envs/intake_esm/lib/python3.8/site-packages/intake_esm/cat.py", line 13, in <module>
    from ._search import search, search_apply_require_all_on
  File "/Users/klindsay/miniconda3/envs/intake_esm/lib/python3.8/site-packages/intake_esm/_search.py", line 33, in <module>
    *, df: pd.DataFrame, query: dict[str, typing.Any], columns_with_iterables: set
TypeError: 'type' object is not subscriptable

I'm getting CI failures on a project of mine that uses intake-esm and supports py38.

Is there something that needs to be done to inform conda that 2023.4.20 requires py39 or later?

andersy005 commented 1 year ago

Is there something that needs to be done to inform conda that 2023.4.20 requires py39 or later?

thank you for catching this bug and reporting it, @klindsay28! we just need to update the conda-feedstock to reflect this change.

i'll ping you once https://github.com/conda-forge/intake-esm-feedstock/pull/24 is merged.

andersy005 commented 1 year ago

@klindsay28, this issue should be resolved. let me know if the error is still happening on your end

klindsay28 commented 1 year ago

Thanks for the quick response @andersy005.

However, I'm still getting v2023.4.20 with py38 on my macos laptop, and my CI test still fails. The CI test is a github actions workflow running on ubuntu-latest. Details for the failing CI test are at link.

Do you think this change is just something that takes time to propagate through conda-forge? I'm not familiar with how conda works behind the command line API.

klindsay28 commented 1 year ago

Looking at intake-esm at conda-forge, it looks like noarch/intake-esm-2023.4.20-pyhd8ed1ab_0.conda provides v2023.4.20 with the dependency python >=3.8. It looks like noarch/intake-esm-2023.4.20-pyhd8ed1ab_1.conda provides v2023.4.20 with the dependency python >=3.9.

I'm getting the former, 2023.4.20-pyhd8ed1ab_0, from conda/mamba with py38.

Is there way to get conda-forge to remove this version?

andersy005 commented 1 year ago

Is there way to get conda-forge to remove this version?

to remove this broken version from the channel, we just need to open a pull request here: https://github.com/conda-forge/admin-requests/pulls

i intend to do this later this afternoon

andersy005 commented 1 year ago

submitted a fix here:

klindsay28 commented 1 year ago

Thanks @andersy005 for the fix! I confirm that it works on my macos laptop and github actions CI with ubuntu-latest.