fix: pin typer>=0.24.0 and click>=8.2.1 to fix import crash#2136
Merged
mnriem merged 1 commit intogithub:mainfrom Apr 8, 2026
Merged
fix: pin typer>=0.24.0 and click>=8.2.1 to fix import crash#2136mnriem merged 1 commit intogithub:mainfrom
mnriem merged 1 commit intogithub:mainfrom
Conversation
typer <0.24.0 under-constrains its click dependency (click>=8.0.0), allowing resolvers to pick click <8.2 which lacks __class_getitem__ on click.Choice. This causes 'TypeError: type Choice is not subscriptable' at import time on any Python version. Pin typer>=0.24.0 (which correctly requires click>=8.2.1) and click>=8.2.1 to prevent incompatible combinations. Fixes github#2134
Contributor
There was a problem hiding this comment.
Pull request overview
Pins CLI framework dependencies to avoid an import-time crash caused by older click versions being selected by dependency resolvers (fixes #2134).
Changes:
- Require
typer>=0.24.0to ensure proper downstreamclickconstraints. - Require
click>=8.2.1to preventTypeError: type 'Choice' is not subscriptableat import time.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Tightens runtime dependency minimums for typer and click to prevent resolver-selected incompatible click versions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
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.
Summary
Fixes #2134
Pin
typer>=0.24.0andclick>=8.2.1inpyproject.tomlto prevent an import-time crash.Problem
typerversions prior to 0.24.0 under-constrain theirclickdependency (click>=8.0.0), allowing dependency resolvers to pickclick <8.2. Those older click versions lack__class_getitem__onclick.Choice, causing:at import time on any Python version (3.11, 3.12, 3.13).
Fix
typer>=0.24.0— this version correctly requiresclick>=8.2.1click>=8.2.1— this version supports the generic subscript syntax typer usesBoth packages still support Python >=3.10, so our
requires-python = ">=3.11"is unaffected.Testing
All 1195 existing tests pass.