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

🗑️ Deprecate shell_complete and continue to use autocompletion for CLI parameters #974

Merged
merged 12 commits into from
Dec 4, 2024

Conversation

svlandeg
Copy link
Member

@svlandeg svlandeg commented Sep 5, 2024

Cf issue: #949

After some internal discussion with Tiangolo, we've decided to keep the autocompletion functionality in Typer as-is, to ensure minimal breaking changes for users. This also means that we won't be moving to a new argument shell_complete, as Click v8 has done.

While there were some preliminary provisions for shell_complete already in the code base, this functionality wasn't really documented or supported yet, and it didn't yet rely on type annotations, so we consider it to have been non-functional, and we'll remove it in a later version.

This PR clarifies the deprecation status both in the code, in a warning message, and in the docs.

@svlandeg svlandeg changed the title 🗑️ Deprecate shell_complete and continue to use autocompletion 🗑️ Deprecate shell_complete and continue to use autocompletion Sep 5, 2024
@svlandeg svlandeg marked this pull request as draft September 5, 2024 10:05
@svlandeg svlandeg self-assigned this Sep 5, 2024
@svlandeg svlandeg added the feature New feature, enhancement or request label Sep 5, 2024
@svlandeg svlandeg mentioned this pull request Sep 5, 2024
7 tasks
@svlandeg svlandeg linked an issue Sep 5, 2024 that may be closed by this pull request
1 task
@tiangolo
Copy link
Member

@svlandeg I'll wait for your review and opinion on #1006 before coming back to this (I haven't reviewed either 😅 ).

@svlandeg
Copy link
Member Author

svlandeg commented Dec 4, 2024

@tiangolo: as I stated on #1006 I think we can go forward with this one first, then review #1006 separately. Every edit from this PR is also present in #1006 so there should be no conflicts when merging separately, but it will be easier to review.

@svlandeg svlandeg removed their assignment Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

@tiangolo tiangolo changed the title 🗑️ Deprecate shell_complete and continue to use autocompletion 🗑️ Deprecate shell_complete and continue to use autocompletion for CLI parameters Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

@tiangolo tiangolo enabled auto-merge (squash) December 4, 2024 17:17
@tiangolo tiangolo merged commit d8e56e2 into fastapi:master Dec 4, 2024
23 checks passed
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you! 🙇 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature, enhancement or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve support for autocompletion: shell_complete vs autocompletion
2 participants