You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to import this package with Python <3.11 (3.10 in my local setup) will throw the following error:
ImportError: cannot import name 'Self' from 'typing'
From source:
File "[...]/.venv/lib/python3.10/site-packages/datastar_py/attributes.py", line 7, in <module>
from typing import Literal, Self, TypeAlias, TypeVar, Union, overload
(Which is apparently due to the Self type declaration being introduced in 3.11)
However, the project does not require Python 3.11, leading to this issue when used in Projects with Python <3.11.
Personally, I have no trouble upgrading to Python 3.11, and that indeed fixes this problem.
But maybe older Versions could easily be supported by not using that type declaration?