--- Begin Message ---
Source: aiohttp-jinja2
Version: 1.5.1-1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240115 ftbfs-trixie
Hi,
During a rebuild of all packages in sid, your package failed to build
on amd64.
Relevant part (hopefully):
> debian/rules build
> dh build --with python3 --buildsystem=pybuild
> dh_update_autotools_config -O--buildsystem=pybuild
> dh_autoreconf -O--buildsystem=pybuild
> dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:305: python3.12 setup.py config
> running config
> I: pybuild base:305: python3.11 setup.py config
> running config
> dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:305: /usr/bin/python3.12 setup.py build
> running build
> running build_py
> creating
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/__init__.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/typedefs.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/helpers.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build/aiohttp_jinja2
> running egg_info
> creating aiohttp_jinja2.egg-info
> writing aiohttp_jinja2.egg-info/PKG-INFO
> writing dependency_links to aiohttp_jinja2.egg-info/dependency_links.txt
> writing requirements to aiohttp_jinja2.egg-info/requires.txt
> writing top-level names to aiohttp_jinja2.egg-info/top_level.txt
> writing manifest file 'aiohttp_jinja2.egg-info/SOURCES.txt'
> reading manifest file 'aiohttp_jinja2.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching 'pytest.ini'
> warning: no directories found matching 'examples'
> warning: no previously-included files matching '*.pyc' found anywhere in
> distribution
> adding license file 'LICENSE'
> writing manifest file 'aiohttp_jinja2.egg-info/SOURCES.txt'
> copying aiohttp_jinja2/py.typed ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build/aiohttp_jinja2
> I: pybuild base:305: /usr/bin/python3 setup.py build
> running build
> running build_py
> creating
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/__init__.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/typedefs.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build/aiohttp_jinja2
> copying aiohttp_jinja2/helpers.py ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build/aiohttp_jinja2
> running egg_info
> writing aiohttp_jinja2.egg-info/PKG-INFO
> writing dependency_links to aiohttp_jinja2.egg-info/dependency_links.txt
> writing requirements to aiohttp_jinja2.egg-info/requires.txt
> writing top-level names to aiohttp_jinja2.egg-info/top_level.txt
> reading manifest file 'aiohttp_jinja2.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching 'pytest.ini'
> warning: no directories found matching 'examples'
> warning: no previously-included files matching '*.pyc' found anywhere in
> distribution
> adding license file 'LICENSE'
> writing manifest file 'aiohttp_jinja2.egg-info/SOURCES.txt'
> copying aiohttp_jinja2/py.typed ->
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build/aiohttp_jinja2
> dh_auto_test -O--buildsystem=pybuild
> I: pybuild base:305: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build; python3.12 -m
> pytest tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.12.1, pytest-7.4.4, pluggy-1.3.0
> rootdir: /<<PKGBUILDDIR>>
> configfile: setup.cfg
> plugins: cov-4.1.0, anyio-4.1.0, asyncio-0.20.3, aiohttp-1.0.5
> asyncio: mode=Mode.AUTO
> collected 30 items
>
> tests/test_context_processors.py FFFFF [
> 16%]
> tests/test_jinja_filters.py F [
> 20%]
> tests/test_jinja_globals.py FFFFFFFF [
> 46%]
> tests/test_simple_renderer.py FFFFF.FFFFFFFFFF
> [100%]
>
> =================================== FAILURES
> ===================================
> ___________________________ test_context_processors
> ____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063cbfa60>
>
> async def test_context_processors(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> app =
> web.Application(middlewares=[aiohttp_jinja2.context_processors_middleware])
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {"tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, path: {{
> request.path }}"}
> ),
> )
>
> tests/test_context_processors.py:15:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063eb4f80>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cb8410>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_nested_context_processors
> ________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b48b80>
>
> async def test_nested_context_processors(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> subapp =
> web.Application(middlewares=[aiohttp_jinja2.context_processors_middleware])
> > aiohttp_jinja2.setup(
> subapp,
> loader=jinja2.DictLoader(
> {
> "tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, "
> "baz: {{ baz }}, path: {{ request.path }}"
> }
> ),
> )
>
> tests/test_context_processors.py:46:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cb89e0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cb8b60>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_context_is_response
> ___________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b48c20>
>
> async def test_context_is_response(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> raise web.HTTPForbidden()
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "template"}))
>
> tests/test_context_processors.py:93:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cb9f40>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cba030>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________ test_context_processors_new_setup_style
> ____________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b48f40>
>
> async def test_context_processors_new_setup_style(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> async def processor(request):
> return {"foo": 1, "bar": "should be overwriten"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {
> "tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, "
> "path: {{ request.path }}"
> }
> ),
> context_processors=(aiohttp_jinja2.request_processor, processor),
> )
>
> tests/test_context_processors.py:111:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cba660>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cba630>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_context_not_tainted
> ___________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b49bc0>
>
> async def test_context_not_tainted(aiohttp_client):
>
> global_context = {"version": 1}
>
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return global_context
>
> async def processor(request):
> return {"foo": 1}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "foo: {{ foo }}"}),
> context_processors=[processor],
> )
>
> tests/test_context_processors.py:143:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cb8050>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cb8140>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________________ test_jinja_filters
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b49580>
>
> async def test_jinja_filters(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> def add_2(value):
> return value + 2
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ 5|add_2 }}"}),
> filters={"add_2": add_2},
> )
>
> tests/test_jinja_filters.py:16:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cbb590>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cbb680>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________________ test_get_env
> _________________________________
>
> def test_get_env():
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "tmpl"}))
>
> tests/test_jinja_globals.py:10:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b29eb0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b2a2d0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________________ test_url
> ___________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b48d60>
>
> async def test_url(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> name='John_Doe')}}"}),
> )
>
> tests/test_jinja_globals.py:26:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cbbd40>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cbb200>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _____________________________ test_url_with_query
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b49580>
>
> async def test_url_with_query(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {"tmpl.jinja2": "{{ url('index', query_={'foo': 'bar'})}}"}
> ),
> )
>
> tests/test_jinja_globals.py:47:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cb8920>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cbb890>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________________ test_url_int_param
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b4a7a0>
>
> async def test_url_int_param(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> arg=1)}}"})
> )
>
> tests/test_jinja_globals.py:72:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2be90>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b2b1a0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_url_param_forbidden_type
> _________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b4aa20>
>
> async def test_url_param_forbidden_type(aiohttp_client):
> async def index(request):
> with pytest.raises(
> TypeError,
> match=(
> r"argument value should be str or int, "
> r"got arg -> \[<class 'bool'>\] True"
> ),
> ):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> arg=True)}}"})
> )
>
> tests/test_jinja_globals.py:102:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2bce0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b28a40>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ____________________________ test_helpers_disabled
> _____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b4b1a0>
>
> async def test_helpers_disabled(aiohttp_client):
> async def index(request):
> with pytest.raises(jinja2.UndefinedError, match="'url' is
> undefined"):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> default_helpers=False,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('index')}}"}),
> )
>
> tests/test_jinja_globals.py:121:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063cbb7a0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063cb81a0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________________ test_static
> __________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b4a660>
>
> async def test_static(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{
> static('whatever.js') }}"})
> )
>
> tests/test_jinja_globals.py:140:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b289e0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b28cb0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_static_var_missing
> ____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a40360>
> caplog = <_pytest.logging.LogCaptureFixture object at 0x7fe063b28c50>
>
> async def test_static_var_missing(aiohttp_client, caplog):
> async def index(request):
> with pytest.raises(RuntimeError, match="static_root_url"):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{
> static('whatever.js') }}"})
> )
>
> tests/test_jinja_globals.py:161:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b29880>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b2bda0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_func[False]
> _______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a40220>
> enable_async = False
>
> @pytest.mark.parametrize("enable_async", (False, True))
> async def test_func(aiohttp_client, enable_async):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request: web.Request) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> enable_async=enable_async,
> loader=jinja2.DictLoader({"tmpl.jinja2": template}),
> )
>
> tests/test_simple_renderer.py:19:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2aae0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b2acc0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_func[True]
> ________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063b4aac0>
> enable_async = True
>
> @pytest.mark.parametrize("enable_async", (False, True))
> async def test_func(aiohttp_client, enable_async):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request: web.Request) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> enable_async=enable_async,
> loader=jinja2.DictLoader({"tmpl.jinja2": template}),
> )
>
> tests/test_simple_renderer.py:19:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b29640>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b290d0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________ test_render_class_based_view
> _________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a40d60>
>
> async def test_render_class_based_view(aiohttp_client):
> class MyView(web.View):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def get(self) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:44:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2a000>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b2bb90>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________________________ test_meth
> ___________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41080>
>
> async def test_meth(aiohttp_client):
> class Handler:
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def meth(self, request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> handler = Handler()
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:68:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b59df0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b5aa50>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_convert_func_to_coroutine
> ________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a40860>
>
> async def test_convert_func_to_coroutine(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:89:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b59490>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b59f10>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_set_status
> ________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41300>
>
> async def test_set_status(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2", status=201)
> async def func(request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:130:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b5a510>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b59850>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _____________________________ test_render_template
> _____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41bc0>
>
> async def test_render_template(aiohttp_client):
> async def func(request):
> return aiohttp_jinja2.render_template(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"}
> )
>
> > await _test_render_template(func, aiohttp_client, enable_async=False)
>
> tests/test_simple_renderer.py:170:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/test_simple_renderer.py:147: in _test_render_template
> aiohttp_jinja2.setup(
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2b710>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b59190>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________________ test_render_template_async
> __________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41d00>
>
> async def test_render_template_async(aiohttp_client):
> async def func(request):
> return await aiohttp_jinja2.render_template_async(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"}
> )
>
> > await _test_render_template(func, aiohttp_client, enable_async=True)
>
> tests/test_simple_renderer.py:179:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/test_simple_renderer.py:147: in _test_render_template
> aiohttp_jinja2.setup(
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b592b0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b59ee0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_template_custom_status
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41e40>
>
> async def test_render_template_custom_status(aiohttp_client):
> async def func(request):
> return aiohttp_jinja2.render_template(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"},
> status=404
> )
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:191:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b5a480>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b5a5a0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_template_not_found
> ____________________________
>
> async def test_template_not_found():
> async def func(request: web.Request) -> web.Response:
> return aiohttp_jinja2.render_template("template", request, {})
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({}))
>
> tests/test_simple_renderer.py:209:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b2bda0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b5a690>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_render_not_mapping
> ____________________________
>
> async def test_render_not_mapping():
> @aiohttp_jinja2.template("tmpl.jinja2") # type: ignore[arg-type]
> async def func(request: web.Request) -> int:
> return 123
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "tmpl"}))
>
> tests/test_simple_renderer.py:229:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b59190>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b5bad0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________ test_render_without_context
> __________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a42f20>
>
> async def test_render_without_context(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> pass
>
> template = "<html><body><p>{{text}}</p></body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:249:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b55280>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b55d00>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_default_is_autoescaped
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a41080>
>
> async def test_render_default_is_autoescaped(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"text": "<script>alert(1)</script>"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2":
> "<html>{{text}}</html>"})
> )
>
> tests/test_simple_renderer.py:267:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b547d0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b54950>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_can_disable_autoescape
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a432e0>
>
> async def test_render_can_disable_autoescape(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"text": "<script>alert(1)</script>"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2":
> "<html>{{text}}</html>"}),
> autoescape=False,
> )
>
> tests/test_simple_renderer.py:287:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b59bb0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b5bb90>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________ test_skip_render_for_response_from_handler
> __________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fe063a42a20>
>
> async def test_skip_render_for_response_from_handler(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return web.Response(text="OK")
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "{{text}}"}))
>
> tests/test_simple_renderer.py:309:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fe063b57e60>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fe063b55340>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
>
> ---------- coverage: platform linux, python 3.12.1-final-0 -----------
> Name Stmts Miss Cover
> ------------------------------------------------
> aiohttp_jinja2/__init__.py 119 50 58%
> aiohttp_jinja2/helpers.py 35 21 40%
> aiohttp_jinja2/typedefs.py 3 0 100%
> ------------------------------------------------
> TOTAL 157 71 55%
> Coverage HTML written to dir htmlcov
> Coverage XML written to file coverage.xml
>
> =========================== short test summary info
> ============================
> FAILED tests/test_context_processors.py::test_context_processors -
> aiohttp.we...
> FAILED tests/test_context_processors.py::test_nested_context_processors -
> aio...
> FAILED tests/test_context_processors.py::test_context_is_response -
> aiohttp.w...
> FAILED
> tests/test_context_processors.py::test_context_processors_new_setup_style
> FAILED tests/test_context_processors.py::test_context_not_tainted -
> aiohttp.w...
> FAILED tests/test_jinja_filters.py::test_jinja_filters -
> aiohttp.web_exceptio...
> FAILED tests/test_jinja_globals.py::test_get_env -
> aiohttp.web_exceptions.Not...
> FAILED tests/test_jinja_globals.py::test_url -
> aiohttp.web_exceptions.NotAppK...
> FAILED tests/test_jinja_globals.py::test_url_with_query -
> aiohttp.web_excepti...
> FAILED tests/test_jinja_globals.py::test_url_int_param -
> aiohttp.web_exceptio...
> FAILED tests/test_jinja_globals.py::test_url_param_forbidden_type -
> aiohttp.w...
> FAILED tests/test_jinja_globals.py::test_helpers_disabled -
> aiohttp.web_excep...
> FAILED tests/test_jinja_globals.py::test_static -
> aiohttp.web_exceptions.NotA...
> FAILED tests/test_jinja_globals.py::test_static_var_missing -
> aiohttp.web_exc...
> FAILED tests/test_simple_renderer.py::test_func[False] -
> aiohttp.web_exceptio...
> FAILED tests/test_simple_renderer.py::test_func[True] -
> aiohttp.web_exception...
> FAILED tests/test_simple_renderer.py::test_render_class_based_view -
> aiohttp....
> FAILED tests/test_simple_renderer.py::test_meth -
> aiohttp.web_exceptions.NotA...
> FAILED tests/test_simple_renderer.py::test_convert_func_to_coroutine -
> aiohtt...
> FAILED tests/test_simple_renderer.py::test_set_status -
> aiohttp.web_exception...
> FAILED tests/test_simple_renderer.py::test_render_template -
> aiohttp.web_exce...
> FAILED tests/test_simple_renderer.py::test_render_template_async -
> aiohttp.we...
> FAILED tests/test_simple_renderer.py::test_render_template_custom_status -
> ai...
> FAILED tests/test_simple_renderer.py::test_template_not_found -
> aiohttp.web_e...
> FAILED tests/test_simple_renderer.py::test_render_not_mapping -
> aiohttp.web_e...
> FAILED tests/test_simple_renderer.py::test_render_without_context -
> aiohttp.w...
> FAILED tests/test_simple_renderer.py::test_render_default_is_autoescaped -
> ai...
> FAILED tests/test_simple_renderer.py::test_render_can_disable_autoescape -
> ai...
> FAILED
> tests/test_simple_renderer.py::test_skip_render_for_response_from_handler
> ========================= 29 failed, 1 passed in 1.23s
> =========================
> E: pybuild pybuild:391: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_aiohttp-jinja2/build; python3.12 -m
> pytest tests
> I: pybuild base:305: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build; python3.11 -m
> pytest tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.11.7, pytest-7.4.4, pluggy-1.3.0
> rootdir: /<<PKGBUILDDIR>>
> configfile: setup.cfg
> plugins: cov-4.1.0, anyio-4.1.0, asyncio-0.20.3, aiohttp-1.0.5
> asyncio: mode=Mode.AUTO
> collected 30 items
>
> tests/test_context_processors.py FFFFF [
> 16%]
> tests/test_jinja_filters.py F [
> 20%]
> tests/test_jinja_globals.py FFFFFFFF [
> 46%]
> tests/test_simple_renderer.py FFFFF.FFFFFFFFFF
> [100%]
>
> =================================== FAILURES
> ===================================
> ___________________________ test_context_processors
> ____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12ac1580>
>
> async def test_context_processors(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> app =
> web.Application(middlewares=[aiohttp_jinja2.context_processors_middleware])
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {"tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, path: {{
> request.path }}"}
> ),
> )
>
> tests/test_context_processors.py:15:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b50050>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b53550>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_nested_context_processors
> ________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a900e0>
>
> async def test_nested_context_processors(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> subapp =
> web.Application(middlewares=[aiohttp_jinja2.context_processors_middleware])
> > aiohttp_jinja2.setup(
> subapp,
> loader=jinja2.DictLoader(
> {
> "tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, "
> "baz: {{ baz }}, path: {{ request.path }}"
> }
> ),
> )
>
> tests/test_context_processors.py:46:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12a69490>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12a68c90>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_context_is_response
> ___________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90220>
>
> async def test_context_is_response(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> raise web.HTTPForbidden()
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "template"}))
>
> tests/test_context_processors.py:93:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c43c10>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12c43f50>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________ test_context_processors_new_setup_style
> ____________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90e00>
>
> async def test_context_processors_new_setup_style(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"bar": 2}
>
> async def processor(request):
> return {"foo": 1, "bar": "should be overwriten"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {
> "tmpl.jinja2": "foo: {{ foo }}, bar: {{ bar }}, "
> "path: {{ request.path }}"
> }
> ),
> context_processors=(aiohttp_jinja2.request_processor, processor),
> )
>
> tests/test_context_processors.py:111:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b18690>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b19a50>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_context_not_tainted
> ___________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a91620>
>
> async def test_context_not_tainted(aiohttp_client):
>
> global_context = {"version": 1}
>
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return global_context
>
> async def processor(request):
> return {"foo": 1}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "foo: {{ foo }}"}),
> context_processors=[processor],
> )
>
> tests/test_context_processors.py:143:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b267d0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b26010>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________________ test_jinja_filters
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a91080>
>
> async def test_jinja_filters(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> def add_2(value):
> return value + 2
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ 5|add_2 }}"}),
> filters={"add_2": add_2},
> )
>
> tests/test_jinja_filters.py:16:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12aaa750>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12aab150>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________________ test_get_env
> _________________________________
>
> def test_get_env():
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "tmpl"}))
>
> tests/test_jinja_globals.py:10:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12af4f50>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12af5cd0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________________ test_url
> ___________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90360>
>
> async def test_url(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> name='John_Doe')}}"}),
> )
>
> tests/test_jinja_globals.py:26:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12a842d0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12a87210>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _____________________________ test_url_with_query
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a91ee0>
>
> async def test_url_with_query(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader(
> {"tmpl.jinja2": "{{ url('index', query_={'foo': 'bar'})}}"}
> ),
> )
>
> tests/test_jinja_globals.py:47:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12ae3e50>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12ae0950>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________________ test_url_int_param
> ______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12ac3e20>
>
> async def test_url_int_param(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> arg=1)}}"})
> )
>
> tests/test_jinja_globals.py:72:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c03050>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12c02a10>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_url_param_forbidden_type
> _________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a904a0>
>
> async def test_url_param_forbidden_type(aiohttp_client):
> async def index(request):
> with pytest.raises(
> TypeError,
> match=(
> r"argument value should be str or int, "
> r"got arg -> \[<class 'bool'>\] True"
> ),
> ):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> async def other(request):
> return
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('other',
> arg=True)}}"})
> )
>
> tests/test_jinja_globals.py:102:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12a69710>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12a6b090>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ____________________________ test_helpers_disabled
> _____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12ac3600>
>
> async def test_helpers_disabled(aiohttp_client):
> async def index(request):
> with pytest.raises(jinja2.UndefinedError, match="'url' is
> undefined"):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> default_helpers=False,
> loader=jinja2.DictLoader({"tmpl.jinja2": "{{ url('index')}}"}),
> )
>
> tests/test_jinja_globals.py:121:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b53c10>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b53490>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________________ test_static
> __________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90360>
>
> async def test_static(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def index(request):
> return {}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{
> static('whatever.js') }}"})
> )
>
> tests/test_jinja_globals.py:140:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b49d90>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12af7d50>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_static_var_missing
> ____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90e00>
> caplog = <_pytest.logging.LogCaptureFixture object at 0x7fbe12aa8510>
>
> async def test_static_var_missing(aiohttp_client, caplog):
> async def index(request):
> with pytest.raises(RuntimeError, match="static_root_url"):
> aiohttp_jinja2.render_template("tmpl.jinja2", request, {})
> return web.Response()
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2": "{{
> static('whatever.js') }}"})
> )
>
> tests/test_jinja_globals.py:161:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12aa8190>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12aab450>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_func[False]
> _______________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9c040>
> enable_async = False
>
> @pytest.mark.parametrize("enable_async", (False, True))
> async def test_func(aiohttp_client, enable_async):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request: web.Request) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> enable_async=enable_async,
> loader=jinja2.DictLoader({"tmpl.jinja2": template}),
> )
>
> tests/test_simple_renderer.py:19:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12967f50>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12967e10>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_func[True]
> ________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a91120>
> enable_async = True
>
> @pytest.mark.parametrize("enable_async", (False, True))
> async def test_func(aiohttp_client, enable_async):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request: web.Request) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> enable_async=enable_async,
> loader=jinja2.DictLoader({"tmpl.jinja2": template}),
> )
>
> tests/test_simple_renderer.py:19:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b1a410>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b19710>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________ test_render_class_based_view
> _________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9c220>
>
> async def test_render_class_based_view(aiohttp_client):
> class MyView(web.View):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def get(self) -> Dict[str, str]:
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:44:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12ab0950>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12ab0410>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________________________ test_meth
> ___________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9ce00>
>
> async def test_meth(aiohttp_client):
> class Handler:
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def meth(self, request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> handler = Handler()
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:68:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12aaa2d0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12aaa990>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ________________________ test_convert_func_to_coroutine
> ________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9c7c0>
>
> async def test_convert_func_to_coroutine(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:89:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b37150>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b35990>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _______________________________ test_set_status
> ________________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9d3a0>
>
> async def test_set_status(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2", status=201)
> async def func(request):
> return {"head": "HEAD", "text": "text"}
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:130:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12bfd590>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12bff7d0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _____________________________ test_render_template
> _____________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a939c0>
>
> async def test_render_template(aiohttp_client):
> async def func(request):
> return aiohttp_jinja2.render_template(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"}
> )
>
> > await _test_render_template(func, aiohttp_client, enable_async=False)
>
> tests/test_simple_renderer.py:170:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/test_simple_renderer.py:147: in _test_render_template
> aiohttp_jinja2.setup(
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c5bad0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12c5b650>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________________ test_render_template_async
> __________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a936a0>
>
> async def test_render_template_async(aiohttp_client):
> async def func(request):
> return await aiohttp_jinja2.render_template_async(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"}
> )
>
> > await _test_render_template(func, aiohttp_client, enable_async=True)
>
> tests/test_simple_renderer.py:179:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> tests/test_simple_renderer.py:147: in _test_render_template
> aiohttp_jinja2.setup(
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12a35450>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12a357d0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_template_custom_status
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a90b80>
>
> async def test_render_template_custom_status(aiohttp_client):
> async def func(request):
> return aiohttp_jinja2.render_template(
> "tmpl.jinja2", request, {"head": "HEAD", "text": "text"},
> status=404
> )
>
> template = "<html><body><h1>{{head}}</h1>{{text}}</body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:191:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b0cb90>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b0e0d0>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_template_not_found
> ____________________________
>
> async def test_template_not_found():
> async def func(request: web.Request) -> web.Response:
> return aiohttp_jinja2.render_template("template", request, {})
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({}))
>
> tests/test_simple_renderer.py:209:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c53ad0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12c50790>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ___________________________ test_render_not_mapping
> ____________________________
>
> async def test_render_not_mapping():
> @aiohttp_jinja2.template("tmpl.jinja2") # type: ignore[arg-type]
> async def func(request: web.Request) -> int:
> return 123
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "tmpl"}))
>
> tests/test_simple_renderer.py:229:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c00910>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12c03990>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> _________________________ test_render_without_context
> __________________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9d6c0>
>
> async def test_render_without_context(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> pass
>
> template = "<html><body><p>{{text}}</p></body></html>"
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > template}))
>
> tests/test_simple_renderer.py:249:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12b36cd0>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12b37a90>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_default_is_autoescaped
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9e480>
>
> async def test_render_default_is_autoescaped(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"text": "<script>alert(1)</script>"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app, loader=jinja2.DictLoader({"tmpl.jinja2":
> "<html>{{text}}</html>"})
> )
>
> tests/test_simple_renderer.py:267:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12c04a10>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12a86f90>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> ______________________ test_render_can_disable_autoescape
> ______________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9c5e0>
>
> async def test_render_can_disable_autoescape(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return {"text": "<script>alert(1)</script>"}
>
> app = web.Application()
> > aiohttp_jinja2.setup(
> app,
> loader=jinja2.DictLoader({"tmpl.jinja2":
> "<html>{{text}}</html>"}),
> autoescape=False,
> )
>
> tests/test_simple_renderer.py:287:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12ae5490>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12ae6710>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
> __________________ test_skip_render_for_response_from_handler
> __________________
>
> aiohttp_client = <function aiohttp_client.<locals>.go at 0x7fbe12a9ce00>
>
> async def test_skip_render_for_response_from_handler(aiohttp_client):
> @aiohttp_jinja2.template("tmpl.jinja2")
> async def func(request):
> return web.Response(text="OK")
>
> app = web.Application()
> > aiohttp_jinja2.setup(app, loader=jinja2.DictLoader({"tmpl.jinja2":
> > "{{text}}"}))
>
> tests/test_simple_renderer.py:309:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> aiohttp_jinja2/__init__.py:82: in setup
> app[app_key] = env
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <Application 0x7fbe12ae3f10>, key = 'aiohttp_jinja2_environment'
> value = <jinja2.environment.Environment object at 0x7fbe12ae0190>
>
> def __setitem__(self, key: Union[str, AppKey[_T]], value: Any) -> None:
> self._check_frozen()
> if not isinstance(key, AppKey):
> > warnings.warn(
> "It is recommended to use web.AppKey instances for keys.\n"
> + "https://docs.aiohttp.org/en/stable/web_advanced.html"
> + "#application-s-config",
> category=NotAppKeyWarning,
> stacklevel=2,
> )
> E aiohttp.web_exceptions.NotAppKeyWarning: It is recommended to use
> web.AppKey instances for keys.
> E
> https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config
>
> /usr/lib/python3/dist-packages/aiohttp/web_app.py:215: NotAppKeyWarning
>
> ---------- coverage: platform linux, python 3.11.7-final-0 -----------
> Name Stmts Miss Cover
> ------------------------------------------------
> aiohttp_jinja2/__init__.py 119 50 58%
> aiohttp_jinja2/helpers.py 35 21 40%
> aiohttp_jinja2/typedefs.py 3 0 100%
> ------------------------------------------------
> TOTAL 157 71 55%
> Coverage HTML written to dir htmlcov
> Coverage XML written to file coverage.xml
>
> =========================== short test summary info
> ============================
> FAILED tests/test_context_processors.py::test_context_processors -
> aiohttp.we...
> FAILED tests/test_context_processors.py::test_nested_context_processors -
> aio...
> FAILED tests/test_context_processors.py::test_context_is_response -
> aiohttp.w...
> FAILED
> tests/test_context_processors.py::test_context_processors_new_setup_style
> FAILED tests/test_context_processors.py::test_context_not_tainted -
> aiohttp.w...
> FAILED tests/test_jinja_filters.py::test_jinja_filters -
> aiohttp.web_exceptio...
> FAILED tests/test_jinja_globals.py::test_get_env -
> aiohttp.web_exceptions.Not...
> FAILED tests/test_jinja_globals.py::test_url -
> aiohttp.web_exceptions.NotAppK...
> FAILED tests/test_jinja_globals.py::test_url_with_query -
> aiohttp.web_excepti...
> FAILED tests/test_jinja_globals.py::test_url_int_param -
> aiohttp.web_exceptio...
> FAILED tests/test_jinja_globals.py::test_url_param_forbidden_type -
> aiohttp.w...
> FAILED tests/test_jinja_globals.py::test_helpers_disabled -
> aiohttp.web_excep...
> FAILED tests/test_jinja_globals.py::test_static -
> aiohttp.web_exceptions.NotA...
> FAILED tests/test_jinja_globals.py::test_static_var_missing -
> aiohttp.web_exc...
> FAILED tests/test_simple_renderer.py::test_func[False] -
> aiohttp.web_exceptio...
> FAILED tests/test_simple_renderer.py::test_func[True] -
> aiohttp.web_exception...
> FAILED tests/test_simple_renderer.py::test_render_class_based_view -
> aiohttp....
> FAILED tests/test_simple_renderer.py::test_meth -
> aiohttp.web_exceptions.NotA...
> FAILED tests/test_simple_renderer.py::test_convert_func_to_coroutine -
> aiohtt...
> FAILED tests/test_simple_renderer.py::test_set_status -
> aiohttp.web_exception...
> FAILED tests/test_simple_renderer.py::test_render_template -
> aiohttp.web_exce...
> FAILED tests/test_simple_renderer.py::test_render_template_async -
> aiohttp.we...
> FAILED tests/test_simple_renderer.py::test_render_template_custom_status -
> ai...
> FAILED tests/test_simple_renderer.py::test_template_not_found -
> aiohttp.web_e...
> FAILED tests/test_simple_renderer.py::test_render_not_mapping -
> aiohttp.web_e...
> FAILED tests/test_simple_renderer.py::test_render_without_context -
> aiohttp.w...
> FAILED tests/test_simple_renderer.py::test_render_default_is_autoescaped -
> ai...
> FAILED tests/test_simple_renderer.py::test_render_can_disable_autoescape -
> ai...
> FAILED
> tests/test_simple_renderer.py::test_skip_render_for_response_from_handler
> ========================= 29 failed, 1 passed in 1.13s
> =========================
> E: pybuild pybuild:391: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_aiohttp-jinja2/build; python3.11 -m
> pytest tests
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12
> 3.11" returned exit code 13
The full build log is available from:
http://qa-logs.debian.net/2024/01/15/aiohttp-jinja2_1.5.1-1_unstable.log
All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240115;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240115&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results
A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!
If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects
If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.
--- End Message ---