[issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases

2020-09-30 Thread Richard Kojedzinszky


New submission from Richard Kojedzinszky :

This code should run without errors:

```
#!/usr/bin/env python

import asyncio

async def task1():
cv = asyncio.Condition()

async with cv:
await asyncio.wait_for(cv.wait(), 10)

async def main(loop):
task = loop.create_task(task1())

await asyncio.sleep(0)

task.cancel()

res = await asyncio.wait({task})

if __name__ == '__main__':
loop = asyncio.get_event_loop()

loop.run_until_complete(main(loop))
```

--
components: asyncio
messages: 377695
nosy: asvetlov, rkojedzinszky, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.wait_for does not wait for task/future to be completed in all 
cases
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 
<https://bugs.python.org/issue41891>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases

2020-09-30 Thread Richard Kojedzinszky


Change by Richard Kojedzinszky :


--
keywords: +patch
pull_requests: +21487
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22461

___
Python tracker 
<https://bugs.python.org/issue41891>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com