Constrain click to <8.2 for typer 0.9.x compatibility (fixes Docker install crash) - #378
Open
ndegwairungu wants to merge 1 commit into
Open
Constrain click to <8.2 for typer 0.9.x compatibility (fixes Docker install crash)#378ndegwairungu wants to merge 1 commit into
ndegwairungu wants to merge 1 commit into
Conversation
The Docker build runs `pip install -e .`, which ignores requirements.lock and resolves click >=8.2. typer 0.9.x is incompatible with click >=8.2 and raises "TypeError: Secondary flag is not valid for non-boolean flag" at CLI startup, so `docker compose up` fails on a fresh Docker install (CI is unaffected because `rye sync` uses the lockfile). Fixes thatmattlove#341 Fixes thatmattlove#348
ndegwairungu
force-pushed
the
fix/click-typer-compat
branch
from
June 28, 2026 05:39
c8fc160 to
2aadb27
Compare
|
have a look at #376 |
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.
Description
Add a
click>=8.1.7,<8.2constraint to the project dependencies.Related Issues
Motivation and Context
A fresh Docker install (
git clone … && docker compose up, per the official docs) currently crashes on startup before the server ever binds:Root cause: the Dockerfile installs the app with
pip install -e ., which resolves dependencies frompyproject.tomland ignoresrequirements.lock.pyproject.tomlpinstyper>=0.9.0but places no constraint onclick, so pip pulls click 8.2+. typer 0.9.x is incompatible with click ≥8.2 (the removal of secondary-flag support for non-boolean options), which raises the error above at CLI parse time.CI is unaffected because the GitHub Actions workflow uses
rye sync, which honorsrequirements.lock(already pinned toclick==8.1.7) — so the break only surfaces via the Docker install path that most users follow.Adding the constraint to
pyproject.tomlmakes thepip install -e .path resolve a compatible click, consistent with the lockfile. (A forward-looking alternative is bumping totyper>=0.12, which supports click 8.2+, but that is a larger change; this is the minimal, lock-consistent fix.)Tests
docker compose up→ container exits 1 with the traceback above (confirmed click 8.4.2 / typer 0.9.4 resolved in the image).pip install -e .resolves click 8.1.7; the container starts cleanly and serves the UI/API on :8001. Verified live queries against a MikroTik device succeed.rye sync/ lockfile resolution is unchanged.🤖 Generated with Claude Code