Skip to content

Commit 91f2625

Browse files
committed
return TaskInfo to 4 parameters
1 parent a657e86 commit 91f2625

4 files changed

Lines changed: 16 additions & 25 deletions

File tree

‎Lib/test/test_asyncio/test_tools.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ def CoroInfo(call_stack, task_name):
1919

2020

2121
def TaskInfo(task_id, task_name, coroutine_stack, awaited_by):
22-
return _remote_debugging.TaskInfo(
23-
(task_id, task_name, coroutine_stack, awaited_by, False))
22+
return _remote_debugging.TaskInfo((task_id, task_name, coroutine_stack, awaited_by))
2423

2524

2625
def AwaitedInfo(thread_id, awaited_by):

‎Lib/test/test_external_inspection.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,7 +1666,7 @@ async def main():
16661666
]
16671667
self.assertIn(
16681668
TaskInfo(
1669-
[ANY, "Task-1", [CoroInfo([main_stack, ANY])], [], False]
1669+
[ANY, "Task-1", [CoroInfo([main_stack, ANY])], []]
16701670
),
16711671
entries,
16721672
)
@@ -1720,7 +1720,6 @@ async def main():
17201720
]
17211721
)
17221722
],
1723-
False,
17241723
]
17251724
),
17261725
entries,
@@ -1788,7 +1787,6 @@ async def main():
17881787
]
17891788
)
17901789
],
1791-
False,
17921790
]
17931791
),
17941792
entries,

‎Modules/_remote_debugging/clinic/module.c.h‎

Lines changed: 6 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Modules/_remote_debugging/module.c‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PyStructSequence_Desc TaskInfo_desc = {
4242
"_remote_debugging.TaskInfo",
4343
"Information about an asyncio task or future",
4444
TaskInfo_fields,
45-
5
45+
4
4646
};
4747

4848
// LocationInfo structseq type
@@ -898,7 +898,7 @@ Each TaskInfo contains:
898898
- coroutine_stack (list[CoroInfo]): Stack of coroutine frames.
899899
- awaited_by (list[CoroInfo]): Coroutine information for tasks or futures
900900
awaiting this task.
901-
- is_future (bool): True for a Future that is not a Task.
901+
- is_future (bool, named-only): True for a plain Future.
902902
903903
Each CoroInfo contains:
904904
- call_stack (list[FrameInfo]): Call stack frames for the coroutine.
@@ -920,8 +920,7 @@ Example output:
920920
task_id=1,
921921
task_name="Task-1",
922922
coroutine_stack=[...],
923-
awaited_by=[],
924-
is_future=False
923+
awaited_by=[]
925924
)
926925
]
927926
)
@@ -930,7 +929,7 @@ Example output:
930929

931930
static PyObject *
932931
_remote_debugging_RemoteUnwinder_get_all_awaited_by_impl(RemoteUnwinderObject *self)
933-
/*[clinic end generated code: output=6a49cd345e8aec53 input=96fbf9a0e9096045]*/
932+
/*[clinic end generated code: output=6a49cd345e8aec53 input=17fcd3d7bb835624]*/
934933
{
935934
if (ensure_async_debug_offsets(self) < 0) {
936935
return NULL;
@@ -1002,7 +1001,7 @@ Each TaskInfo contains:
10021001
- coroutine_stack (list[CoroInfo]): Stack of coroutine frames.
10031002
- awaited_by (list[CoroInfo]): Coroutine information for
10041003
tasks or futures awaiting this task.
1005-
- is_future (bool): True for a Future that is not a Task.
1004+
- is_future (bool, named-only): True for a plain Future.
10061005
10071006
Each CoroInfo contains:
10081007
- call_stack (list[FrameInfo]): Frames for the coroutine.
@@ -1038,17 +1037,15 @@ Example output:
10381037
],
10391038
awaited_by=[
10401039
CoroInfo(call_stack=[...], task_name=2)
1041-
],
1042-
is_future=False
1040+
]
10431041
),
10441042
TaskInfo(
10451043
task_id=2,
10461044
task_name="main",
10471045
coroutine_stack=[
10481046
CoroInfo(call_stack=[...], task_name=2)
10491047
],
1050-
awaited_by=[],
1051-
is_future=False
1048+
awaited_by=[]
10521049
)
10531050
])
10541051
]
@@ -1057,7 +1054,7 @@ Example output:
10571054

10581055
static PyObject *
10591056
_remote_debugging_RemoteUnwinder_get_async_stack_trace_impl(RemoteUnwinderObject *self)
1060-
/*[clinic end generated code: output=6433d52b55e87bbe input=648a5752d51242b9]*/
1057+
/*[clinic end generated code: output=6433d52b55e87bbe input=a95958816358476a]*/
10611058
{
10621059
if (ensure_async_debug_offsets(self) < 0) {
10631060
return NULL;

0 commit comments

Comments
 (0)