Author asvetlov
Recipients asvetlov, yselivanov
Date 2019-10-27.07:08:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Consider the following code:

import asyncio

q = asyncio.Queue()

async def main():
    await asyncio.gather(q.put(1), q.get(1))

This code just hangs since run() creates a loop but queue is bound with another (default) event loop.

The error is confusing and hard-to-debug.

We should raise a warning at least for the case; start from DeprecationWarning and make the system stricter later.

asyncio/ is also affected since it has first-class classes (classes that instantiated by a user directly without factories).
Date User Action Args
2019-10-27 07:08:05asvetlovsetrecipients: + asvetlov, yselivanov
2019-10-27 07:08:05asvetlovsetmessageid: <>
2019-10-27 07:08:05asvetlovlinkissue38599 messages
2019-10-27 07:08:05asvetlovcreate