Skip to content

Remove orphaned salt.utils.namecheap module (refs #61209)#69239

Open
ggiesen wants to merge 1 commit into
saltstack:masterfrom
ggiesen:remove-orphaned-namecheap-util-61209
Open

Remove orphaned salt.utils.namecheap module (refs #61209)#69239
ggiesen wants to merge 1 commit into
saltstack:masterfrom
ggiesen:remove-orphaned-namecheap-util-61209

Conversation

@ggiesen
Copy link
Copy Markdown
Contributor

@ggiesen ggiesen commented May 27, 2026

What does this PR do?

Removes the orphaned salt/utils/namecheap.py module (and its entry in the tools/precommit/docstrings.py allowlist).

This util was only ever used by the namecheap_* execution and state modules, which were moved out of Salt core to the saltext.namecheap community extension. A repo-wide search confirms nothing in salt/ still imports salt.utils.namecheap; the modules, states, tests and doc pages are all already gone.

What issues does this PR fix or reference?

Refs #61209

That issue reported 'NoneType' object is not subscriptable from salt.utils.namecheap.get_opts: the util set a module-level __salt__ = None and only populated it in __virtual__ (via salt.loader.minion_mods), but the namecheap_* modules imported it as a plain module and called get_opts directly, so __salt__ was never set. saltext.namecheap already fixes this (its get_opts(config_option, ...) takes the config getter from the calling module), so this PR removes the now-unreachable core copy rather than patching it.

Previous Behavior

salt/utils/namecheap.py shipped in core with no remaining consumers after the namecheap_* modules were moved to saltext.namecheap.

New Behavior

The orphaned module is removed.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

  • Docs
  • Changelog - changelog/61209.removed.md
  • Tests written/updated - n/a (code removal; the module already had no tests in core)

Commits signed with GPG?

No

salt.utils.namecheap was only used by the namecheap_* execution and state
modules, which were moved out of Salt core to the saltext.namecheap community
extension. The util module was left behind with no remaining consumers, so
remove it (and its entry in the docstrings pre-commit allowlist).

The bug reported in saltstack#61209 (the util's module-level __salt__ was None, so
__salt__["config.option"] raised 'NoneType' object is not subscriptable) lives
in this orphaned code. saltext.namecheap already fixes it by passing the config
getter in from the calling module rather than relying on loader-injected
dunders.
@ggiesen
Copy link
Copy Markdown
Contributor Author

ggiesen commented May 27, 2026

Base rationale: keeping this on master. It removes the orphaned salt.utils.namecheap module, left behind after the namecheap_* modules were removed in 3008.0. 3006.x/3007.x still ship those modules (which import it), so it can't go there; and as a removal rather than a bug fix it belongs in the next feature release (master) rather than a 3008.1 patch.

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.

2 participants