diff --git a/sopel/config/types.py b/sopel/config/types.py index 2abb5fda6c..3d4ed33f3d 100644 --- a/sopel/config/types.py +++ b/sopel/config/types.py @@ -31,7 +31,7 @@ import re import sys -from sopel.tools import get_input +from sopel.tools import deprecated, get_input if sys.version_info.major >= 3: unicode = str @@ -264,6 +264,11 @@ def __delete__(self, instance): instance._parser.remove_option(instance._section_name, self.name) +@deprecated( + reason="Use BooleanAttribute instead of ValidatedAttribute with bool as parser", + version='7.1', + removed_in='9.0', +) def _parse_boolean(value): if value is True or value == 1: return value @@ -272,6 +277,11 @@ def _parse_boolean(value): return bool(value) +@deprecated( + reason="Use BooleanAttribute instead of ValidatedAttribute with bool as parser", + version='7.1', + removed_in='9.0', +) def _serialize_boolean(value): return 'true' if _parse_boolean(value) else 'false'