typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

TaskGroup create_task missing eager_start and kwargs

Open hlovatt opened this issue 2 months ago • 1 comments

The type shed https://github.com/python/typeshed/blob/main/stdlib/asyncio/taskgroups.pyi on line 25 is missing eager_start and kwargs, should read:

    def create_task(self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None, **kwargs: Any) -> Task[_T]: ...

hlovatt avatar Nov 12 '25 01:11 hlovatt

Added in 3.14. I'm not sure we should add kwargs, though. Instead copying the actual args from Task.__init__() seems safest to me. (Although as I'm not a great asyncio expert, I could be persuaded otherweise.)

srittau avatar Nov 14 '25 20:11 srittau