conda-incubator / conda-store

Data science environments, for collaboration. ✨
https://conda.store
BSD 3-Clause "New" or "Revised" License
149 stars 50 forks source link

[BUG] - `TypeAlias` usage breaks conda-store-server for python <3.10 #972

Closed peytondmurray closed 1 week ago

peytondmurray commented 1 week ago

Describe the bug

When trying to build the conda-store-server conda package:

Traceback (most recent call last):
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/bin/conda-store-server", line 7, in <module>
    from conda_store_server._internal.server.__main__ import main
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/_internal/server/__main__.py", line 5, in <module>
    from conda_store_server._internal.server.app import CondaStoreServer
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/_internal/server/app.py", line 35, in <module>
    from conda_store_server import __version__, storage
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/storage.py", line 15, in <module>
    from conda_store_server import CONDA_STORE_DIR, api
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/api.py", line 12, in <module>
    from conda_store_server._internal import conda_utils, orm, schema, utils
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/_internal/orm.py", line 41, in <module>
    from conda_store_server._internal import conda_utils, schema, utils
  File "/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/site-packages/conda_store_server/_internal/schema.py", line 11, in <module>
    from typing import Any, Callable, Dict, List, Optional, TypeAlias, Union
ImportError: cannot import name 'TypeAlias' from 'typing' (/home/conda/feedstock_root/build_artifacts/conda-store-split_1731347586816/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.9/typing.py)

TypeAlias only exists in python >=3.10.

Expected behavior

No broken import.

How to Reproduce the problem?

See above.

Output

No response

Versions and dependencies used.

No response

Anything else?

No response