fastapi / typer

Typer, build great CLIs. Easy to code. Based on Python type hints.
https://typer.tiangolo.com/
MIT License
15.66k stars 666 forks source link

🗑️ Deprecate `shell_complete` and continue to use `autocompletion` #974

Open svlandeg opened 1 month ago

svlandeg commented 1 month ago

Cf issue: https://github.com/fastapi/typer/issues/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.

github-actions[bot] commented 1 month ago

📝 Docs preview for commit 749cadef5b929a7f30dc896c7e65503ac8e6d1a4 at: https://6b09d267.typertiangolo.pages.dev

Modified Pages

github-actions[bot] commented 1 month ago

📝 Docs preview for commit 286b94eff7feae06a9bdd4914ec91baf3b6e51bb at: https://b744c2ac.typertiangolo.pages.dev

Modified Pages

github-actions[bot] commented 1 month ago

📝 Docs preview for commit ca4ca2c1740bf8b42978a8741682e3dc36045f84 at: https://214d2bbc.typertiangolo.pages.dev

Modified Pages

github-actions[bot] commented 1 month ago

📝 Docs preview for commit 2261391a7c5cd0ec416fb8d65a7390b81144cc68 at: https://bde7f85a.typertiangolo.pages.dev

Modified Pages

github-actions[bot] commented 1 month ago

📝 Docs preview for commit e17a0f56bd05effcaaafcec6263fddd84d3a4098 at: https://b6cd9db3.typertiangolo.pages.dev

Modified Pages