From 11380a204efc38b2083c562eaa04f1b6b08b0ada Mon Sep 17 00:00:00 2001 From: sobolevn Date: Tue, 13 Sep 2022 22:48:55 +0300 Subject: [PATCH] Replace `abstractproperty` with `property` + `abstractmethod` --- importlib_resources/abc.py | 3 ++- importlib_resources/simple.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/importlib_resources/abc.py b/importlib_resources/abc.py index efa86ac6..23b6aeaf 100644 --- a/importlib_resources/abc.py +++ b/importlib_resources/abc.py @@ -139,7 +139,8 @@ def open(self, mode='r', *args, **kwargs): accepted by io.TextIOWrapper. """ - @abc.abstractproperty + @property + @abc.abstractmethod def name(self) -> str: """ The base name of this object without any parent references. diff --git a/importlib_resources/simple.py b/importlib_resources/simple.py index c23ade1b..7770c922 100644 --- a/importlib_resources/simple.py +++ b/importlib_resources/simple.py @@ -16,7 +16,8 @@ class SimpleReader(abc.ABC): provider. """ - @abc.abstractproperty + @property + @abc.abstractmethod def package(self) -> str: """ The name of the package for which this reader loads resources.