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

Drop the click-completion dependency in favor of the native implementation of click==8.0 #5098

Closed
sphuber opened this issue Aug 25, 2021 · 5 comments · Fixed by #5111
Closed
Assignees

Comments

@sphuber
Copy link
Contributor

sphuber commented Aug 25, 2021

As of click v8.0, tab-completion is now supported natively, as described here in the docs. So far we have been using the click-completion extension which may now be no longer necessary.

There has been an open issue for a while asking whether click-completion can be considered deprecated or whether it still provides more functionality that isn't yet in click. From a first glance, it seems everything we need is there. The only downside is that the completion activation command is now shell dependent and Power shell is not natively supported, but I doubt that this should be a deal breaker.

@chrisjsewell
Copy link
Member

Thanks @sphuber, we should look at https://github.com/pallets/click/blob/main/CHANGES.rst#version-800, and have a think if there is anything that either (a) may cause an issue or (b) could additionally improve/replace anything in our current implementation

@chrisjsewell
Copy link
Member

When a long option name isn't valid, use difflib to make better suggestions for possible corrections. :issue:1446

could maybe replace our internal implementation

@chrisjsewell
Copy link
Member

Use Context.with_resource() to manage resources that would normally be used in a with statement, allowing them to be used across subcommands and callbacks, then cleaned up when the context ends. :pr:1191

this feels like it could have some use, e.g. in #5085 i was thinking it would be “strictly” of the logging config was reset after the cli call (although usually this does not matter, since you only call the CLI for a single “action”)

@sphuber
Copy link
Contributor Author

sphuber commented Aug 25, 2021

Did you close this by accident?

@chrisjsewell chrisjsewell reopened this Aug 25, 2021
@chrisjsewell
Copy link
Member

Oops yeh; the danger of replying on your phone lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants