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 chris.jerdonek
Recipients ajoino, alex.gronholm, asvetlov, chris.jerdonek, gvanrossum, iritkatriel, jab, njs, tinchester, yselivanov
Date 2022-02-17.06:17:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645078647.5.0.120055219347.issue46771@roundup.psfhosted.org>
In-reply-to
Content
> I'm not sure yet (if anything I'd need it for a task, not a future).

(By future, I also meant task, as task inherits from future.) For now, I think it would be safer to get the message from the CancelledError, if possible, since how it gets there truly is an implementation detail. It would be okay to document that the msg argument gets passed to the CancelledError via the constructor, as that was always the intent.

See also issue 45390 and the message I wrote there on how to make that API work better (given that the msg is only available from the leaf exception in the exception chain, and the current implementation creates intermediate exceptions, I believe unnecessarily): https://bugs.python.org/issue45390#msg403570
History
Date User Action Args
2022-02-17 06:17:27chris.jerdoneksetrecipients: + chris.jerdonek, gvanrossum, njs, jab, asvetlov, alex.gronholm, yselivanov, tinchester, iritkatriel, ajoino
2022-02-17 06:17:27chris.jerdoneksetmessageid: <1645078647.5.0.120055219347.issue46771@roundup.psfhosted.org>
2022-02-17 06:17:27chris.jerdoneklinkissue46771 messages
2022-02-17 06:17:27chris.jerdonekcreate