Skip to content

Issue a warning when coroutine is never awaited #3597

@wyfo

Description

@wyfo

Following #3588, coroutines should issue a warning when they are never awaited, to mimic Python coroutine behavior.

However, the best place to put this warning seems to be in __del__, so it would requires #2479 before.

"Never awaited" means (for Python coroutines) that the coroutine has not been polled at least once. Regarding current coroutine implementation, it means that waker field is still None when __del__ is executed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions