• Bug#1061008: aiohttp-jinja2: FTBFS: dh_auto_test: error: pybuild --test

    From Lucas Nussbaum@21:1/5 to All on Tue Jan 16 21:00:19 2024
    Source: aiohttp-jinja2
    Version: 1.5.1-1
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@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

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)