Conversation
platformdirs is declared as a runtime dependency in pyproject.toml and
in the PEP 723 header of src/specify_cli/__init__.py, but nothing in the
repository imports it — no static import in src/, tests/, scripts/,
templates/, extensions/ or presets/, and no dynamic import either:
$ grep -rn "import platformdirs\|platformdirs\." src tests scripts
(no matches)
Verified by removing it rather than by reading alone: after
`uv sync --extra test` the interpreter has no platformdirs, and the CLI
and the suite are unaffected — `specify --help`, `specify check` and
`specify --version` all work, and pytest reports 8176 passed, 208
skipped, identical to main.
Every user installing specify-cli currently pulls a package the CLI
never touches.
Regenerates .github/security-audit-requirements.txt with the documented
command so the committed audit snapshot stays in sync.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
platformdirsis declared as a runtime dependency inpyproject.tomland in the PEP 723 header ofsrc/specify_cli/__init__.py, but nothing in the repository imports it.The only two occurrences in the whole tree are the two declarations themselves. There is no dynamic import either — nothing reaches it through
importlib.import_moduleor__import__.Every user who installs
specify-clipulls a package the CLI never touches.Evidence
Verified by actually removing it rather than by reading alone. After
uv sync --extra test:With the package genuinely absent from the interpreter:
specify --help,specify check,specify --version— all workmainRun on macOS 15 (arm64), CPython 3.13.15, against
a2c1843.Scope
Three files, six deleted lines:
pyproject.toml.github/security-audit-requirements.txtwith the commandCONTRIBUTING.mddocuments:Regenerated without
--upgradedeliberately, so the diff is only the fourplatformdirslines rather than an unrelated bump of every pinned package.AI disclosure
Found and written with Claude Code (Opus 5). The claim was verified empirically rather than by inspection alone — the package was removed from the environment and the CLI and full suite were run against its absence. I reviewed the change and re-validated it against current
mainbefore opening this.