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 aeros
Recipients aeros, docs@python, janust, yselivanov
Date 2019-12-12.09:41:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576143680.44.0.98191602083.issue39027@roundup.psfhosted.org>
In-reply-to
Content
Thanks for letting us know, janust. I confirmed that `asyncio.TimeoutError` no longer works for the code example in 3.8 and that replacing it with `concurrent.futures.TimeoutError` works correctly.

Before moving forward with a PR to the docs, I think we should wait for feedback from Yury to check if this behavior is intentional for `run_coroutine_threadsafe()`, I'll add him to the nosy list.

To me, this seems more like a side effect of `asyncio.TimeoutError` being changed to BaseException rather than an intended consequence. The main purpose of that change was to ensure that TimeoutError wasn't unintentionally suppressed by generic try-except blocks. IMO, it seems rather counter-intuitive to have to specify `concurrent.futures.TimeoutError` when using a timeout for the future returned by `run_coroutine_threadsafe()`. I'm not certain that it can be avoided though, other than by changing it to return an instance of asyncio.Future instead of concurrent.futures.Future.
History
Date User Action Args
2019-12-12 09:41:20aerossetrecipients: + aeros, docs@python, yselivanov, janust
2019-12-12 09:41:20aerossetmessageid: <1576143680.44.0.98191602083.issue39027@roundup.psfhosted.org>
2019-12-12 09:41:20aeroslinkissue39027 messages
2019-12-12 09:41:19aeroscreate