File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 5757
5858 - name : Install Python Deps
5959 if : steps.release.outputs.version == 0
60- env :
61- PIP_PRE : ${{ matrix.python-version == '3.13' && '1' || '0' }}
6260 run : |
6361 pip install -e .[test,dev]
6462
Original file line number Diff line number Diff line change @@ -576,9 +576,14 @@ def get_name(self):
576576 async def coro ():
577577 pass
578578
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
582587
583588 self .assertIsNone (self .loop .get_task_factory ())
584589 task = self .loop .create_task (coro (), name = "mytask" )
You can’t perform that action at this time.
0 commit comments