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 Arfrever, neologix, pitrou, serhiy.storchaka, vstinner
Date 2013-11-04.20:56:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> You are clearing the thread state of the currently executing
> thread, which doesn't sound right.

Oh, I didn't realize that PyThreadState_Clear() clears also Python thread locals.

Here is a new patch without PyThreadState_Clear(tstate) and with two unit tests:

- ensure that Python thread locals are not destroyed before destructors are called
- ensure that object destructors are called before Python thread states are destroyed
Date User Action Args
2013-11-04 20:56:45vstinnersetrecipients: + vstinner, pitrou, Arfrever, neologix, serhiy.storchaka
2013-11-04 20:56:45vstinnersetmessageid: <>
2013-11-04 20:56:45vstinnerlinkissue19466 messages
2013-11-04 20:56:44vstinnercreate