You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If callback= could be provided an awaitable, users could construct functions that e.g. make an async call to a database as part of deciding if a host should be allowed.
I tried implementing this with a asyncio.isawaitable() test against the callable but for some reason it didn't detect my await function as being awaitable. Here's the unit test I added which I failed to get passing:
@simonw Admittedly, this might not be much help to you (or relevant anymore) but would changing asyncio.iscoroutine(...) to asyncio.iscoroutinefunction(...) fix the issue?
If
callback=
could be provided an awaitable, users could construct functions that e.g. make an async call to a database as part of deciding if a host should be allowed.I tried implementing this with a
asyncio.isawaitable()
test against the callable but for some reason it didn't detect my await function as being awaitable. Here's the unit test I added which I failed to get passing:The text was updated successfully, but these errors were encountered: