Replace abc.abstractproperty with property and abc.abstractmethod

Replace abc.abstractproperty with property and abc.abstractmethod,
as abc.abstractproperty has been deprecated since python3.3[1]

[1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc

Change-Id: I7a276c1c5e6719a4b0574e8e1448168650fcd57e
This commit is contained in:
ljhuang 2022-08-03 16:44:51 +08:00 committed by huang liujie
parent 5effc13828
commit 120d37d0bb
2 changed files with 6 additions and 3 deletions

View File

@ -81,7 +81,8 @@ class BackupEngine(metaclass=abc.ABCMeta):
"""
self.storage = storage
@abc.abstractproperty
@property
@abc.abstractmethod
def name(self):
"""
:rtype: str

View File

@ -16,11 +16,13 @@ import abc
class Mode(metaclass=abc.ABCMeta):
@abc.abstractproperty
@property
@abc.abstractmethod
def name(self):
pass
@abc.abstractproperty
@property
@abc.abstractmethod
def version(self):
pass