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

🐛 Fix broken installation when upgrading from typer <0.12.0 to typer >=0.12.0, make typer independent of typer-slim, include typer command in typer package #791

Merged
merged 17 commits into from
Apr 5, 2024

Conversation

tiangolo
Copy link
Member

@tiangolo tiangolo commented Apr 5, 2024

🐛 Fix broken installation when upgrading from typer <0.12.0 to typer >=0.12.0, make typer independent of typer-slim, include typer command in typer package.

This would solve the issue #790

Current state as of 0.12.0

Since version 0.12.0, the typer pip installable package doesn't include the typer Python importable package/module, instead it declares it depends on the pip installable package typer-slim[standard], to include the standard extras.

And the pip installable package typer-slim is the one that provides the Python importable typer package/module.

But this is problematic for old installations, because of the way package managers handle them, they install typer-slim, including the typer directory with the code, then they remove the old typer package with its associated files, which means removing almost all the files in the typer directory, only leaving the new files since version 0.12.0.

In this PR

Now the pip installable typer includes all the dependencies in typer-slim, plus the dependencies defined in typer-slim[standard]. So, typer no longer depends on typer-slim. And the pip installable typer package includes the code, the Python importable package/module typer. Now typer includes the typer command.

And typer-slim includes the same, but without installing the optional dependencies by default, only including an optional dependencies group standard (with rich and shellingham).

Now typer-cli doesn't really do anything, it's there only for backwards compatibility, for a bit, for those that could have it as a dependency. Typer now includes the typer command.

Copy link

github-actions bot commented Apr 5, 2024

📝 Docs preview for commit 0f3fb31 at: https://f5e89068.typertiangolo.pages.dev

Copy link

github-actions bot commented Apr 5, 2024

📝 Docs preview for commit 4051ad1 at: https://d3e6e116.typertiangolo.pages.dev

@tiangolo tiangolo added the bug Something isn't working label Apr 5, 2024
@tiangolo tiangolo enabled auto-merge (squash) April 5, 2024 00:25
Copy link

github-actions bot commented Apr 5, 2024

📝 Docs preview for commit b3b823b at: https://fbfdd558.typertiangolo.pages.dev

@tiangolo tiangolo merged commit 05ffb24 into master Apr 5, 2024
16 checks passed
@tiangolo tiangolo deleted the fix-typer-package-src branch April 5, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant