Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecation warning for the mol command #3407

Merged
merged 5 commits into from
Feb 6, 2022

Conversation

mperry2
Copy link
Contributor

@mperry2 mperry2 commented Jan 21, 2022

The mol command can be replaced with a shell alias for those users that need
it. Output a deprecation warning when the mol command is run that informs the
user that the command will be removed in a future release of Molecule.

Addresses issue #3406

@@ -21,5 +21,17 @@

from molecule.shell import main


def mol_deprecation_notice():
print(
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use the warnings module here since there is already support for deprecating things.

@ssbarnea ssbarnea added the bug label Jan 24, 2022
The `mol` command can be replaced with a shell alias for those users that need
it. Output a deprecation warning when the `mol` command is run that informs the
user that the command will be removed in a future release of Molecule.
@mperry2
Copy link
Contributor Author

mperry2 commented Jan 26, 2022

I've updated the commit to use the warnings module. I set the category to UserWarning because output wasn't produced when I used DeprecationWarning, although the latter seems like it would be correct. Let me know if I need to change that.

@mperry2 mperry2 requested a review from tadeboro February 3, 2022 06:21

Verified

This commit was created on github.com and signed with GitHub’s verified signature. The key has expired.
@ssbarnea ssbarnea enabled auto-merge (squash) February 6, 2022 15:50
@ssbarnea ssbarnea merged commit b7881b6 into ansible:main Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants