ndokter / dsmr_parser

Library to parse Dutch Smart Meter Requirements (DSMR) telegrams.
MIT License
110 stars 64 forks source link

Replace `asyncio.coroutine` with async/await syntax #64

Closed balloob closed 3 years ago

balloob commented 3 years ago

Python 3.5 (released 2015) introduced new async and await keywords. They replace the @asyncio.coroutine decorator and yield from.

The @asyncio.coroutine decorator has been deprecated in Python 3.8 and will be removed in Python 3.10.

It would be great if this package could migrate to using async and await keywords.

# Old
@asyncio.coroutine
def something():
    yield from asyncio.sleep(1)

# New
async def something():
    await asyncio.sleep(1)