Closed Gr1N closed 6 years ago
Hi,
Almost possible. The async with
is not supported yet: I'm creating a ticket to fix this issue in the next release. So your example code can run with 0.9.0 if you do the context managing explicitly:
...
conn = await client.connect(is_async=True, timeout=10.0)
res = await conn.search('ou=nerdherd,dc=bonsai,dc=test', 2)
print(res)
who = await conn.whoami()
print(who)
conn.close()
...
is it possible to you push this PR into a new release soon?
Hi, yes, I'm working on it. I'll try to make new release in the next two weeks.
New release is out, thank you for your patience.
Hi,
If we are talking about asyncio and Python 3.5+ we want to use async/await syntax instead of coroutine decorator and
yield from
.Here an example how I see it:
Is it possible?