Skip to content

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
@github-actions

This comment was marked as outdated.

@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
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@svlandeg svlandeg mentioned this pull request Sep 5, 2024
7 tasks
@github-actions

This comment was marked as outdated.

@svlandeg svlandeg linked an issue Sep 5, 2024 that may be closed by this pull request
1 task
@github-actions

This comment was marked as outdated.

@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
@github-actions

This comment was marked as outdated.

@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
@github-actions
Copy link
Contributor

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