-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
This is more of a proposal than a request, so feel free to close this as won't implement, but it would be great to have a Command
subclass/decorator to handle deprecated commands. The thought is that I could decorate my deprecated command and include a Callable parameter that represents the command that is replacing it. The value of having a decorator like this is that Click could standardize deprecation logic in help messaging and in command calls to state the deprecation notice and to provide the alternate command.
When searching for a solution to this problem, I came across this SO post which details how to subclass Option
and Command
for a similar use case: https://stackoverflow.com/questions/50366719/correct-way-to-deprecate-parameter-alias-in-click
I am happy to look into this approach if it is the preferred way to address such a problem, but wanted to mention it here first. Thanks for the consideration!