@@ -112,25 +112,25 @@ class TestPyFreeThreading(TestFreeThreading, TestCase):
112112 all_tasks = staticmethod (asyncio .tasks ._py_all_tasks )
113113 current_task = staticmethod (asyncio .tasks ._py_current_task )
114114
115- def factory (self , loop , coro , context = None ):
116- return asyncio .tasks ._PyTask (coro , loop = loop , context = context )
115+ def factory (self , loop , coro , ** kwargs ):
116+ return asyncio .tasks ._PyTask (coro , loop = loop , ** kwargs )
117117
118118
119119@unittest .skipUnless (hasattr (asyncio .tasks , "_c_all_tasks" ), "requires _asyncio" )
120120class TestCFreeThreading (TestFreeThreading , TestCase ):
121121 all_tasks = staticmethod (getattr (asyncio .tasks , "_c_all_tasks" , None ))
122122 current_task = staticmethod (getattr (asyncio .tasks , "_c_current_task" , None ))
123123
124- def factory (self , loop , coro , context = None ):
125- return asyncio .tasks ._CTask (coro , loop = loop , context = context )
124+ def factory (self , loop , coro , ** kwargs ):
125+ return asyncio .tasks ._CTask (coro , loop = loop , ** kwargs )
126126
127127
128128class TestEagerPyFreeThreading (TestPyFreeThreading ):
129- def factory (self , loop , coro , context = None ):
130- return asyncio .tasks ._PyTask (coro , loop = loop , context = context , eager_start = True )
129+ def factory (self , loop , coro , eager_start = True , ** kwargs ):
130+ return asyncio .tasks ._PyTask (coro , loop = loop , ** kwargs , eager_start = eager_start )
131131
132132
133133@unittest .skipUnless (hasattr (asyncio .tasks , "_c_all_tasks" ), "requires _asyncio" )
134134class TestEagerCFreeThreading (TestCFreeThreading , TestCase ):
135- def factory (self , loop , coro , context = None ):
136- return asyncio .tasks ._CTask (coro , loop = loop , context = context , eager_start = True )
135+ def factory (self , loop , coro , * , eager_start = True , ** kwargs ):
136+ return asyncio .tasks ._CTask (coro , loop = loop , ** kwargs , eager_start = eager_start )
0 commit comments