]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46850: Remove _PyEval_GetCoroutineOriginTrackingDepth() (GH-32018)
authorVictor Stinner <vstinner@python.org>
Mon, 21 Mar 2022 01:24:00 +0000 (02:24 +0100)
committerGitHub <noreply@github.com>
Mon, 21 Mar 2022 01:24:00 +0000 (02:24 +0100)
commit9087243e2c167e38570e819b228efc3492c38c9c
treed59acfac968561a9518027489f8478dfccdf0607
parent332b04bac35cd7305c60da2d5733940dc089949a
bpo-46850: Remove _PyEval_GetCoroutineOriginTrackingDepth() (GH-32018)

Remove the private undocumented function
_PyEval_GetCoroutineOriginTrackingDepth() from the C API. Call the
public sys.get_coroutine_origin_tracking_depth() function instead.

Change the internal function
_PyEval_SetCoroutineOriginTrackingDepth():

* Remove the 'tstate' parameter;
* Add return value and raises an exception if depth is negative;
* No longer export the function: call the public
  sys.set_coroutine_origin_tracking_depth() function instead.

Uniformize also function declarations in pycore_ceval.h.
Include/cpython/ceval.h
Include/internal/pycore_ceval.h
Misc/NEWS.d/next/C API/2022-03-21-01-30-14.bpo-46850.Tfxde5.rst [new file with mode: 0644]
Python/ceval.c
Python/sysmodule.c