Skip to content

chore: Remove unused Python dependencies - #17076

Merged
stevejalim merged 1 commit into
mainfrom
remove-unused-dependencies
Mar 16, 2026
Merged

stevejalim merged 1 commit into
mainfrom
remove-unused-dependencies

Conversation

@stevejalim

@stevejalim stevejalim commented Mar 16, 2026 •

Copy link
Copy Markdown
Contributor

Drop chardet, contextlib2, docutils, and rich-text-renderer from prod.in, and py and Pygments from dev.in. None of these are imported or referenced anywhere in the codebase. rich-text-renderer and django-crum were originally added for the Contentful integration (2021) and are no longer needed since the move to Wagtail.

@janbrasna

Copy link
Copy Markdown
Collaborator

Sorry py although not "referenced" is necessary — it's wrongly (non-)required by some of the deps. The long read:

Drop chardet, contextlib2, docutils, and rich-text-renderer from
prod.in, and Pygments from dev.in. None of these are imported
or referenced anywhere in the codebase. rich-text-renderer and
django-crum were originally added for the Contentful integration
(2021) and are no longer needed since the move to Wagtail.
@stevejalim
stevejalim force-pushed the remove-unused-dependencies branch from 705f31b to f19a46c Compare March 16, 2026 12:35
@stevejalim

Copy link
Copy Markdown
Contributor Author

Sorry py although not "referenced" is necessary — it's wrongly (non-)required by some of the deps. The long read:

* [Move away from depending on 'py' requirement #14867](https://github.com/mozilla/bedrock/pull/14867)

* [Remove `py` dependency? #14851](https://github.com/mozilla/bedrock/issues/14851)

Thanks, yeah - forgot about that. Have restored py for now

@stevejalim

Copy link
Copy Markdown
Contributor Author

Self review: r+

@stevejalim
stevejalim merged commit 412b60f into main Mar 16, 2026
19 checks passed

@janbrasna janbrasna left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R+ :shipit: given test results and trust on coverage.

Comment thread requirements/dev.in
freezegun==1.5.5
markdown-it-py>=2.2.0
py==1.11.0
Pygments>=2.15.0 # to bring it up to a secure version

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup did the same on springfield some time ago.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some stuff we can still prune from Springfield - like chardet and django-crum

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Oh, meant mostly the downpins actually related to the selenium part of the stack… left note on that actual bump also in the relevant PR about that too.)

As for deps that might have been ported to fxc without any use, like contentful tooling… ~ I'll defer to your knowledge what apps got omitted from the port, so there's a potential for a few deps ending up eventually unused. (There's also a load of new deps for the flare/wagtail tooling that I'm not familiar with to the extent that I won't try to tell which ones are used or not TBH.)

@stevejalim
stevejalim deleted the remove-unused-dependencies branch March 16, 2026 13:18

This branch was previously deployed

1 inactive deployment
build — f19a46cb Deployed Mar 16, 2026 by stevejalim via Upload static assets to GCS #1048
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.

2 participants