Migrate @asyncio.coroutine to async def

Proprietary

Migrate functions using the deprecated @asyncio.coroutine decorator to use async def syntax. Also transforms yield from to await. The decorator was removed in Python 3.11. A function whose body has a bare yield is left alone, since it would become an async generator.

org.openrewrite.python.migrate.MigrateAsyncioCoroutine
mod run . --recipe=org.openrewrite.python.migrate.MigrateAsyncioCoroutine

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.