Fix odict deprecation warnings#16
Conversation
| from salt.exceptions import SaltRenderError | ||
| from salt.utils.odict import (OrderedDict, DefaultOrderedDict) | ||
| from collections import OrderedDict | ||
| from salt.utils.datastructures import DefaultOrderedDict |
There was a problem hiding this comment.
Why use different libraries? It seems that salt.utils.datastructures has both OrderedDict and DefaultOrderedDict`.
There was a problem hiding this comment.
Why use different libraries? It seems that
salt.utils.datastructureshas bothOrderedDictand DefaultOrderedDict`.
Sorry for the mistake. I have updated to import both OrderedDict and DefaultOrderedDict from salt.utils.datastructures and pushed an updated commit.
3cd4195 to
1d03118
Compare
|
|
||
| # Import salt libs | ||
| from salt.utils.odict import OrderedDict | ||
| from collections import OrderedDict |
There was a problem hiding this comment.
I find a bit weird that some places are import salt.utils.datastructures and others are importing collections to get OrderedDict. I think it is better to only use salt.utils.datastructures in this case, for uniformity and becaues DefaultOrderedDict, required in other modules, is only present in the salt module.
There was a problem hiding this comment.
I find a bit weird that some places are import
salt.utils.datastructuresand others are importingcollectionsto getOrderedDict. I think it is better to only usesalt.utils.datastructuresin this case, for uniformity and becauesDefaultOrderedDict, required in other modules, is only present in the salt module.
Sir, I initially split them because the original deprecation warning explicitly suggested using the standard library's collections.OrderedDict and DefaultOrderedDict forced me to use salt.utils.datastructures .
I have updated all the collections imports across the files to use salt.utils.datastructures instead.
Thanks you for the review.
|
|
||
| # Import salt libs | ||
| from salt.utils.odict import OrderedDict | ||
| from collections import OrderedDict |
There was a problem hiding this comment.
|
|
||
| # Import salt libs | ||
| from salt.utils.odict import OrderedDict | ||
| from collections import OrderedDict |
There was a problem hiding this comment.
1d03118 to
e07e6fd
Compare
|
@marmarek this repo is missing labels: This commit is fine by me. |
|
I added openqa-group-2 here |
|
openQArun PR_LABEL=openqa-group-2 This repo is probably not enabled to schedule the runs... will try on another one. Forgot to check openqa-tests-qubesos definition. |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026031319-4.3-debian&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update Failed testsNo failures! Fixed failuresCompared to: https://openqa.qubes-os.org/tests/166096#dependencies Unstable testsDetailsPerformance TestsPerformance degradation:No issues Remaining performance tests:13 tests
|
|
Passed openQA. Solved the issue. Compare run including this test with run without this test. |
Description
Replace deprecated
salt.utils.odictimports withsalt.utils.datastructures.OrderedDictandDefaultOrderedDict.This removes the DeprecationWarning spam seen during
qubesctlruns.Note: This is part 1 of a two-part fix. The second part is in
qubes-mgmt-salt-dom0-qvm.Fixes QubesOS/qubes-issues#10742