-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Introduce Parameter.deprecated + Command.deprecated message customization #2271
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
--help
for@click.option
Checklist:
CHANGES.rst
summarizing the change and linking to the issue... versionchanged::
entries in any relevant code docs.pre-commit
hooks and fix any issues.pytest
andtox
, no tests failed.