File tree 2 files changed +8
-5
lines changed
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 57
57
58
58
- name : Install Python Deps
59
59
if : steps.release.outputs.version == 0
60
- env :
61
- PIP_PRE : ${{ matrix.python-version == '3.13' && '1' || '0' }}
62
60
run : |
63
61
pip install -e .[test,dev]
64
62
Original file line number Diff line number Diff line change @@ -576,9 +576,14 @@ def get_name(self):
576
576
async def coro ():
577
577
pass
578
578
579
- factory = lambda loop , coro , ** kwargs : MyTask (
580
- coro , loop = loop , ** kwargs
581
- )
579
+ def factory (loop , coro , ** kwargs ):
580
+ task = MyTask (coro , loop = loop , ** kwargs )
581
+ # Python moved the responsibility to set the name to the Task
582
+ # class constructor, so MyTask.set_name is never called by
583
+ # Python's create_task. Compensate for that here.
584
+ if self .is_asyncio_loop () and "name" in kwargs :
585
+ task .set_name (kwargs ["name" ])
586
+ return task
582
587
583
588
self .assertIsNone (self .loop .get_task_factory ())
584
589
task = self .loop .create_task (coro (), name = "mytask" )
You can’t perform that action at this time.
0 commit comments