Issue 42251: Add threading.gettrace and threading.getprofile - Python tracker

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.

classification
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: mariocj89, pablogsal
Priority: normal Keywords: patch

Created on 2020-11-03 13:15 by mariocj89, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23125 merged mariocj89, 2020-11-03 13:18
Messages (2)
msg380273 - (view) Author: Mario Corchero (mariocj89) * (Python triager) Date: 2020-11-03 13:15
When working in a C extension from a non-python created thread which calls PyGILState_Ensure as it later calls a Python callback on user code, I wished there was a way to set the trace function similar to what a native Python thread would do.

We could just call sys.gettrace within the thread, but the application might have chosen to set threading.settrace differently.

Same applies for threading.setprofile.
msg380312 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-11-04 09:28
New changeset 0001a1b69ecda47b0406daa88c2943877580bcae by Mario Corchero in branch 'master':
bpo-42251: Add gettrace and getprofile to threading (GH-23125)
https://github.com/python/cpython/commit/0001a1b69ecda47b0406daa88c2943877580bcae