classification
Title: Add threading.gettrace and threading.getprofile
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.10
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 2020-11-04 09:28 by pablogsal. 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
History
Date User Action Args
2020-11-04 09:28:10pablogsalsetnosy: + pablogsal
messages: + msg380312
2020-11-04 09:27:57pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-11-03 13:18:56mariocj89setkeywords: + patch
stage: patch review
pull_requests: + pull_request22041
2020-11-03 13:15:23mariocj89create