Skip to content

Commit 068a740

Browse files
alexfiklinducer
authored andcommitted
tools: remove deprecation guard
1 parent 8db8f6f commit 068a740

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

sumpy/tools.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,21 +1007,19 @@ def run_opencl_fft(
10071007
"KernelCacheWrapper": ("KernelCacheMixin", 2023),
10081008
}
10091009

1010-
if sys.version_info >= (3, 7):
1011-
def __getattr__(name):
1012-
replacement_and_obj = _depr_name_to_replacement_and_obj.get(name, None)
1013-
if replacement_and_obj is not None:
1014-
replacement, obj, year = replacement_and_obj
1015-
from warnings import warn
1016-
warn(f"'sumpy.tools.{name}' is deprecated. "
1017-
f"Use '{replacement}' instead. "
1018-
f"'sumpy.tools.{name}' will continue to work until {year}.",
1019-
DeprecationWarning, stacklevel=2)
1020-
return obj
1021-
else:
1022-
raise AttributeError(name)
1023-
else:
1024-
KernelCacheWrapper = KernelCacheMixin
1010+
1011+
def __getattr__(name):
1012+
replacement_and_obj = _depr_name_to_replacement_and_obj.get(name, None)
1013+
if replacement_and_obj is not None:
1014+
replacement, obj, year = replacement_and_obj
1015+
from warnings import warn
1016+
warn(f"'sumpy.tools.{name}' is deprecated. "
1017+
f"Use '{replacement}' instead. "
1018+
f"'sumpy.tools.{name}' will continue to work until {year}.",
1019+
DeprecationWarning, stacklevel=2)
1020+
return obj
1021+
else:
1022+
raise AttributeError(name)
10251023

10261024
# }}}
10271025

0 commit comments

Comments
 (0)