Skip to content

Support Python versions <3.10 #703

@mar-muel

Description

@mar-muel

Currently this library requires Python 3.10, but does not specify this in setup.py.

For example with Python 3.9, I receive

Python 3.9.17 | packaged by conda-forge | (main, Aug 10 2023, 07:02:31)
[GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import aqt.jax.v2.flax.aqt_flax as aqt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martin/miniconda3/envs/sd/lib/python3.9/site-packages/aqt/jax/v2/flax/aqt_flax.py", line 432
    match self.lhs_freeze_mode:
          ^
SyntaxError: invalid syntax
>>> import aqt.jax.v2.config as aqt_config
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martin/miniconda3/envs/sd/lib/python3.9/site-packages/aqt/jax/v2/config.py", line 18, in <module>
    from typing import Literal, Optional, TypeAlias, Union
ImportError: cannot import name 'TypeAlias' from 'typing' (/home/martin/miniconda3/envs/sd/lib/python3.9/typing.py)

In general it would be nice to at least support Python 3.8 as it's still quite commonly used as a stable Python version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions