deps: support Typer 0.24 through 0.27 - #111
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
🟢 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.
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.
Widen the Typer constraint from the exact pin
typer[all]==0.24.1totyper>=0.24,<0.28, and declare two dependencies that smpmgr imports but neverdeclared.