diff --git a/airflow/models.py b/airflow/models.py index 64cce3c062fab..3ca9295a9b2dd 100755 --- a/airflow/models.py +++ b/airflow/models.py @@ -26,7 +26,13 @@ from builtins import str, object, bytes, ImportError as BuiltinImportError import copy -from collections import namedtuple, defaultdict, Hashable +from collections import namedtuple, defaultdict +try: + # Fix Python > 3.7 deprecation + from collections.abc import Hashable +except ImportError: + # Preserve Python < 3.3 compatibility + from collections import Hashable from datetime import timedelta import dill