fix(cli): restore Click and Windows locale compatibility#9767
Open
tianmind-studio wants to merge 2 commits into
Open
fix(cli): restore Click and Windows locale compatibility#9767tianmind-studio wants to merge 2 commits into
tianmind-studio wants to merge 2 commits into
Conversation
Collaborator
|
Thanks for the focused CLI compatibility fix. I verified the Python CLI suite behavior locally in a clean venv with secrets stripped:
I’m leaving this as a positive signal rather than a formal approval because this changes dependency bounds and the current automation policy requires maintainer review for dependency-sensitive changes. Maintainer check should mainly confirm that holding Typer below 0.26 is the desired short-term compatibility strategy versus refactoring the CLI exception handling for the newer Typer boundary. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
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
omi-clisubclasses the externalclick.ClickExceptionAPICliErrorpayloadWhy
Typer 0.26 introduced a breaking boundary by vendoring Click and no longer supporting direct external Click integration: https://typer.tiangolo.com/tutorial/click/. The current
typer>=0.12,<1.0range therefore resolves to a version whose exception base is different fromomi-cli'sCliErrorbase. Six stable exit-code/error-rendering tests fail under Typer 0.26.8.Separately,
Path.read_text()inherits the Windows system code page. On a GBK host, all four CLI/OpenAPI contract tests fail while decoding the repository's UTF-8 JSON.This keeps the last compatible Typer series available (
0.25.x) rather than pinning one patch release, and makes the contract reader independent of host locale.Testing
PYTHONUTF8=0:12 passed123 passed, 2 deselectedgit diff --check: passedBefore the fix, the six external-Click error paths failed under Typer 0.26.8 and the four OpenAPI cases failed with
UnicodeDecodeErrorunder the Windows locale.