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

asyncio dev docs claim that asyncio debug mode checks for unawaited coroutines #133515

Closed
Labels
@graingert

Description

@graingert

Documentation

asyncio-dev docs claim:

asyncio checks forcoroutines that were not awaited and logs them; this mitigates the “forgotten await” pitfall.

and the docs that points to claim:

When a coroutine function is called, but not awaited (e.g. coro() instead of await coro()) or the coroutine is not scheduled withasyncio.create_task(), asyncio will emit aRuntimeWarning:

this isn't true, python will produce warnings when coroutines are not awaited regardless of the dev mode of asyncio. The flag to set is-Werror and then replacesys.unraisablehook to detect these

I think this is a hold-over from when asyncio had generator based coroutines.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp