[issue42538] AsyncIO strange behaviour

2021-10-22 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I meant, "that describes the behaviour" -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42538] AsyncIO strange behaviour

2021-10-22 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I opened a documentation PR agreeing with @ncoghlan, that adds this behavior. See https://bugs.python.org/issue44665 -- nosy: +nanjekyejoannah ___ Python tracker

[issue42538] AsyncIO strange behaviour

2021-08-23 Thread Nick Coghlan
Change by Nick Coghlan : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.create_task() documentation should mention user needs to keep reference to the task ___ Python tracker

[issue42538] AsyncIO strange behaviour

2021-08-23 Thread Nick Coghlan
Nick Coghlan added the comment: While filed later, issue44665 correctly describes the problem reported here: asyncio is behaving as expected, but the docs don't make it clear that you need to save a reference to the result of ensure_future()/create_task() if you don't want to risk the task

[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Alexander Greckov
Alexander Greckov added the comment: Thanks! That's resolved my problem, but this thing wasn't really obvious as for me. Probably it would be better to write about this explicitly in docs for the create_task. All in all this issue can be closed. --

[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: I understand the issue as the following: 1. You don't save the result of `asyncio.create_task()` somewhere. The task object is dereferenced and thus you see a warning. 2. With PYTHONASYNCIODEBUG on the task is referenced also by internal debug structure,

[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Alexander Greckov
New submission from Alexander Greckov : Hi! I've met strange behaviour related to the coroutine execution. Probably it's somehow related to the asyncio.Queue get() method. I have the following lines of code: class WeightSource: def __init__(self): self._queue =