Repository navigation
chore(deps): remove unused and unmaintained dependencies - #266
Merged
Merged
Conversation
- Redis: settings.REDIS was created in every settings module but never read anywhere. Remove redis, fakeredis, settings/configure.py, the redis service from docker-compose and REDISCLOUD_URL from the docs and development.env. - pandas (and numpy): never imported. - pydantic: never imported directly; still installed through Wagtail. - pytz: only used for UTC in a test; use datetime.UTC instead. - model_mommy: unmaintained since 2019 and emits a DeprecationWarning; replace it with its successor model_bakery. - Drop the commented-out Celery and Redis cache examples from the production settings and the redis-server line from the Vagrant provisioning script. dj-static is kept on purpose: django-compressor writes CACHE/ files at request time, after WhiteNoise has indexed the static files, and only dj-static's Cling serves them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Why
Several dependencies are never used, or are unmaintained. They make the Heroku slug and the dev setup heavier for nothing.
Removed
redis(+fakeredis,settings/configure.py,redis:6.2compose service,REDISCLOUD_URL)settings.REDISwas created in every settings module but never read anywhere in the codepandas(+numpy)pydantic(direct dependency)pytzUTCin a test; replaced bydatetime.UTCmodel_mommy→model_bakeryDeprecationWarning;model_bakeryis its official successor (same API,baker.make)Also removed: the commented-out Celery and Redis cache examples in
settings/production.py, andredis-serverin the Vagrant provisioning script. README, CLAUDE.md, CONTRIBUTING.md and DEVELOPMENT.md are updated.Kept on purpose:
dj-staticdj-staticlooks redundant with WhiteNoise, but it is not. django-compressor writesstatic/CACHE/css|js/output.*at request time (COMPRESS_OFFLINE = False), after WhiteNoise has indexed the static files at startup. Only dj-static'sClingserves those files. Removing it made every page return 404 for its CSS/JS in the end-to-end check. Replacing it properly (offline compression at build time, then dropping dj-static) is a separate change.Follow-up on Heroku (manual)
The RedisCloud add-on is no longer used by the code. It can be removed once this is deployed:
heroku addons/heroku addons:destroy rediscloud.Tests
manage.py check(tests and dev settings): no issues. Test suite: 7 tests OK, without themodel_mommydeprecation warning.scripts/upgrade-check/run.sh --base master --docker, from feat(scripts): add an end-to-end upgrade check #264):collectstatic --clearOKNote: #264 was updated so the check no longer imports
fakeredis. This PR and #265 both touchuv.lock; whichever is merged second may need auv lockrebase.🤖 Generated with Claude Code