Skip to content

deps: support Typer 0.24 through 0.27 - #111

Merged
JPHutchins merged 6 commits into
intercreate:mainfrom
mniestroj:deps/typer-latest
Sep 7, 2026
Merged

JPHutchins merged 6 commits into
intercreate:mainfrom
mniestroj:deps/typer-latest

Conversation

@mniestroj

Copy link
Copy Markdown
Contributor

Widen the Typer constraint from the exact pin typer[all]==0.24.1 to
typer>=0.24,<0.28, and declare two dependencies that smpmgr imports but never
declared.

smpmgr asks for typer[all]. Typer publishes no extras at all - the
metadata for 0.24 lists Provides-Extra as empty - so the request has
never resolved to anything. Poetry ignores it without comment; other
resolvers warn and carry on.

What the extra is presumably meant to secure, rich and shellingham, are
unconditional dependencies of Typer proper, so they arrive either way.

Drop it. The pinned version is deliberately left alone, so that the
extra is the only thing in question here: nothing in the resolved graph
moves, and the lock changes by its content hash alone.
smpmgr.logging imports click and hands the module to RichHandler as one
of its tracebacks_suppress entries, but click is not declared anywhere.
It arrives transitively - today from typer, and otherwise from bumble,
which reaches us through smpclient's "all" extra.

Neither is a promise we are owed. Typer stops depending on click in
0.26, which the next commits allow us to resolve, and bumble only
depends on it away from Emscripten. That leaves an import we rely on
resting entirely on other packages' internal choices.

Declare it, with the floor that Typer 0.24 itself requires.
smpmgr uses rich throughout - rich.print in most of the management
modules, rich.progress for the upload bars, rich.table, and
rich.logging.RichHandler - across smpmgr/, both example plugins and
portable.py. None of it is declared.

Every one of those imports currently rests on Typer, the only package
in the graph that requires rich. That is a thinner thread than click
had, which at least also arrives via bumble, and Typer has already
shown it will shed a dependency it no longer needs: click went in 0.26.

Declare it, at the floor Typer 0.24 already requires. Nothing in the
resolved graph moves.
tests/test_TODO.py asserted only that smpmgr.main imports, which says
nothing about whether the Typer application it builds is usable. A
regression in command registration or option declaration would have gone
unnoticed.

Replace it with tests that drive the real application through Typer's
test runner and assert on behaviour that has to hold whichever Typer
release is installed: the command tree is constructed, nested help
works, --version reports the package version, running without a command
asks for one, and the global transport options parse without opening a
connection.

The assertions target exit codes, command names and stable messages
rather than snapshotting terminal output, so Typer stays free to change
how it renders help.
The exact pin on Typer 0.24.1 makes smpmgr awkward to co-install with
anything else that depends on Typer, and buys little: the CLI uses only
long-stable parts of the API, and the preceding tests now hold that
surface down.

Widen it to >=0.24,<0.28. The upper bound is deliberate rather than
open-ended, so that a future 0.28 is not absorbed before anyone has
tested it; the next commit puts both ends of the range under CI.

Development now resolves Typer 0.27.2. Nothing else in the resolved
graph moves - click and rich are declared directly now, so Typer having
dropped click in 0.26 costs us nothing.
With Typer specified as a range, the locked version is only one of the
versions a user can end up with - and it is the only one CI would
otherwise ever exercise.

Add the endpoints of the supported range, 0.24.0 and 0.27.2, to the lint
and test matrices, installed over the locked environment.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency, lockfile, tests, and CI matrix changes consistently establish the stated compatibility range.

Pull request overview

Widens supported Typer versions while explicitly declaring runtime dependencies and adding CLI compatibility coverage.

Changes:

  • Supports Typer 0.24 through 0.27.
  • Declares Click and Rich dependencies.
  • Tests CLI behavior against both compatibility endpoints.
File summaries
File Description
pyproject.toml Updates runtime dependency constraints.
poetry.lock Locks Typer 0.27.2 and resolved dependencies.
tests/test_cli.py Adds CLI smoke and option tests.
tests/test_TODO.py Removes placeholder test.
.github/workflows/test.yaml Tests both Typer endpoints.
.github/workflows/lint.yaml Lints against both Typer endpoints.
Review details
  • Files reviewed: 5/6 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@JPHutchins JPHutchins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@JPHutchins
JPHutchins merged commit ebed614 into intercreate:main Sep 7, 2026
21 checks passed
@mniestroj
mniestroj deleted the deps/typer-latest branch September 11, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants