You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/08/13 12:09:23 UTC
[airflow] branch main updated: Use built-in ``cached_property`` on
Python 3.8 for Asana provider (#17597)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new d11d3e6 Use built-in ``cached_property`` on Python 3.8 for Asana provider (#17597)
d11d3e6 is described below
commit d11d3e617ad121e75fbc955ad3730857ae8edab4
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Fri Aug 13 13:09:04 2021 +0100
Use built-in ``cached_property`` on Python 3.8 for Asana provider (#17597)
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 b1623f8..44367bd 100644
--- a/airflow/providers/asana/hooks/asana.py
+++ b/airflow/providers/asana/hooks/asana.py
@@ -21,7 +21,11 @@ from typing import Any, Dict
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 75f87ca..81d4b2c 100644
--- a/setup.py
+++ b/setup.py
@@ -190,7 +190,7 @@ amazon = [
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',