This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author John Belmonte
Recipients John Belmonte, asvetlov, xtreak, yselivanov
Date 2019-07-25.06:22:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564035768.07.0.186833609684.issue37398@roundup.psfhosted.org>
In-reply-to
Content
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 :(
History
Date User Action Args
2019-07-25 06:22:48John Belmontesetrecipients: + John Belmonte, asvetlov, yselivanov, xtreak
2019-07-25 06:22:48John Belmontesetmessageid: <1564035768.07.0.186833609684.issue37398@roundup.psfhosted.org>
2019-07-25 06:22:48John Belmontelinkissue37398 messages
2019-07-25 06:22:47John Belmontecreate