https://github.com/python/cpython/commit/21da9d7164ef6b3695b45b2f648b031ef49c93c4
commit: 21da9d7164ef6b3695b45b2f648b031ef49c93c4
branch: main
author: Bartosz SÅ‚awecki <[email protected]>
committer: pablogsal <[email protected]>
date: 2026-04-14T10:29:01+01:00
summary:

gh-143955: Prevent schema drift false-positives in asyncio tools tests (#148525)

files:
M Lib/test/test_asyncio/test_tools.py

diff --git a/Lib/test/test_asyncio/test_tools.py 
b/Lib/test/test_asyncio/test_tools.py
index 1ab51a6ca3e49b..df934164eb9fd6 100644
--- a/Lib/test/test_asyncio/test_tools.py
+++ b/Lib/test/test_asyncio/test_tools.py
@@ -2,13 +2,27 @@
 
 from asyncio import tools
 
-from collections import namedtuple
+import _remote_debugging
 
-LocationInfo = namedtuple('LocationInfo', ['lineno', 'end_lineno', 
'col_offset', 'end_col_offset'], defaults=[None]*4)
-FrameInfo = namedtuple('FrameInfo', ['funcname', 'filename', 'location'])
-CoroInfo = namedtuple('CoroInfo', ['call_stack', 'task_name'])
-TaskInfo = namedtuple('TaskInfo', ['task_id', 'task_name', 'coroutine_stack', 
'awaited_by'])
-AwaitedInfo = namedtuple('AwaitedInfo', ['thread_id', 'awaited_by'])
+
+def LocationInfo(lineno, end_lineno=None, col_offset=None, 
end_col_offset=None):
+    return _remote_debugging.LocationInfo((lineno, end_lineno, col_offset, 
end_col_offset))
+
+
+def FrameInfo(funcname, filename, location, opcode=None):
+    return _remote_debugging.FrameInfo((filename, location, funcname, opcode))
+
+
+def CoroInfo(call_stack, task_name):
+    return _remote_debugging.CoroInfo((call_stack, task_name))
+
+
+def TaskInfo(task_id, task_name, coroutine_stack, awaited_by):
+    return _remote_debugging.TaskInfo((task_id, task_name, coroutine_stack, 
awaited_by))
+
+
+def AwaitedInfo(thread_id, awaited_by):
+    return _remote_debugging.AwaitedInfo((thread_id, awaited_by))
 
 
 # mock output of get_all_awaited_by function.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to