Repository navigation
Support typer 0.26+, which builds on its own copy of click - #570
Merged
Merged
Conversation
From typer 0.26 the context is typer's own copy of click, so its ParameterSource is a different enum from click.core.ParameterSource. The identity check never matched DEFAULT, every option counted as given, and `maniphest create --with` refused any spec. Compare by name instead, which holds for both. Refs #330 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
typer 0.26 builds on its own copy of click, so the tests that reached for the click package found an empty completion registry, an abstract ShellComplete and a CliRunner stdin they could not patch. tests/click_layer.py picks whichever click typer is using, so the suite passes on the locked typer and on 0.27, which lock file maintenance (#534) moves to. Fixes #330 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
Lock file maintenance (#534) moves typer from 0.25.1 to 0.27.2 and fails 71 tests. Swapping one package at a time shows typer alone is the cause: click 8.5 with typer 0.25.1 passes everything.
From 0.26, typer builds on its own copy of click,
typer._click, so anything phabfive or its tests take from theclickpackage no longer matches what typer hands back.A real bug:
create --with(e0a2f67)options_giveninphabfive/cli/create_spec.pycompared the parameter source againstclick.core.ParameterSource.DEFAULT. typer's context returns its own enum, so the identity check never matched, every option counted as given, andmaniphest create --withrefused every spec.pyproject.tomlallowstyper>=0.12.0, so anyone who installs from PyPI today gets typer 0.27 and hits this. The check now compares by name, which works on both.The tests (7ed1a3f)
The completion tests used click's completion registry, which typer no longer fills, and click's
ShellComplete. typer's copy ofShellCompleteis abstract. The comment-editor tests patched the stdin wrapper inclick.testing, which typer'sCliRunnerno longer uses.tests/click_layer.pypicks whichever click typer is using. The two spec-file completer tests now take their context from the real command, so they don't need the helper.Verified
uv run pytestwith the current lock (typer 0.25.1, click 8.3.1): 5971 passeduv.lock(typer 0.27.2, click 8.5.0): 5971 passedWhen this merges, Renovate should rebase #534 and it should go green.
Fixes #330
🤖 Generated with Claude Code