vincbeck commented on PR #28900:
URL: https://github.com/apache/airflow/pull/28900#issuecomment-1622095030
I resolved the circular dependencies but when I run Airflow with Python 3.8
it fails because of
```
File "/opt/airflow/airflow/models/__init__.py", line 65, in import_all_models
import airflow.models.serialized_dag
File "/opt/airflow/airflow/models/serialized_dag.py", line 38, in <module>
from airflow.serialization.serialized_objects import DagDependency,
SerializedDAG
File "/opt/airflow/airflow/serialization/serialized_objects.py", line 57,
in <module>
from airflow.serialization.pydantic.dag_run import DagRunPydantic
File "/opt/airflow/airflow/serialization/pydantic/dag_run.py", line 35, in
<module>
class DagRunPydantic(BaseModelPydantic):
File "pydantic/main.py", line 178, in pydantic.main.ModelMetaclass.__new__
File "pydantic/typing.py", line 400, in pydantic.typing.resolve_annotations
File "/usr/local/lib/python3.8/typing.py", line 270, in _eval_type
return t._evaluate(globalns, localns)
File "/usr/local/lib/python3.8/typing.py", line 518, in _evaluate
eval(self.__forward_code__, globalns, localns),
File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'
Error: check_environment returned 1. Exiting.
```
It seems pydantic does not like `... | None` annotations even though we use
`future`. It works with Python 3.10 though
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]