Skip to content

build(deps): drop unused runtime dependencies - #44

Merged
3mei merged 2 commits into
mainfrom
yev/build/drop-unused-dependencies
Oct 14, 2026
Merged

3mei merged 2 commits into
mainfrom
yev/build/drop-unused-dependencies

Conversation

@3mei

@3mei 3mei commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

What changed and why

  • Removes langdetect, seaborn and matplotlib from the runtime dependencies. Nothing imports them. Every install drops eight packages (contourpy, cycler, fonttools, kiwisolver, langdetect, matplotlib, pyparsing, seaborn), and matplotlib's license-policy exception goes with it. Anyone who relied on usersim installing matplotlib or seaborn needs to install them directly.
  • langdetect's only wheel is tagged for Python 2, so on Python 3 pip built it from source, and a binary-only resolution (--only-binary=:all:) couldn't satisfy it on any platform.
  • The packaging contract test now checks both directions: every import is declared, and every declared dependency is imported.

How it was verified

  • make check-all, make test (4070 passed), make smoke, make check-dependency-licenses and make check-dist.
  • Declaring langdetect again fails the new test with "the distribution declares but never imports: ['langdetect']".
  • pip install --dry-run --only-binary=:all: --python-version 3.10 on the built wheel resolves for manylinux x86_64 and aarch64, macOS arm64 and x86_64, and Windows.

3mei added 2 commits October 14, 2026 13:54
Nothing imports langdetect, seaborn or matplotlib. Dropping them removes eight packages from every install (contourpy, cycler, fonttools, kiwisolver, langdetect, matplotlib, pyparsing, seaborn) and the license-policy exception for matplotlib. langdetect's only wheel is tagged for Python 2, so on Python 3 pip built it from source, and a binary-only resolution couldn't satisfy it on any platform.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
The packaging contract test checked one direction: every import is declared. It now also checks the other: every runtime dependency in pyproject.toml is imported somewhere in the package, since an unused one still installs, with everything it depends on, for every user.

Signed-off-by: Yev Meyer <ymeyer@nvidia.com>
@3mei
3mei requested review from a team as code owners October 14, 2026 17:55
@3mei
3mei merged commit 878ca42 into main Oct 14, 2026
10 checks passed
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.

1 participant