bpo-46850: Remove _PyEval_SetAsyncGenFinalizer() by vstinner · Pull Request #32017 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Include/cpython/ceval.h
8 changes: 8 additions & 0 deletions Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
PyThreadState *tstate,
int new_depth);

// Used by sys.get_asyncgen_hooks()
extern PyObject* _PyEval_GetAsyncGenFirstiter(void);
extern PyObject* _PyEval_GetAsyncGenFinalizer(void);

// Used by sys.set_asyncgen_hooks()
extern int _PyEval_SetAsyncGenFirstiter(PyObject *);
extern int _PyEval_SetAsyncGenFinalizer(PyObject *);

void _PyEval_Fini(void);


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Remove the following private undocumented functions from the C API:

* ``_PyEval_GetAsyncGenFirstiter()``
* ``_PyEval_GetAsyncGenFinalizer()``
* ``_PyEval_SetAsyncGenFirstiter()``
* ``_PyEval_SetAsyncGenFinalizer()``

Call the public :func:`sys.get_asyncgen_hooks` and
:func:`sys.set_asyncgen_hooks` functions instead. Patch by Victor Stinner.
2 changes: 1 addition & 1 deletion Python/sysmodule.c