fix: pin click to <8.2.0 to fix typer compatibility (fastapi/typer#1225)#5
Merged
fix: pin click to <8.2.0 to fix typer compatibility (fastapi/typer#1225)#5
Conversation
uglide
requested changes
May 20, 2025
| [tool.poetry.dependencies] | ||
| python = "^3.11" | ||
| typer = "^0.12.3" | ||
| click = "<8.2.0" |
Contributor
Author
There was a problem hiding this comment.
I pinned it
uglide
approved these changes
May 20, 2025
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.
Bug: TypeError when showing help with Typer 0.12.5 + Click 8.2.0 on Python 3.13.3
Description
When running a Typer application on Python 3.13.3 with Typer 0.12.5 and Click 8.2.0, calling
cli().help()or using the rich help formatter results in the following error:Steps to Reproduce
pip install typer==0.12.5)Error Traceback
The error occurs in
typer/rich_utils.pyin the_print_options_panelfunction, which callsParameter.make_metavar()without providing a context argument.Environment
This issue is seen in CI:
https://github.com/redis-developer/cae-client-testing/actions/workflows/deploy-self-hosted-runner.yml
Has started failing.
https://github.com/redis-developer/cae-client-testing/actions/runs/15118951240/job/42496572577
green run:
https://github.com/redis-developer/cae-client-testing/actions/runs/14939844759/job/41975035756
After trying to code a workaround I realised that typer developers themselves have pined the wheel.
fastapi/typer#1225
So proposing this fix for the time being.
Tested locally with the new wheels.