fix(cli): Migrate CLI to typer >=0.26#2080
Merged
Merged
Conversation
typer >=0.26typer >=0.26
Collaborator
Author
Mantisus
requested review from
Pijukatel and
vdusek
and removed request for
vdusek
July 19, 2026 11:38
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates crawlee’s CLI implementation to be compatible with typer >= 0.26 by removing direct usage of external click types (notably click.Choice) and relying on Typer’s own choice handling, allowing the typer<0.26 pin to be dropped (per #2063).
Changes:
- Refactored
createcommand parameters to usetyping.Annotated+ Literal-based choice typing instead ofclick.Choice. - Relaxed the
cliextra dependency constraint totyper>=0.26.0. - Re-locked dependencies, updating
uv.lockto a newer Typer version.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/crawlee/_cli.py |
Removes external click.Choice usage and switches CLI option typing to Typer-friendly annotations. |
pyproject.toml |
Drops the typer<0.26 pin for the cli extra. |
uv.lock |
Updates the resolved Typer version and dependency metadata after re-locking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+39
to
+42
| else: | ||
| CrawlerType = Literal[tuple(crawler_choices)] | ||
| HttpClientType = Literal[tuple(http_client_choices)] | ||
| PackageManagerType = Literal[tuple(package_manager_choices)] |
Collaborator
|
Looks good, lets just verify that E2E tests are ok: https://github.com/apify/crawlee-python/actions/runs/29748094500 |
Pijukatel
approved these changes
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
typerand no longer uses direct calls toclickIssues
typer<0.26pin #2063