Skip to content

Fix odict deprecation warnings#16

Merged
marmarek merged 1 commit into
QubesOS:mainfrom
therohityadav:fix-odict-deprecation-10742
Mar 14, 2026
Merged

Fix odict deprecation warnings#16
marmarek merged 1 commit into
QubesOS:mainfrom
therohityadav:fix-odict-deprecation-10742

Conversation

@therohityadav

@therohityadav therohityadav commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

Description

Replace deprecated salt.utils.odict imports with salt.utils.datastructures.OrderedDict and DefaultOrderedDict .

This removes the DeprecationWarning spam seen during qubesctl runs.

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

Comment thread _modules/topd.py Outdated
from salt.exceptions import SaltRenderError
from salt.utils.odict import (OrderedDict, DefaultOrderedDict)
from collections import OrderedDict
from salt.utils.datastructures import DefaultOrderedDict

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use different libraries? It seems that salt.utils.datastructures has both OrderedDict and DefaultOrderedDict`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use different libraries? It seems that salt.utils.datastructures has both OrderedDict and DefaultOrderedDict`.

Sorry for the mistake. I have updated to import both OrderedDict and DefaultOrderedDict from salt.utils.datastructures and pushed an updated commit.

@therohityadav therohityadav force-pushed the fix-odict-deprecation-10742 branch from 3cd4195 to 1d03118 Compare March 5, 2026 11:26
Comment thread _utils/fileinfo.py Outdated

# Import salt libs
from salt.utils.odict import OrderedDict
from collections import OrderedDict

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

Comment thread _utils/matcher.py Outdated

# Import salt libs
from salt.utils.odict import OrderedDict
from collections import OrderedDict

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread _utils/pathinfo.py Outdated

# Import salt libs
from salt.utils.odict import OrderedDict
from collections import OrderedDict

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@therohityadav therohityadav force-pushed the fix-odict-deprecation-10742 branch from 1d03118 to e07e6fd Compare March 5, 2026 13:58
@ben-grande

ben-grande commented Mar 6, 2026

Copy link
Copy Markdown

@marmarek this repo is missing labels: openqa-group*, to run with QubesOS/qubes-mgmt-salt-dom0-qvm#37 and other PRs that I have placed the same label for the new contributors.

This commit is fine by me.

@marmarek

marmarek commented Mar 9, 2026

Copy link
Copy Markdown
Member

I added openqa-group-2 here

@ben-grande

ben-grande commented Mar 9, 2026

Copy link
Copy Markdown

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.

@qubesos-bot

qubesos-bot commented Mar 9, 2026

Copy link
Copy Markdown

OpenQA test summary

Complete 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 unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update

Failed tests

No failures!

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/166096#dependencies
Nothing fixed

Unstable tests

Details

Performance Tests

Performance degradation:

No issues

Remaining performance tests:

13 tests
  • debian-13-xfce_dom0-dispvm-api (mean:6.539): 78.47 🟢 ( previous job: 79.83, improvement: 98.29%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:7.827): 93.92 🔻 ( previous job: 92.49, degradation: 101.55%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.149): 37.79 🟢 ( previous job: 44.94, improvement: 84.08%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:2.917): 35.00 🟢 ( previous job: 41.46, improvement: 84.42%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:3.307): 39.69 🟢 ( previous job: 47.01, improvement: 84.43%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:2.284): 27.41 🟢 ( previous job: 37.67, improvement: 72.75%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.809): 33.71 🟢 ( previous job: 36.76, improvement: 91.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.441): 29.29 🟢 ( previous job: 37.87, improvement: 77.36%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.989): 59.87 🔻 ( previous job: 55.58, degradation: 107.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:4.135): 49.62 🔻 ( previous job: 47.73, degradation: 103.97%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:4.198): 50.38 🔻 ( previous job: 47.11, degradation: 106.93%)
  • debian-13-xfce_dom0-vm-api (mean:0.038): 0.45 🔻 ( previous job: 0.41, degradation: 109.93%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.039): 0.47 🟢 ( previous job: 0.48, improvement: 96.67%)

@ben-grande

Copy link
Copy Markdown

Passed openQA. Solved the issue.

Compare run including this test with run without this test.

@marmarek marmarek merged commit e07e6fd into QubesOS:main Mar 14, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qubesctl spams odict releated deprecation warnings

4 participants