Drop redundant faust-cchardet from base image#417
Merged
Conversation
faust-cchardet is a transitive dependency in Core: it is required by the axis and pytouchline_extended integration libraries, which declare it in their install_requires. Those integrations are part of requirements_all.txt, so faust-cchardet is pulled from the wheels index during the Core image build regardless of whether the base image installs it explicitly. It was originally provisioned here because aiohttp used cchardet (and later its faust-cchardet fork) as an optional charset-detection speed-up, which is an extra rather than a hard dependency and therefore had to be installed explicitly (see #260, which replaced the abandoned cchardet). aiohttp 3.9 dropped built-in chardet/cchardet detection, so that reason no longer applies, and the only remaining consumers hard-declare the dependency. Unlike the other entries in requirements.txt, faust-cchardet has other packages depending on it (Required-by: axis, pytouchline_extended), whereas Brotli, mysqlclient and psycopg2 have no dependents and must stay explicit. The package remains in the final Core image via transitive resolution; its version is governed by Core's package_constraints (faust-cchardet>=2.1.18). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frenck
approved these changes
Jul 17, 2026
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
Drop
faust-cchardetfrom the base image'srequirements.txt. It is a redundant explicit entry:faust-cchardetis a transitive dependency in Core, so it lands in the final image regardless of whether the base image installs it.Why it's redundant
faust-cchardetis required by theaxisandpytouchline_extendedintegration libraries, both of which declare it in theirinstall_requires. Those integrations are part ofrequirements_all.txt, sofaust-cchardetis pulled from the wheels index during the Core image build anyway.Verified in a current Core image:
Contrast with the other three entries, which have no dependents and therefore must stay explicit:
So
faust-cchardetis the only one of the four that another package pulls in on its own.Why it was here in the first place
It was originally provisioned in the base image because aiohttp used
cchardet(and later itsfaust-cchardetfork) as an optional charset-detection speed-up — an extra, not a hard dependency, so it had to be installed explicitly. That's what #260 did when it replaced the abandonedcchardet. aiohttp 3.9 dropped built-inchardet/cchardetdetection (charset resolution now defaults to UTF-8 unless afallback_charset_resolveris configured), so that reason no longer applies. The only remaining consumers hard-declare the dependency, which is why the explicit entry can go.Effect
axis/pytouchline_extended), just installed in the Core layer instead of the base layer.package_constraints(faust-cchardet>=2.1.18) rather than the pin removed here. (Separately, that constraint is worth tightening to an exact pin to match thegrpcio/protobuf/numpyconvention for build-from-source C-extensions — a Core-repo change.)Context
This came out of investigating the failing Dependabot bump #416 (
faust-cchardet2.1.19 → 2.1.20). That bump failed only because of a PyPI upload race — the 2.1.20 sdist landed ~20 min after CI ran, and there is nocp314wheel on PyPI, so HA builds it from source. It's since been built and published to the wheels index, so #416 would pass on rebase — but for the base image the entry is simply unnecessary. A matching cleanup removes the same unused pin from Supervisor'srequirements.txt.🤖 Generated with Claude Code