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 dreamsorcerer
Recipients ajoino, alex.gronholm, asvetlov, chris.jerdonek, dreamsorcerer, gvanrossum, iritkatriel, jab, njs, tinchester, yselivanov
Date 2022-02-21.00:00:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645401629.54.0.793383386212.issue46771@roundup.psfhosted.org>
In-reply-to
Content
> This should be solved when using the cancel count -- the explicit cancel bumps the cancel count so the cancel scope (i.e. timeout()) will not raise TimeoutError.

It will probably work in this case. But, what about more complex cases? If there are 2 different timeouts and the possibility of a user cancellation, and we have a count of 2 cancellations, then what happened? 2 timeouts, or 1 timeout and user cancellation? Without being able to check the nonces of each cancellation, I don't see how this would work. Or if the user calls .cancel() twice explicitly, then you cancel both timeouts, even though it had nothing to do with the timeout.

Propagating an ExceptionGroup where every exception can be inspected to see if it was caused by this code or not still seems like the safe option to me (and obviously still has the cancel count implicitly).
History
Date User Action Args
2022-02-21 00:00:29dreamsorcerersetrecipients: + dreamsorcerer, gvanrossum, njs, jab, asvetlov, alex.gronholm, chris.jerdonek, yselivanov, tinchester, iritkatriel, ajoino
2022-02-21 00:00:29dreamsorcerersetmessageid: <1645401629.54.0.793383386212.issue46771@roundup.psfhosted.org>
2022-02-21 00:00:29dreamsorcererlinkissue46771 messages
2022-02-21 00:00:29dreamsorcerercreate