mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Assed deprecation warning for Salt's backport of OrderedDict class
This commit is contained in:
parent
ffab39b7e2
commit
51b781fc4b
1 changed files with 10 additions and 0 deletions
|
@ -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)}")
|
||||
|
|
Loading…
Add table
Reference in a new issue