Skip to content

Commit 3cd4195

Browse files
committed
Fix odict deprecation warnings by using collections.OrderedDict and salt.utils.datastructures Resolves QubesOS/qubes-issues#10742
1 parent db2919b commit 3cd4195

6 files changed

Lines changed: 9 additions & 6 deletions

File tree

_modules/topd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import salt.version
2222

2323
from salt.exceptions import SaltRenderError
24-
from salt.utils.odict import (OrderedDict, DefaultOrderedDict)
24+
from collections import OrderedDict
25+
from salt.utils.datastructures import DefaultOrderedDict
2526

2627
# Import custom libs
2728
from toputils import TopUtils # pylint: disable=E0401

_utils/fileinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from itertools import (chain, compress, ) # pylint: disable=E0598
2222

2323
# Import salt libs
24-
from salt.utils.odict import OrderedDict
24+
from collections import OrderedDict
2525

2626
# Import custom libs
2727
import matcher

_utils/matcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from itertools import (chain, compress, ) # pylint: disable=E0598
2121

2222
# Import salt libs
23-
from salt.utils.odict import OrderedDict
23+
from collections import OrderedDict
2424

2525
# Enable logging
2626
log = logging.getLogger(__name__)

_utils/pathinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import os
1717

1818
# Import salt libs
19-
from salt.utils.odict import OrderedDict
19+
from collections import OrderedDict
2020

2121
# Import custom libs
2222
import matcher

_utils/pathutils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
import salt.fileclient
6161

6262
from salt.exceptions import SaltRenderError
63-
from salt.utils.odict import (OrderedDict, DefaultOrderedDict)
63+
from collections import OrderedDict
64+
from salt.utils.datastructures import DefaultOrderedDict
6465
from salt.utils.url import urlparse
6566

6667
# Import custom libs

_utils/toputils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
# Import salt libs
4242
from salt.exceptions import SaltRenderError
43-
from salt.utils.odict import (OrderedDict, DefaultOrderedDict)
43+
from collections import OrderedDict
44+
from salt.utils.datastructures import DefaultOrderedDict
4445
from salt.utils.jinja import PrintableDict
4546

4647
# Import custom libs

0 commit comments

Comments
 (0)