Skip to content

fix: declare requests as explicit dependency#5

Merged
dosaki merged 1 commit into
mainfrom
fix/missing-requests-dep
May 9, 2026
Merged

fix: declare requests as explicit dependency#5
dosaki merged 1 commit into
mainfrom
fix/missing-requests-dep

Conversation

@dosaki

@dosaki dosaki commented May 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds requests>=2.31 to requirements.txt so deploys stop failing with ModuleNotFoundError: No module named 'requests' on app startup.
  • Authlib's flask_client package eagerly imports requests_client at module load (apps.py does from ..requests_client import OAuth1Session), so importing app.extensions triggers the full requests-based client chain — even though we only use the Flask integration.
  • Authlib does not declare requests as a hard install requirement (it's an optional/extra), so the Docker build's pip wheel -r requirements.txt never produced a requests wheel. The runtime image installs with pip install --no-index --find-links=/wheels, so there's no PyPI fallback at install time — the dep was simply absent.
  • Followup to feat: switch authentication to Keycloak (OIDC) #4 (Keycloak/OIDC switch); deploy was broken until now.

Test plan

  • docker compose build --no-cache app succeeds
  • docker compose run --rm app flask db --help resolves (no ImportError)
  • CI deploy pipeline goes green
  • Post-deploy: /auth/login round-trips successfully against Keycloak

🤖 Generated with Claude Code

Authlib's flask_client eagerly imports requests_client at module load,
so importing app.extensions fails with ModuleNotFoundError in the
hermetic deploy image (pip install --no-index from prebuilt wheels).
Authlib does not list requests as a hard install requirement, so it
never lands in /wheels.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 22:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@dosaki dosaki merged commit f8b5323 into main May 9, 2026
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