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 cool-RR
Recipients cool-RR, rhettinger
Date 2020-02-21.20:46:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582317971.52.0.698907964593.issue39717@roundup.psfhosted.org>
In-reply-to
Content
> What do you think it is necessary to switch from implicit chaining to explicit chaining?

I didn't say it's necessary, but I think it's beneficial. I find that message between exceptions useful when I'm debugging and I'd like to keep it accurate in as many places as I can. 

I think that the more accurate it is, the more people will learn to trust that it has meaning and understand it. 

> If anyone is currently relying on __context__ vs __cause__, this patch will break their code.

I think that the standard you're setting for backward compatibility is unreasonably high.

The only code I can think of that inspects `__context__` and `__cause__` is code that formats exceptions to be shown to the user, such as Django's debug page, Wing IDE's Exceptions pane, whatever's going on in PyCharm etc. That kind of code is responsible for checking for both `__context__` and `__cause__` and showing the correct message.

If you've seen code outside of the category above that uses `__context__`, I'd be curious to see it.

Fortunately, this point is moot since using `raise foo from bar` sets the `__context__ = __cause__ = bar`, so the `__context__` will not be changed.
History
Date User Action Args
2020-02-21 20:46:11cool-RRsetrecipients: + cool-RR, rhettinger
2020-02-21 20:46:11cool-RRsetmessageid: <1582317971.52.0.698907964593.issue39717@roundup.psfhosted.org>
2020-02-21 20:46:11cool-RRlinkissue39717 messages
2020-02-21 20:46:11cool-RRcreate