8000 Add deprecation warning for the `mol` command by mperry2 · Pull Request #3407 · ansible/molecule · GitHub
[go: up one dir, main page]

Skip to content

Add deprecation warning for the mol command - #3407

Merged
ssbarnea merged 5 commits into
ansible: F438 mainfrom
mperry2:mol-dep-notice
Feb 6, 2022
Merged

ssbarnea merged 5 commits into
ansible:mainfrom
mperry2:mol-dep-notice

Conversation

@mperry2
@mperry2 mperry2 commented Jan 21, 2022 •
Copy link
Copy Markdown
Contributor

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

Comment thread src/molecule/__main__.py Outdated


def mol_deprecation_notice():
print(
Copy link
Copy Markdown
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
mperry2 commented Jan 26, 2022
Copy link
Copy Markdown
Contributor Author

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
@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.

3 participants

0