This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v1-10-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit ec1cb7da1464708ba83bbfe0bc5efc367ea361c3 Author: Daniel Imberman <daniel.imber...@gmail.com> AuthorDate: Mon Aug 3 14:23:18 2020 -0700 Make XCom 2.7 compatible --- airflow/models/xcom.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/airflow/models/xcom.py b/airflow/models/xcom.py index 0b6a81d..9861c2c 100644 --- a/airflow/models/xcom.py +++ b/airflow/models/xcom.py @@ -234,7 +234,7 @@ class BaseXCom(Base, LoggingMixin): raise @staticmethod - def deserialize_value(result) -> Any: + def deserialize_value(result): # TODO: "pickling" has been deprecated and JSON is preferred. # "pickling" will be removed in Airflow 2.0. enable_pickling = conf.getboolean('core', 'enable_xcom_pickling') @@ -253,11 +253,13 @@ class BaseXCom(Base, LoggingMixin): def resolve_xcom_backend(): """Resolves custom XCom class""" - clazz = conf.getimport("core", "xcom_backend", fallback=f"airflow.models.xcom.{BaseXCom.__name__}") + clazz = conf.getimport("core", "xcom_backend", fallback="airflow.models.xcom.{}" + .format(BaseXCom.__name__)) if clazz: if not issubclass(clazz, BaseXCom): raise TypeError( - f"Your custom XCom class `{clazz.__name__}` is not a subclass of `{BaseXCom.__name__}`." + "Your custom XCom class `{class_name}` is not a subclass of `{base_name}`." + .format(class_name=clazz.__name__, base_name=BaseXCom.__name__) ) return clazz return BaseXCom