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 JelleZijlstra
Recipients JelleZijlstra, Trundle, berker.peksag
Date 2016-12-13.08:01:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481616076.84.0.641714376017.issue28603@psf.upfronthosting.co.za>
In-reply-to
Content
I ran into this bug through Thrift-generated exception classes (also reported there as https://issues.apache.org/jira/browse/THRIFT-4002).

I've added a few potential solutions:
- issue28603-listset.patch turns the seen set into a list if hashing fails. However, this adds a lot of complexity, especially in C, and because seen is changed halfway through the recursion, we may end up showing an exception twice.
- issue28603-list.patch uses a list instead of a set for seen. This is theoretically slower, but in practice it seems unlikely that exception __cause__ and __context__ would nest deep enough for this to be an issue.
- issue28603-ignore.patch takes a similar approach to Trundle's patch and just gives up when the value is not hashable. This means we lose cause/context information for these exceptions.

I prefer issue28603-list.patch.
History
Date User Action Args
2016-12-13 08:01:16JelleZijlstrasetrecipients: + JelleZijlstra, Trundle, berker.peksag
2016-12-13 08:01:16JelleZijlstrasetmessageid: <1481616076.84.0.641714376017.issue28603@psf.upfronthosting.co.za>
2016-12-13 08:01:16JelleZijlstralinkissue28603 messages
2016-12-13 08:01:15JelleZijlstracreate