John Belmonte <j...@neggie.net> added the comment:

I was caught by this again, indirectly via @contextmanager.

If I define a non-async context manager using @contextmanager, I expect the 
decorator support to work on async functions.  I.e. the following should be 
equivalent:

```
async def foo():
    with non_async_cm:
        ...
```
```
@non_async_cm
async def foo():
    ...
```

Not only does the 2nd case not work, but the decorator is (effectively) 
silently ignored :(

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37398>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to