Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/568.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Declare `jinja2` as a direct dependency. `fastapi_cache.coder` imports `starlette.templating` unconditionally, which requires jinja2, but jinja2 is only an optional starlette extra (dropped from the base install in Starlette 1.0). This fixes `ImportError: jinja2 must be installed to use Jinja2Templates` on a minimal install.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ uvicorn = "*"
typing-extensions = { version = ">=4.1.0" }
importlib-metadata = { version = "^6.6.0", python = "<3.8" }
pendulum = "^3.0.0"
# coder.py imports starlette.templating unconditionally, which requires jinja2.
# jinja2 is only an optional starlette extra (dropped from the base install in
# Starlette 1.0), so declare it explicitly here.
jinja2 = "*"
aiomcache = { version = "^0.8.2", optional = true }
aiobotocore = {version = "^2.13.1", optional = true}
redis = {version = "^5.0.8", extras = ["redis"]}
Expand Down