pelme / htpy

Generate HTML in Python
http://htpy.dev
MIT License
261 stars 11 forks source link

ImportError in Python 3.10 #9

Closed pietz closed 8 months ago

pietz commented 8 months ago

I'm getting an error in an Python 3.10 environment:

ImportError: cannot import name 'Self' from 'typing' (/Users/pietz/.pyenv/versions/3.10.13/lib/python3.10/typing.py)

This error doesn't appear in Python 3.11. I would really appreciate the Python 3.10 backwards compatibility because that's the latest version Azure Static Web Apps supports.

pelme commented 8 months ago

This should be fixed in 24.3.20, please give it a try!

I use 3.12 locally when developing and use Python 3.11 in my main project, so it is tested regularly on 3.11 and 3.12.

Fixing #10 to actually test for Python 3.10 would be nice. Help getting github actions going would be very welcome!

pelme commented 8 months ago

There are now github actions running on PR:s and in main with python 3.10 so using htpy with python 3.10 should be fine now!