[Python-checkins] gh-93503: Document the new tracing/profiling APIs in the What's new document (#96681)
pablogsal
webhook-mailer at python.org
Tue Sep 13 08:12:24 EDT 2022
https://github.com/python/cpython/commit/830a20eb3273a84a77eb2fc160cc10d9f8904275
commit: 830a20eb3273a84a77eb2fc160cc10d9f8904275
branch: main
author: Pablo Galindo Salgado <Pablogsal at gmail.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-09-13T13:12:15+01:00
summary:
gh-93503: Document the new tracing/profiling APIs in the What's new document (#96681)
Co-authored-by: Victor Stinner <vstinner at python.org>
files:
M Doc/whatsnew/3.12.rst
M Misc/NEWS.d/next/C API/2022-06-06-16-04-14.gh-issue-93503.MHJTu8.rst
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 11784ba0021e..8e178d994e67 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -139,6 +139,14 @@ sqlite3
* Add a :ref:`command-line interface <sqlite3-cli>`.
(Contributed by Erlend E. Aasland in :gh:`77617`.)
+threading
+---------
+
+* Add :func:`threading.settrace_all_threads` and
+ :func:`threading.setprofile_all_threads` that allow to set tracing and
+ profiling functions in all running threads in addition to the calling one.
+ (Contributed by Pablo Galindo in :gh:`93503`.)
+
Optimizations
=============
@@ -473,6 +481,12 @@ New Features
``__dict__`` and weakrefs with less bookkeeping,
using less memory and with faster access.
+* Added two new public functions,
+ :c:func:`PyEval_SetProfileAllThreads` and
+ :c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling
+ functions in all running threads in addition to the calling one. (Contributed
+ by Pablo Galindo in :gh:`93503`.)
+
Porting to Python 3.12
----------------------
diff --git a/Misc/NEWS.d/next/C API/2022-06-06-16-04-14.gh-issue-93503.MHJTu8.rst b/Misc/NEWS.d/next/C API/2022-06-06-16-04-14.gh-issue-93503.MHJTu8.rst
index 6df9f95fc946..3dd292cd7780 100644
--- a/Misc/NEWS.d/next/C API/2022-06-06-16-04-14.gh-issue-93503.MHJTu8.rst
+++ b/Misc/NEWS.d/next/C API/2022-06-06-16-04-14.gh-issue-93503.MHJTu8.rst
@@ -1,7 +1,7 @@
Add two new public functions to the public C-API,
-:c:func:`PyEval_SetProfileAllThreads` and
-:c:func:`PyEval_SetTraceAllThreads`, that allow to set tracking and
-profiling functions in all running threads in addition to the calling one.
-Also, add a new *running_threads* parameter to :func:`threading.setprofile`
-and :func:`threading.settrace` that allows to do the same from Python. Patch
-by Pablo Galindo
+:c:func:`PyEval_SetProfileAllThreads` and :c:func:`PyEval_SetTraceAllThreads`,
+that allow to set tracing and profiling functions in all running threads in
+addition to the calling one. Also, two analogous functions to the
+:mod:`threading` module (:func:`threading.setprofile_all_threads` and
+:func:`threading.settrace_all_threads`) that allow to do the same from Python.
+Patch by Pablo Galindo
More information about the Python-checkins
mailing list