summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst40
1 files changed, 40 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 957d02b..54281a3 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -675,6 +675,18 @@ always available.
for details.)
+.. function:: get_coroutine_origin_tracking_depth()
+
+ Get the current coroutine origin tracking depth, as set by
+ func:`set_coroutine_origin_tracking_depth`.
+
+ .. versionadded:: 3.7
+
+ .. note::
+ This function has been added on a provisional basis (see :pep:`411`
+ for details.) Use it only for debugging purposes.
+
+
.. function:: get_coroutine_wrapper()
Returns ``None``, or a wrapper set by :func:`set_coroutine_wrapper`.
@@ -686,6 +698,10 @@ always available.
This function has been added on a provisional basis (see :pep:`411`
for details.) Use it only for debugging purposes.
+ .. deprecated:: 3.7
+ The coroutine wrapper functionality has been deprecated, and
+ will be removed in 3.8. See :issue:`32591` for details.
+
.. data:: hash_info
@@ -1212,6 +1228,26 @@ always available.
This function has been added on a provisional basis (see :pep:`411`
for details.)
+.. function:: set_coroutine_origin_tracking_depth(depth)
+
+ Allows enabling or disabling coroutine origin tracking. When
+ enabled, the ``cr_origin`` attribute on coroutine objects will
+ contain a tuple of (filename, line number, function name) tuples
+ describing the traceback where the coroutine object was created,
+ with the most recent call first. When disabled, ``cr_origin`` will
+ be None.
+
+ To enable, pass a *depth* value greater than zero; this sets the
+ number of frames whose information will be captured. To disable,
+ pass set *depth* to zero.
+
+ This setting is thread-specific.
+
+ .. versionadded:: 3.7
+
+ .. note::
+ This function has been added on a provisional basis (see :pep:`411`
+ for details.) Use it only for debugging purposes.
.. function:: set_coroutine_wrapper(wrapper)
@@ -1252,6 +1288,10 @@ always available.
This function has been added on a provisional basis (see :pep:`411`
for details.) Use it only for debugging purposes.
+ .. deprecated:: 3.7
+ The coroutine wrapper functionality has been deprecated, and
+ will be removed in 3.8. See :issue:`32591` for details.
+
.. function:: _enablelegacywindowsfsencoding()
Changes the default filesystem encoding and errors mode to 'mbcs' and