From c20ff8ff48ba645e0ac2a8d1e804e5deb4256197 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Fri, 13 Aug 2021 01:47:43 +0100 Subject: [PATCH] Use built-in ``cached_property`` on Python 3.8 for Asana provider Functionality is the same, this just removes one dep for Py 3.8+ --- airflow/providers/asana/hooks/asana.py | 6 +++++- setup.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/airflow/providers/asana/hooks/asana.py b/airflow/providers/asana/hooks/asana.py index b1623f8a42272..44367bd00bca6 100644 --- a/airflow/providers/asana/hooks/asana.py +++ b/airflow/providers/asana/hooks/asana.py @@ -21,7 +21,11 @@ from asana import Client from asana.error import NotFoundError -from cached_property import cached_property + +try: + from functools import cached_property +except ImportError: + from cached_property import cached_property from airflow.hooks.base import BaseHook diff --git a/setup.py b/setup.py index 801721f00ceca..2cdb0407edea7 100644 --- a/setup.py +++ b/setup.py @@ -190,7 +190,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version apache_beam = [ 'apache-beam>=2.20.0', ] -asana = ['asana>=0.10', 'cached-property>=1.5.2'] +asana = ['asana>=0.10'] async_packages = [ 'eventlet>= 0.9.7', 'gevent>=0.13',