Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RuntimeWarning: coroutine method 'aclose' of '...' was never awaited when breaking out of async for #117536

Closed
@hroncok

Description

@hroncok

Bug report

Edit: See#117536 (comment) and#117536 (comment) for simpler reproducers --@encukou

Bug description:

The following code is extracted from jinja2 tests, as I was debuggingpallets/jinja#1900 -- it uses no jinja:

asyncdefauto_aiter(iterable):foriteminiterable:yielditemasyncdefcustomfilter(iterable):items= []asyncforiteminauto_aiter(iterable):items.append(item)iflen(items)==3:breakreturn"".join(items)importasyncioprint(asyncio.run(customfilter("yyyNNN")))
$ python3.12 asyncrepro.py yyy$ python3.13 asyncrepro.py yyysys:1: RuntimeWarning: coroutine method'aclose' of'auto_aiter' was never awaitedRuntimeWarning: Enable tracemalloc to get the object allocation traceback$ python3.13 -X tracemalloc asyncrepro.py yyysys:1: RuntimeWarning: coroutine method'aclose' of'auto_aiter' was never awaitedObject allocated at (most recent call last):  File".../asyncrepro.py", lineno 10break

This seems to be related to#89091

I am not sure if this is a regression in Python or a bug in Jinja tests, but considering Jinja folks closed my issue, I decided to report it here instead.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp