Skip to content

Commit 5942726

Browse files
committed
Use async/await keywords since the target version will support them
1 parent 95c22a2 commit 5942726

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pydispatch/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ def release(self):
103103
self.event_instance(*args, **kwargs)
104104
if AIO_AVAILABLE:
105105
exec(textwrap.dedent('''
106-
@asyncio.coroutine
107-
def __aenter__(self):
108-
yield from self.aio_lock.acquire()
106+
async def __aenter__(self):
107+
await self.aio_lock.acquire()
109108
self.acquire()
110109
return self
111-
@asyncio.coroutine
112-
def __aexit__(self, *args):
110+
async def __aexit__(self, *args):
113111
self.aio_lock.release()
114112
self.release()
115113
'''))

0 commit comments

Comments
 (0)