Skip to content

[TECH DEBT] Deprecate salt/utils/odict.py #68440

@dwoz

Description

@dwoz

• Why Deprecate salt/utils/odict.py

  • Python ≥3.7 preserves insertion order in plain dict, and collections.OrderedDict remains available for edge cases, so our bespoke wrapper no longer provides unique behavior.
  • The module duplicating DefaultOrderedDict/HashableOrderedDict adds maintenance and import overhead; moving these helpers into salt.utils.datastructures gives them a clearer home while keeping the API.
  • Loader profiling showed each odict.OrderedDict carries extra linked-list payload and import bookkeeping; using stdlib types trims memory and speeds module scans.
  • Dropping salt.utils.odict simplifies the dependency graph (fewer Salt-specific imports in execution/state modules and tests), making code easier to read and align with third-party expectations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions