Repository navigation
Declare httpx as a runtime dependency - #425
Merged
Merged
Conversation
routers/invoke.py and invokeai_client.py import httpx at module level, but httpx was only listed under the testing extra. It arrived transitively via huggingface_hub 1.x; huggingface_hub 2.x depends on httpx2 instead, so fresh installs (e.g. the rebuilt demo Docker image) fail at startup with ModuleNotFoundError: No module named 'httpx'. 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.
Problem
A freshly built
photomapai-demoDocker image fails at startup:photomap/backend/routers/invoke.pyandphotomap/backend/invokeai_client.pyimporthttpxat module level, buthttpxwas declared only in thetestingextra. It was available by accident:transformers/open_clip_torch→huggingface_hub1.x depended onhttpx.huggingface_hub2.x depends onhttpx2instead, so any fresh resolve (Docker builds,pip install photomapai) now omitshttpx.The full
photomapaiimage only appeared to work because the existing one was built in Dec 2025, beforehuggingface_hub2.x; rebuilding it today fails the same way.uv syncdev installs were unaffected because they install thetestingextra.Fix
Add
httpxto[project].dependenciesand refreshuv.lock.Verification
uv pip compileofpyproject.tomlwith no extras (Python 3.11, CPU torch index, as in the Dockerfiles) now resolves:Inspecting the failing demo image confirmed
huggingface_hub 2.2.0+httpx2and nohttpx. Docker images not rebuilt as part of this PR.Worth a patch release, since PyPI installs are affected too.
🤖 Generated with Claude Code