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 larry, vstinner
Date 2016-01-19.12:30:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1453206633.27.0.0623775421981.issue26154@psf.upfronthosting.co.za>
In-reply-to
Content
The issue #25150 modified pystate.h to hide _PyThreadState_Current. Sadly, this change broke the vmprof project:
https://mail.python.org/pipermail/python-dev/2016-January/142767.html

Attached patches adds a new private _PyThreadState_FastGet() function to get the current thread state but don't call Py_FatalError() if it is NULL.

The patch also uses replace direct access to _PyThreadState_Current with _PyThreadState_FastGet(), except inside ceval.c and pystate.c.

Calling Py_FatalError() to handle errors is not really a great API... Bad that's a different story, I don't want to break anything here.

I want to add the private function to Python 3.5.2 because I consider that the removal of the _PyThreadState_Current symbol is a regression introduced in Python 3.5.1.

We have no rule for the Python private API, it can change *anytime*.
History
Date User Action Args
2016-01-19 12:30:33vstinnersetrecipients: + vstinner, larry
2016-01-19 12:30:33vstinnersetmessageid: <1453206633.27.0.0623775421981.issue26154@psf.upfronthosting.co.za>
2016-01-19 12:30:33vstinnerlinkissue26154 messages
2016-01-19 12:30:32vstinnercreate