Skip to content

Remove deprecated salt.features module (removed in 3009 per warn_until gate) - #70183

Open
dwoz wants to merge 1 commit into
saltstack:masterfrom
dwoz:dwoz/removed/salt-features
Open

Remove deprecated salt.features module (removed in 3009 per warn_until gate)#70183
dwoz wants to merge 1 commit into
saltstack:masterfrom
dwoz:dwoz/removed/salt-features

Conversation

@dwoz

@dwoz dwoz commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Motivation

The salt.features singleton (Features.get) has been on a warn_until(3009, ...) gate since 3007. Master builds toward 3009 (Potassium), so this is the release that ships with the module gone.

Nothing in the tree still consumes it:

  • The three real feature flags (x509_v2, enable_deprecated_orchestration_flag, enable_deprecated_module_search_path_priority) already read directly from __opts__["features"] / opts.get("features", {}).
  • The only in-tree callers of the singleton were the 5 salt.features.setup_features(opts) calls in salt/config/__init__.py, populating a shim that no runtime code reads.
  • Zero test references.

Files changed

  • salt/features.py -- deleted.
  • salt/config/__init__.py -- dropped import salt.features and all 5 setup_features(opts) call sites.
  • changelog/*.removed.md -- added.

Migration

External users of from salt.features import features should read opts["features"] / __opts__["features"] directly:

if __opts__.get("features", {}).get("<flag>"):
    ...

Testing

Ran the following suites locally against this branch (Python 3.14 venv):

  • tests/pytests/unit/config -- 163 passed, 2 skipped
  • tests/pytests/unit/loader -- 48 passed, 2 skipped
  • tests/unit/modules/test_x509.py + tests/pytests/unit/modules/test_x509_v2.py -- 3 passed, 13 skipped
  • tests/unit/states/test_x509.py -- 2 passed, 1 skipped
  • tests/pytests/unit/states/saltmod -- 36 passed

Pre-commit clean on all changed files.

@dwoz
dwoz requested a review from a team as a code owner August 29, 2026 00:38
…l gate)

The salt.features singleton (Features.get) has been on a warn_until(3009)
gate since 3007. Master builds toward 3009 (Potassium), so this is the
release that ships with the module gone.

Nothing in the tree still consumes it:

  - The three real feature flags (x509_v2,
    enable_deprecated_orchestration_flag,
    enable_deprecated_module_search_path_priority) already read directly
    from __opts__["features"] / opts.get("features", {}).
  - The only in-tree callers of the singleton were the 5
    salt.features.setup_features(opts) calls in salt/config/__init__.py
    (populating a shim that no runtime code reads).
  - No test references.

Changes:

  - Delete salt/features.py.
  - salt/config/__init__.py: drop the "import salt.features" and all
    5 setup_features(opts) call sites.
  - Add changelog fragment.

External users of "from salt.features import features" should migrate
to reading opts["features"] / __opts__["features"] directly:

    if __opts__.get("features", {}).get("<flag>"):
        ...
@dwoz
dwoz force-pushed the dwoz/removed/salt-features branch from 8ac8fbe to 1b463b2 Compare August 29, 2026 00:38
@dwoz dwoz added this to the Potassium v3009.0 milestone Aug 29, 2026
@dwoz dwoz added the test:full Run the full test suite label Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant