π½οΈ Ensure compatibility with Click 8.3.0 by restoring the original value_is_missing function#1333
Merged
tiangolo merged 10 commits intofastapi:masterfrom Sep 19, 2025
Merged
Conversation
Member
Author
|
This must be related to pallets/click#3030 and using the "UNSET" value... |
value_is_missing function
tiangolo
approved these changes
Sep 19, 2025
Member
tiangolo
left a comment
There was a problem hiding this comment.
Thank you for the quick workaround and all the investigation and explanation, great as always! π
I'll release this now in Typer 0.18.0 π
castrojo
added a commit
to castrojo/casestudypilot
that referenced
this pull request
Feb 9, 2026
Fixes TypeError: Parameter.make_metavar() missing required argument 'ctx' Root Cause: - typer 0.9.0 (Jan 2024) is incompatible with Click 8.3.0+ (Sep 2025) - Click 8.3.0 changed Parameter.make_metavar() signature - GitHub Actions installs latest Click by default - Result: All CLI commands fail with TypeError Solution: - Upgrade to typer>=0.18.0 (includes fix from PR fastapi/typer#1333) - Minimum version 0.18.0 required for Click 8.3+ compatibility - Open-ended range allows future updates Impact: - Unblocks GitHub Copilot agent CLI operations - Fixes copilot-setup-steps workflow validation - Enables full 12-step case study generation workflow - Zero breaking changes for our usage patterns Testing: - β Local: python -m casestudypilot --help works - β All subcommands accessible (youtube-data, verify-company, assemble, extract-screenshots, validate) - β Test suite: 15/16 tests pass (1 pre-existing test issue with metric detection strictness) References: - Typer 0.18.0 release: https://github.com/fastapi/typer/releases/tag/0.18.0 - Click 8.3.0 breaking change: pallets/click#3030 - Typer compatibility fix: fastapi/typer#1333
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.
Yesterday's release of Click 8.3.0 has introduced a new internal variable
UNSETto differentiate between (truly) unset values and user-providedNonevalues. As a consequence, the methodParameter.value_is_missinginclick.corenow checks for thisUNSETvalue instead of forNone.This results in bugs when using the current Typer with Click 8.3.0+, because a required, unset parameter would be
Nonein Typer (and not the newUNSETvalue) and would eventually get the default value instead of throwing an exception.For instance:
would result in a print
"Hello None"when calling it without any arguments.Potential solutions
value_is_missingfunction to revert it back to its functionality from before 8.3.0. This at least makes the test go green, and allows users to install Click 8.3.0+UNSETvalue. This should also allow us to make different choices with respect to optional flags & flag values, cf ποΈ Deprecate support foris_flagandflag_valueparametersΒ #987. Maybe with the new functionality in Click, we can restore some of that again. But it would require careful refactoring if we also want to continue support Click 8.2 and lower.Proposal
At this point in time (right before the weekend π) I suggest to merge this PR (option 2), close #1336 (option 1) and continue working on option 3 in the next few weeks.