Skip to content

Commit 3047085

Browse files
authored
Merge pull request #2603 from devitocodes/no-abstractproperty
misc: Purge abc.abstractproperty as it is deprecated
2 parents 94e5743 + 43f207a commit 3047085

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

devito/ir/support/space.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def __hash__(self):
5050
def _rebuild(self):
5151
return
5252

53-
@abc.abstractproperty
53+
@property
54+
@abc.abstractmethod
5455
def relaxed(self):
5556
return
5657

devito/types/args.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class ArgProvider:
1010
executed (JIT-compiled) code.
1111
"""
1212

13-
@abc.abstractproperty
13+
@property
14+
@abc.abstractmethod
1415
def _arg_names(self):
1516
raise NotImplementedError('%s does not provide any default argument names' %
1617
self.__class__)

devito/types/basic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def dtype(self):
6868
"""
6969
return
7070

71-
@abc.abstractproperty
71+
@property
72+
@abc.abstractmethod
7273
def _C_name(self):
7374
"""
7475
The name of the object in the generated code.
@@ -105,7 +106,8 @@ def _C_typedata(self):
105106

106107
return _type
107108

108-
@abc.abstractproperty
109+
@property
110+
@abc.abstractmethod
109111
def _C_ctype(self):
110112
"""
111113
The type of the object in the generated code as a `ctypes` class.

0 commit comments

Comments
 (0)