Message348434
I still think that iscoroutinefunction should not be used for async/sync decoration type autodetection.
A day ago stuck with a case when decorator used iscoroutinefunction() for separation but returned a regular function wrapper that returns awaitable in turn.
As a result, the transparent decorator which should not modify a decorated function signature cannot be applied twice, e.g.
@retry
@retry
async def fetch():
...
This is very confusing behavior, the obvious fix is providing `sync_retry` and `async_retry` decorators to never mix the behavior.
Seems very close to the problem discussed here. |
|
| Date |
User |
Action |
Args |
| 2019-07-25 11:29:02 | asvetlov | set | recipients:
+ asvetlov, ncoghlan, njs, yselivanov, xtreak, John Belmonte |
| 2019-07-25 11:29:02 | asvetlov | set | messageid: <[email protected]> |
| 2019-07-25 11:29:02 | asvetlov | link | issue37398 messages |
| 2019-07-25 11:29:02 | asvetlov | create | |
|