Skip to content

Prune unused dependencies; declare cachecontrol[filecache] - #729

Merged
rtibbles merged 1 commit into
learningequality:mainfrom
rtibbles:remove-unused-deps
Aug 3, 2026
Merged

Prune unused dependencies; declare cachecontrol[filecache]#729
rtibbles merged 1 commit into
learningequality:mainfrom
rtibbles:remove-unused-deps

Conversation

@rtibbles

@rtibbles rtibbles commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Five declared dependencies are not imported anywhere in the package or the test suite, so every contributor and CI job installs them for nothing — and two draw recurring dependabot bumps. Removes those declarations, and depends on cachecontrol's filecache extra instead of pinning filelock ourselves, since filelock is only there for cachecontrol's FileCache. Thirteen packages leave the lock; filelock still resolves to 3.19.1.

References

Obsoletes #724 and #727 — bumps to the two removed test dependencies.
Last uses: css-html-js-minify before e26d20a; requests-cache and responses before 8768a46.

Reviewer guidance

  • ricecooker/utils/videos.py:81, ricecooker/utils/audio.py:63 — ffmpeg is invoked via subprocess, never through ffmpy. Check no downstream chef relies on ricecooker pulling ffmpy in transitively.
  • ricecooker/utils/caching.py:17 and ricecooker/utils/html.py:19FileCache imports filelock lazily inside __init__. Check the extra covers every path that constructs a cache.
  • ricecooker/config.py:122 — colorlog is named only as a dictConfig string, so an import grep does not find it. Confirm it was right to keep it (same question for pytest-env, consumed via [tool.pytest.ini_options] env).

AI usage

Used Claude Code to audit every declared dependency against actual imports and git history, then edit pyproject.toml and re-lock. Verified with the full test suite including the google_drive extra, and with prek.

Removed as unimported:
- ffmpy: video/audio compression shells out to ffmpeg via subprocess
- css-html-js-minify: last use removed in e26d20a (2018)
- requests-cache, responses (test): unused since the suite went offline in 8768a46
- sphinx-autobuild (docs): no Makefile target or workflow invokes it

filelock is not used directly — it is what cachecontrol's FileCache needs, so
depend on the extra instead of pinning it ourselves. Resolves to 3.19.1, unchanged.

Lock drops 13 packages.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CGJAshVZ6BmgthPneGnsbk
@rtibbles
rtibbles marked this pull request as ready for review August 3, 2026 20:59
@rtibbles
rtibbles merged commit a18a29c into learningequality:main Aug 3, 2026
26 checks passed
@rtibbles
rtibbles deleted the remove-unused-deps branch August 3, 2026 20:59
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