Skip to content

Typer 0.26+ vendored Click boundary blocks support for current Typer 0.27.x #107

Description

@codeforester

Problem

The Typer extra is currently constrained to typer>=0.12,<0.26. Current Typer releases are in the 0.27.x line, so teams adopting base-cli[typer] alongside current Typer versions encounter a dependency conflict.

Root cause

Typer 0.26+ vendors its own Click implementation. The base-cli adapter currently requires an external click.Command in get_typer_command() and App.attach(), then instruments Click-specific command, parameter, and exception behavior. Typer 0.26+ therefore cannot pass the current attachment boundary safely.

Scope

Support both the existing Typer 0.25 / external Click boundary and the Typer 0.26+ vendored-Click boundary, or document a deliberate long-term compatibility boundary if native support is not feasible. The compatibility design must avoid mixing exception and command classes from the two Click implementations.

Recommended implementation

  1. Audit the adapter and attachment paths for external Click type checks, parameter mutation, command instrumentation, main() wrapping, nested command resolution, and exception handling.
  2. Introduce a narrow compatibility abstraction or dedicated Typer vendored-Click path.
  3. Add downstream coverage for Typer 0.25, 0.26, and current 0.27.x.
  4. Widen the optional dependency range only after the matrix passes.
  5. Update the adapter documentation and changelog with the supported Typer range and migration notes.

Acceptance criteria

  • base-cli[typer] resolves with the supported current Typer release.
  • The Beacon compatibility consumer passes for every supported Typer line.
  • Help, parameter validation, lifecycle options, errors, nested commands, redaction, and testing behavior remain covered.
  • The supported Python matrix remains green.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions