Repository navigation
gh-156980: Fix asyncio call graph truncation at async generators #156984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| :func:`asyncio.print_call_graph` no longer truncates the call stack of a | ||
| task suspended inside an asynchronous generator. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2171,6 +2171,11 @@ async_gen_asend_finalize(PyObject *self) | |
| } | ||
| } | ||
|
|
||
| static PyMemberDef async_gen_asend_memberlist[] = { | ||
| {"ag_gen", Py_T_OBJECT_EX, offsetof(PyAsyncGenASend, ags_gen), Py_READONLY}, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, maybe do we want to call the field I don't feel strongly at all though.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually probably nevermind: I think it's good to have the throw and send ones use the same name. |
||
| {NULL} /* Sentinel */ | ||
| }; | ||
|
|
||
| static PyMethodDef async_gen_asend_methods[] = { | ||
| {"send", async_gen_asend_send, METH_O, send_doc}, | ||
| {"throw", _PyCFunction_CAST(async_gen_asend_throw), METH_FASTCALL, throw_doc}, | ||
|
|
@@ -2215,7 +2220,7 @@ PyTypeObject _PyAsyncGenASend_Type = { | |
| PyObject_SelfIter, /* tp_iter */ | ||
| async_gen_asend_iternext, /* tp_iternext */ | ||
| async_gen_asend_methods, /* tp_methods */ | ||
| 0, /* tp_members */ | ||
| async_gen_asend_memberlist, /* tp_members */ | ||
| 0, /* tp_getset */ | ||
| 0, /* tp_base */ | ||
| 0, /* tp_dict */ | ||
|
|
@@ -2634,6 +2639,11 @@ async_gen_athrow_finalize(PyObject *op) | |
| } | ||
| } | ||
|
|
||
| static PyMemberDef async_gen_athrow_memberlist[] = { | ||
| {"ag_gen", Py_T_OBJECT_EX, offsetof(PyAsyncGenAThrow, agt_gen), Py_READONLY}, | ||
| {NULL} /* Sentinel */ | ||
| }; | ||
|
|
||
| static PyMethodDef async_gen_athrow_methods[] = { | ||
| {"send", async_gen_athrow_send, METH_O, send_doc}, | ||
| {"throw", _PyCFunction_CAST(async_gen_athrow_throw), | ||
|
|
@@ -2681,7 +2691,7 @@ PyTypeObject _PyAsyncGenAThrow_Type = { | |
| PyObject_SelfIter, /* tp_iter */ | ||
| async_gen_athrow_iternext, /* tp_iternext */ | ||
| async_gen_athrow_methods, /* tp_methods */ | ||
| 0, /* tp_members */ | ||
| async_gen_athrow_memberlist, /* tp_members */ | ||
| 0, /* tp_getset */ | ||
| 0, /* tp_base */ | ||
| 0, /* tp_dict */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably document it in
Doc/library/inspect.rst, rather than here, I think.