fix: Harden fresh installs against undeclared dependencies - #19
Open
kw-datamasque wants to merge 1 commit into
Open
fix: Harden fresh installs against undeclared dependencies#19kw-datamasque wants to merge 1 commit into
kw-datamasque wants to merge 1 commit into
Conversation
kw-datamasque
force-pushed
the
harden-fresh-install
branch
from
August 11, 2026 21:14
9ba3363 to
9268b0f
Compare
kw-datamasque
marked this pull request as ready for review
August 11, 2026 23:09
ClassicMMT
force-pushed
the
add-configurable-discovery
branch
from
August 11, 2026 23:15
27b241b to
69ea485
Compare
kw-datamasque
force-pushed
the
harden-fresh-install
branch
2 times, most recently
from
August 12, 2026 03:12
7f64c7a to
ded04b2
Compare
kw-datamasque
force-pushed
the
harden-fresh-install
branch
from
August 12, 2026 03:16
ded04b2 to
b03fdfb
Compare
ClassicMMT
requested changes
Aug 12, 2026
ClassicMMT
left a comment
Contributor
There was a problem hiding this comment.
Good job! I like the idea.
A few things to consider/finish:
Needs target branch updated
CHANGELOG.mdneeds to be updated.- Should there be
enable-cache: trueonsetup-uv? - Should
make checkinclude smoke tests?
Also should this be in other repos too?
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.
Follow-up to the v1.4.0 fresh-install breakage, stacked on #18.
What happened
Every fresh install of 1.4.0 crashed at startup.
main.pyimportedclickwithout declaring it as a dependency; click had always been pulled in by typer, and typer 0.27.1 stopped depending on it, so new installs got no click anddmdied on its first import.CI stayed green because every job installs from
uv.lock, which still held an older typer that shipped click.Existing installs kept their click, so only fresh installs broke.
Warning
richis in exactly the position click was: imported by our code, undeclared, and currently arriving only through typer.If typer drops rich the way it dropped click, every fresh install breaks again with no commit in this repo.
#18 fixed the click import; this PR closes the rest of the class.
Changes
richas a real dependency.typer==0.15.0crashes with the click versions installs get today, so the old floor advertised a combination that cannot work.The new minimums were install-tested together by hand on Python 3.11; no CI job re-checks them.
make lint): fails whensrcimports a packagepyproject.tomldoes not declare.It parses the AST, so it catches imports inside functions too.
dm --help.Runs on every PR and before every publish.
It lives in
scripts/installation_smoke_test.sh, somake smokeruns the identical check locally, and its header records what it does not cover.The main test job already covers Python 3.11/3.12/3.13; the smoke test only proves a clean install works, and 3.11 is the oldest supported floor, the end that breaks first.
Why not pin exact versions
==pins conflict with users' other tools, still let indirect dependencies float, and block upstream security fixes until we re-release (typer and rich do not backport fixes to old versions).Declaring every imported package closes this incident class outright; deptry keeps it closed.