[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2021-03-07 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: I have stumbled in this bug, or something similar, implementing psycopg3 async connection pool. A function such as the following fails but only in Python 3.6 (tested 3.6.12): async def wait(self, timeout: float) -> AsyncConnection: """Wait for

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-18 Thread Yury Selivanov
Yury Selivanov added the comment: This has been actually first fixed in #41891 but somehow wasn't yet merged. Yurii, thanks so much for working on this and making a PR, there was just another PR to fix the same issue that was there first, so I had to merge that one. -- resolution:

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Hey Yurii, I have fixed this issue. The actual problem was that `wait_for` cancels passed future but doesn't wait until it finished. -- ___ Python tracker

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 4.0 -> 5.0 pull_requests: +22689 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23829 ___ Python tracker

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-17 Thread Yury Selivanov
Yury Selivanov added the comment: Hey Hynek! :) Can you submit a PR? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue42600] Cancelling tasks waiting for asyncio.Conditions crashes w/ RuntimeError: Lock is not acquired.

2020-12-08 Thread Hynek Schlawack
New submission from Hynek Schlawack : This is something I've been procrastinating on for almost a year and working around it using my own version of asyncio.Condition because I wasn't sure how to describe it. So here's my best take: Consider the following code: ``` import asyncio async def