Skip to content

redis-om 1.0.0b0: python 3.8 is still supported in pyproject.toml but typing fails #693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
woutdenolf opened this issue May 1, 2025 · 1 comment · Fixed by #698
Closed

Comments

@woutdenolf
Copy link

pip install "redis-om==1.0.0b0"
python -c "import redis_om"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/denolf/.local/wdnbashutils/virtualenvs/pybox_zLA1zn/lib/python3.8/site-packages/redis_om/__init__.py", line 4, in <module>
    from .model.migrations.migrator import MigrationError, Migrator
  File "/home/denolf/.local/wdnbashutils/virtualenvs/pybox_zLA1zn/lib/python3.8/site-packages/redis_om/model/__init__.py", line 2, in <module>
    from .model import (
  File "/home/denolf/.local/wdnbashutils/virtualenvs/pybox_zLA1zn/lib/python3.8/site-packages/redis_om/model/model.py", line 1841, in <module>
    class JsonModel(RedisModel, abc.ABC):
  File "/home/denolf/.local/wdnbashutils/virtualenvs/pybox_zLA1zn/lib/python3.8/site-packages/redis_om/model/model.py", line 1968, in JsonModel
    typ: Union[type[RedisModel], Any],
TypeError: 'type' object is not subscriptable

It works fine with pip install "redis-om==0.3.5"

@woutdenolf
Copy link
Author

@sethbuff I think you introduced this in #691.

Instead of type[RedisModel] you probably meant Type[RedisModel]? Or alternatively drop python 3.8 support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant