chore(deps): remove unused Python dependencies and relock - #21
Open
usehoplite[bot] wants to merge 1 commit into
Open
chore(deps): remove unused Python dependencies and relock#21usehoplite[bot] wants to merge 1 commit into
usehoplite[bot] wants to merge 1 commit into
Conversation
Co-authored-by: Shantanu Mane <shantanu.mane.200@outlook.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.
Summary
Dependency audit of both dependency manifests. Removal is restricted to dependencies proven unused by the code, verified via
go mod tidy(Go) and a full import scan plus Poetry resolution (Python).Python (
pyproject.toml+poetry.lock)python-magic,attrs,pydantic,structlog,requests,opentelemetry-instrumentation. Their transitives dropped from the lock:annotated-types,pydantic-core,typing-inspection,wrapt.psycopg-pool(worker/consumer/db.py),python-dotenv(worker/__main__.py). They existed only in the legacy[tool.poetry.dependencies]table, which Poetry 2.4.1 (the lock's own generator) ignores — so a freshpoetry installcould not run the worker at all.[tool.poetry.dependencies]table — duplicate, ignored by the generator, and actively misleading (declared packages that were never locked).requests/urllib3/certifiremain as transitive deps ofgoogle-resumable-media/botocore, which is correct.Go (
go.mod,go.sum)go mod tidywith the repo's toolchain (go 1.25.0) produced zero diff — every direct requirement (including the non-obviousgolang-migrate/migrate/v4,golang.org/x/time,otelzap,otel/log) is imported somewhere, andgo.sumhas no stale entries. No changes.Sandbox setup
.hoplite/settings.jsonwith a setup script that provisions Go ≥1.25, Poetry 2.4.1, and git-lfs on fresh sandboxes — without it the repo's owntask test/poetrycommands cannot run (neither tool is preinstalled) and platform source-control tooling fails (git lfsmissing).Verification
poetry check --lockpasses;poetry installclean.worker.consumer.db,worker.storage,worker.utils.metrics,worker.__main__, …).python -m unittest discover -s worker/tests). The one failure is pre-existing and unrelated:test_image_pipeline.pycallsprocess_image_file()without thecontent_hashargument the function requires (untouched by this PR).go build ./...✓,go vet ./...✓,go test ./... -race✓ — all packages pass except the pre-existingTestPerformanceLatencieswhich hard-fails withoutPERF_TEST_URL(an opt-in load test, also failing on current staging).Follow-up note (not changed here)
deploy/docker/worker.dockerfilepinspoetry==1.7.1, which predates PEP-621[project]support and cannot consume the lock-version 2.1 lockfile the repo already ships. The worker image build should pin Poetry 2.x, but changing deployment infra was out of scope for this audit.