From 8a1cfd6b88c24b035b274b7507ed028e88de3be7 Mon Sep 17 00:00:00 2001 From: Debdut Goswami Date: Tue, 2 Jun 2026 17:35:55 +0530 Subject: [PATCH] Pin typer below 0.26 to keep click imports working Starting in typer 0.26.0, typer vendored click as the private typer._click module. The CLI imports click directly (FulfilGroup subclasses TyperGroup, other code paths use click decorators and Context) and relies on typer pulling click in transitively and on both sides sharing the same click Context. With typer >=0.26 a fresh install no longer resolves click transitively and the vendored context stops interoperating with external click imports, so the CLI breaks at import/runtime. Cap typer until the direct click imports are migrated. --- pyproject.toml | 6 +++++- uv.lock | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 921a3c2..44e6328 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,11 @@ classifiers = [ "Programming Language :: Python :: 3.13", ] dependencies = [ - "typer>=0.12.0", + # Cap typer below 0.26: starting in 0.26.0 typer vendored click privately + # (typer._click), so `import click` no longer resolves transitively and + # external-click handles stop sharing typer's Context thread-local. Lift + # this cap only alongside a migration off direct click imports. + "typer>=0.12.0,<0.26", "rich>=13.0.0", "httpx>=0.27.0", "orjson>=3.10.0", diff --git a/uv.lock b/uv.lock index 10ba2e5..47701fe 100644 --- a/uv.lock +++ b/uv.lock @@ -357,7 +357,7 @@ requires-dist = [ { name = "rich", specifier = ">=13.0.0" }, { name = "tomli", marker = "python_full_version < '3.11'", specifier = ">=2.0.0" }, { name = "tomli-w", specifier = ">=1.0.0" }, - { name = "typer", specifier = ">=0.12.0" }, + { name = "typer", specifier = ">=0.12.0,<0.26" }, ] [package.metadata.requires-dev]