conda-forge / conda-forge-repodata-patches-feedstock

A conda-smithy repository for conda-forge-repodata-patches.
BSD 3-Clause "New" or "Revised" License
13 stars 156 forks source link

Patch etils 1.6.0 to require python>=3.10 #831

Closed jdblischak closed 2 weeks ago

jdblischak commented 3 weeks ago

Checklist


etils 1.6.0 dropped support for Python 3.9 (https://github.com/google/etils/issues/531), but the initial conda-forge build number 0 didn't update the minimum Python version to 3.10 (https://github.com/conda-forge/etils-feedstock/pull/21). It was subsequently fixed in build number 1 (https://github.com/conda-forge/etils-feedstock/pull/22). This PR patches etils 1.6.0 build number 0 to depend on python>=3.10

cc: @Shelnutt2, @conda-forge/etils

I ran show_diff.py locally:

mamba activate repodata-patches
pre-commit run -a
## flake8...................................................................Passed
## ruff.....................................................................Passed
## black....................................................................Passed
## yamllint.................................................................Passed
cd recipe/
python show_diff.py --subdirs noarch
## ================================================================================
## ================================================================================
## noarch
## noarch::apache-airflow-providers-celery-3.8.0-pyhd8ed1ab_0.conda
## -    "python =3.8,<4.dev0"
## +    "python ==3.8,<4.dev0.*"
## noarch::etils-1.6.0-pyhd8ed1ab_0.conda
## -    "python >=3.9"
## +    "python >=3.10"

I assume that the apache-airflow-providers-celery patch is displaying because the CDN hasn't been cloned in over an hour (status):

image

And here is a minimal reprex to demonstrate the error when etils 1.6.0 is installed with Python 3.9:

mamba create --yes -n test-etils-1.6.0 -c conda-forge \
  etils==1.6.0 tensorflow-datasets==4.8.3 python==3.9
mamba activate test-etils-1.6.0
mamba list etils
## # packages in environment at /home/wsl/mambaforge/envs/test-etils-1.6.0:
## #
## # Name                    Version                   Build  Channel
## etils                     1.6.0              pyhd8ed1ab_0    conda-forge
python -c "import tensorflow_datasets"
## Traceback (most recent call last):
##   File "<string>", line 1, in <module>
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/tensorflow_datasets/__init__.py", line 43, in <module>
##     import tensorflow_datasets.core.logging as _tfds_logging
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/tensorflow_datasets/core/__init__.py", line 20, in <module>
##     from etils.epath import Path
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/etils/epath/__init__.py", line 19, in <module>
##     from etils.epath import testing
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/etils/epath/testing.py", line 27, in <module>
##     from etils.epath import gpath
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/etils/epath/gpath.py", line 29, in <module>
##     from etils import epy
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/etils/epy/__init__.py", line 22, in <module>
##     from etils.epy.binary_import import binary_adhoc
##   File "/home/wsl/mambaforge/envs/test-etils-1.6.0/lib/python3.9/site-packages/etils/epy/binary_import.py", line 55, in <module>
##     restrict: None | py_utils.StrOrStrList = None,
## TypeError: unsupported operand type(s) for |: 'NoneType' and '_UnionGenericAlias'
conda-forge-webservices[bot] commented 3 weeks ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

jdblischak commented 3 weeks ago

I assume that the apache-airflow-providers-celery patch is displaying because the CDN hasn't been cloned in over an hour (status):

Suspicion confirmed. Now that the CDN has been cloned, the diff for this PR is clean:

image

python show_diff.py --subdirs noarch
================================================================================
================================================================================
noarch
noarch::etils-1.6.0-pyhd8ed1ab_0.conda
-    "python >=3.9"
+    "python >=3.10"
jdblischak commented 3 weeks ago

@conda-forge/core simple patch ready for review

jdblischak commented 3 weeks ago

Diff from CI run matches my local results:

patching repodata:   0%|          | 0/9 [00:00<?, ?it/s]
patching repodata:  11%|█         | 1/9 [02:45<22:07, 165.89s/it]
================================================================================
================================================================================
noarch
noarch::etils-1.6.0-pyhd8ed1ab_0.conda
-    "python >=3.9"
+    "python >=3.10"

================================================================================
================================================================================
linux-armv7l

patching repodata:  22%|██▏       | 2/9 [02:46<08:02, 68.92s/it] 

patching repodata:  33%|███▎      | 3/9 [05:14<10:27, 104.61s/it]================================================================================
================================================================================
linux-aarch64

patching repodata:  44%|████▍     | 4/9 [07:09<09:04, 108.86s/it]
================================================================================
================================================================================
linux-64

patching repodata:  56%|█████▌    | 5/9 [07:26<05:02, 75.73s/it] 
================================================================================
================================================================================
linux-ppc64le

patching repodata:  67%|██████▋   | 6/9 [09:54<05:01, 100.34s/it]
================================================================================
================================================================================
osx-arm64

patching repodata:  78%|███████▊  | 7/9 [10:27<02:36, 78.21s/it] 
================================================================================
================================================================================
win-32

patching repodata:  89%|████████▉ | 8/9 [13:26<01:50, 110.35s/it]
================================================================================
================================================================================
osx-64

================================================================================
================================================================================
win-64

patching repodata: 100%|██████████| 9/9 [15:12<00:00, 108.91s/it]
patching repodata: 100%|██████████| 9/9 [15:12<00:00, 101.34s/it]
traversaro commented 2 weeks ago

Thanks @jdblischak !

jdblischak commented 2 weeks ago

I confirmed this is working as expected. Now etils 1.5.1 is installed with Python 3.9 and not the incompatible 1.6.0

mamba create --yes -n test-etils-patch -c conda-forge \
  python==3.9 etils
mamba activate test-etils-patch
mamba list etils
## # packages in environment at /home/wsl/mambaforge/envs/test-etils-patch:
## #
## # Name                    Version                   Build  Channel
## etils                     1.5.1              pyhd8ed1ab_1    conda-forge