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/01/02 22:15:09 UTC
[airflow] branch master updated: Replace deprecated decorator
(#13443)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new d6e1d7b Replace deprecated decorator (#13443)
d6e1d7b is described below
commit d6e1d7b3c90d9369cef490e18cb9262cb948a008
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Sat Jan 2 22:14:56 2021 +0000
Replace deprecated decorator (#13443)
`abc.abstractproperty` is deprecated since Python 3.3. Instead we should use `@property` with `abc.abstractmethod`.
Docs: https://docs.python.org/3.6/library/abc.html#abc.abstractproperty
---
airflow/utils/log/logging_mixin.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/airflow/utils/log/logging_mixin.py b/airflow/utils/log/logging_mixin.py
index 95dc43d..c36d4b3 100644
--- a/airflow/utils/log/logging_mixin.py
+++ b/airflow/utils/log/logging_mixin.py
@@ -57,7 +57,8 @@ class LoggingMixin:
class ExternalLoggingMixin:
"""Define a log handler based on an external service (e.g. ELK, StackDriver)."""
- @abc.abstractproperty
+ @property
+ @abc.abstractmethod
def log_name(self) -> str:
"""Return log name"""