Introduce Parameter.deprecated + Command.deprecated message customization#2271
Conversation
|
Hello @peacock0803sz , thanks for the PR and sorry for the long delay. This seems fine to me, and very helpful for user to use click in a backward compatible way. However, this PR lacks a very important compnant: Once someone does use a deprecated option, a warning should be printed. This is done today with deprecated commands. You can look here for inspiration. Please fix this issue before I review this PR again. |
7b559a4 to
38f920f
Compare
--help|
I just updated the PR and made the following changes:
I noticed that
|
|
What's the reason for disallowing prompt w/ deprecated args? |
|
@ThiefMaster as with Correct me if my understanding around the use of |
|
Done |
|
Ah yes, I thought it prompts for a value when specifying the option. But it prompts when the option is not provided so I guess it makes more sense to disallow it. |
|
There seem to be no comments so I am merging this. |
…red/prompt, and add tests.
2daf826 to
66d36d5
Compare
Implement of #2263, Showing deprecation message with
--helpfor@click.optionChecklist:
CHANGES.rstsummarizing the change and linking to the issue... versionchanged::entries in any relevant code docs.pre-commithooks and fix any issues.pytestandtox, no tests failed.