Skip to content

Commit b96190a

Browse files
committed
[shizmob#161] Remove Deprecated Marker from WHOIS
Resolves shizmob#161, related to shizmob#142
1 parent 9798eb3 commit b96190a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Fortunately, pydle utilizes asyncio coroutines_ which allow you to handle a bloc
189189
while still retaining the benefits of asynchronous program flow. Coroutines allow pydle to be notified when a blocking operation is done,
190190
and then resume execution of the calling function appropriately. That way, blocking operations do not block the entire program flow.
191191

192-
In order for a function to be declared as a coroutine, it has to be declared as an ``async def`` function or decorated with the :meth:`asyncio.coroutine` decorator.
192+
In order for a function to be declared as a coroutine, it has to be declared as an ``async def`` function.
193193
It can then call functions that would normally block using Python's ``await`` operator.
194194
Since a function that calls a blocking function is itself blocking too, it has to be declared a coroutine as well.
195195

pydle/features/account.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ def _rename_user(self, user, new):
2222
self.whois(new)
2323

2424
## IRC API.
25-
@asyncio.coroutine
26-
def whois(self, nickname):
27-
info = yield from super().whois(nickname)
25+
async def whois(self, nickname):
26+
info = await super().whois(nickname)
2827
info.setdefault('account', None)
2928
info.setdefault('identified', False)
3029
return info

0 commit comments

Comments
 (0)