Assed deprecation warning for Salt's backport of OrderedDict class

This commit is contained in:
David Murphy 2023-11-13 10:06:59 -07:00 committed by Pedro Algarvio
parent ffab39b7e2
commit 51b781fc4b

View file

@ -24,6 +24,8 @@
from collections.abc import Callable
import salt.utils.versions
try:
# pylint: disable=E0611,minimum-python-version
import collections
@ -72,6 +74,14 @@ except (ImportError, AttributeError):
because their insertion order is arbitrary.
"""
salt.utils.versions.warn_until(
3009,
"The Salt backport `OrderedDict` class introduced for Python 2 "
"has been deprecated, and is set to be removed in {version}. "
"Please use Python 3 `OrderedDict`.",
category=FutureWarning,
)
super().__init__()
if len(args) > 1:
raise TypeError(f"expected at most 1 arguments, got {len(args)}")