Repository navigation
build(deps): drop unused runtime dependencies - #44
Merged
Merged
Conversation
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>
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.
What changed and why
langdetect,seabornandmatplotlibfrom 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.How it was verified
make check-all,make test(4070 passed),make smoke,make check-dependency-licensesandmake check-dist.langdetectagain fails the new test with "the distribution declares but never imports: ['langdetect']".pip install --dry-run --only-binary=:all: --python-version 3.10on the built wheel resolves for manylinux x86_64 and aarch64, macOS arm64 and x86_64, and Windows.