You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/06 08:59:52 UTC
[GitHub] [airflow] ashb commented on a diff in pull request #24486: WIP: Lazy import and do less at import time
ashb commented on code in PR #24486:
URL: https://github.com/apache/airflow/pull/24486#discussion_r963447734
##########
airflow/serialization/json_schema.py:
##########
@@ -19,14 +19,15 @@
"""jsonschema for validating serialized DAG and operator."""
import pkgutil
-from typing import Iterable
-
-import jsonschema
+from typing import TYPE_CHECKING, Iterable
from airflow.exceptions import AirflowException
from airflow.settings import json
from airflow.typing_compat import Protocol
+if TYPE_CHECKING:
+ import jsonschema
Review Comment:
It was high up in the list of slow imports!
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org