Debian Codegraph @

debian/patches/0001-Fix-for-aiohttp-3.14.patch

raw
1 From: Edward Betts <[email protected]>
2 Date: Fri, 12 Jun 2026 11:37:29 +0100
3 Subject: Fix for aiohttp 3.14
4
5 Use a typed aiohttp key for request context storage, avoiding
6 aiohttp 3.14 NotAppKeyWarning failures while staying compatible with
7 aiohttp 3.13.
8 ---
9 aiohttp_jinja2/__init__.py | 5 ++++-
10 1 file changed, 4 insertions(+), 1 deletion(-)
11
12 diff --git a/aiohttp_jinja2/__init__.py b/aiohttp_jinja2/__init__.py
13 index 1121489..1107c19 100644
14 --- a/aiohttp_jinja2/__init__.py
15 +++ b/aiohttp_jinja2/__init__.py
16 @@ -41,7 +41,10 @@ APP_CONTEXT_PROCESSORS_KEY: Final = web.AppKey[Sequence[_ContextProcessor]](
17 "APP_CONTEXT_PROCESSORS_KEY"
18 )
19 APP_KEY: Final = web.AppKey[jinja2.Environment]("APP_KEY")
20 -REQUEST_CONTEXT_KEY: Final = "aiohttp_jinja2_context"
21 +_RequestKey = getattr(web, "RequestKey", web.AppKey)
22 +REQUEST_CONTEXT_KEY: Final = _RequestKey[Dict[str, Any]](
23 + "aiohttp_jinja2_context", dict
24 +)
25
26 _T = TypeVar("_T")
27 _AbstractView = TypeVar("_AbstractView", bound=AbstractView)