FastAPI, Starlite and Starlette itself support Python 3.7 while Starception doesn't. This is really sad since I would love to use it in my FastAPI/Starlite extension but I can not narrow down version support.
3.7 is still a supported version receiving security fixes. The support ends in about 8 months (2023-06-27)
So this PR adds Python 3.7 support which basically means:
add use Literal from typing_extensions (typing.Literal has been introduced in 3.8)
get rid of walrus operator
add 3.7 to the matrix of Python versions for CI
Also I fixed pre-commit hook config by removing language version restriction on black and using pytest from poetry env (I don't have pytest globally installed on my machine - hence it was failing). Please let me know if I should revert pre-commit hooks
FastAPI, Starlite and Starlette itself support Python 3.7 while Starception doesn't. This is really sad since I would love to use it in my FastAPI/Starlite extension but I can not narrow down version support.
3.7 is still a supported version receiving security fixes. The support ends in about 8 months (2023-06-27)
So this PR adds Python 3.7 support which basically means:
Literal
fromtyping_extensions
(typing.Literal
has been introduced in 3.8)Also I fixed pre-commit hook config by removing language version restriction on black and using pytest from poetry env (I don't have pytest globally installed on my machine - hence it was failing). Please let me know if I should revert pre-commit hooks