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 vstinner
Recipients serhiy.storchaka, vstinner
Date 2015-09-03.10:49:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441277388.17.0.438973463566.issue24993@psf.upfronthosting.co.za>
In-reply-to
Content
The namereplace error handler introduced in Python 3.5 doesn't handle correctly PyCapsule_Import() failure. If the function raises an exception, the PyCodec_NameReplaceErrors() function must return NULL.

I see that the code correctly handle the case where PyCodec_NameReplaceErrors() failed, but it doesn't clear the exception.

Attached patch changes PyCodec_NameReplaceErrors() to return immediatly NULL if PyCodec_NameReplaceErrors() failed.

Or should we log the exception (PyErr_WriteUnraisable) and then clear it? PyErr_WriteUnraisable is usually used in corner case when it's impossible to report bugs to the function caller.
History
Date User Action Args
2015-09-03 10:49:48vstinnersetrecipients: + vstinner, serhiy.storchaka
2015-09-03 10:49:48vstinnersetmessageid: <1441277388.17.0.438973463566.issue24993@psf.upfronthosting.co.za>
2015-09-03 10:49:48vstinnerlinkissue24993 messages
2015-09-03 10:49:48vstinnercreate