Closed FHatCSW closed 8 months ago
The issue seems to be related to the Python version. After updating to Python 3.12.1 it works like a charm ;)
@Aircoookie, @AlexCampusSchwarzwald This is something we should consider and simplify.
I guess I used new features of the python typing part. Should be working with python >= 3.11 though. Operand | meaning OR. Before you'd have to use Optional[typeX] or Union[typeA, typeB, ...] I would like to use the latest typing features. It's just more concise and better to read.
from future import annotations should make it available for older python versions, if we intend to support older ones.
Regarding the second issue. It may be better if we do not push migrations to the repo. That may break things quickly in development. To clear all db and migrations, delete the db.sqlite3 file and also delete all migration files. That is all files within the migrations directories except the init.py files. (Keep the init.py files!)
Then execute makemigrations and migrate again. (Remember to execute createsuperuser again, if you want to login / use the admin page: localhost:8000/admin)
When I try to setup the trustpoint I get a TypeError for
trustpoint/util/x509/credentials.py
:After adding
from __future__ import annotations
totrustpoint/util/x509/credentials.py
I can executepython manage.py makemigrations
No error that breaks the setup but a SystemCheckError:Python Version:
Python 3.9.18