Remove orphaned salt.utils.namecheap module (refs #61209)#69239
Open
ggiesen wants to merge 1 commit into
Open
Conversation
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.
1 task
Contributor
Author
|
Base rationale: keeping this on master. It removes the orphaned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Removes the orphaned
salt/utils/namecheap.pymodule (and its entry in thetools/precommit/docstrings.pyallowlist).This util was only ever used by the
namecheap_*execution and state modules, which were moved out of Salt core to thesaltext.namecheapcommunity extension. A repo-wide search confirms nothing insalt/still importssalt.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 subscriptablefromsalt.utils.namecheap.get_opts: the util set a module-level__salt__ = Noneand only populated it in__virtual__(viasalt.loader.minion_mods), but thenamecheap_*modules imported it as a plain module and calledget_optsdirectly, so__salt__was never set.saltext.namecheapalready fixes this (itsget_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.pyshipped in core with no remaining consumers after thenamecheap_*modules were moved tosaltext.namecheap.New Behavior
The orphaned module is removed.
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
changelog/61209.removed.mdCommits signed with GPG?
No