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.