Skip to content
11 changes: 10 additions & 1 deletion stdlib/asyncio/base_events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,16 @@ class BaseEventLoop(AbstractEventLoop):
# Future methods
def create_future(self) -> Future[Any]: ...
# Tasks methods
if sys.version_info >= (3, 11):
if sys.version_info >= (3, 14):
def create_task(
self,
coro: _CoroutineLike[_T],
*,
name: object = None,
context: Context | None = None,
eager_start: bool | None = False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eager_start: bool | None = False,
eager_start: bool | None = None,

) -> Task[_T]: ...
elif sys.version_info >= (3, 11):
def create_task(self, coro: _CoroutineLike[_T], *, name: object = None, context: Context | None = None) -> Task[_T]: ...
else:
def create_task(self, coro: _CoroutineLike[_T], *, name: object = None) -> Task[_T]: ...
Expand Down
12 changes: 11 additions & 1 deletion stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,17 @@ class AbstractEventLoop:
@abstractmethod
def create_future(self) -> Future[Any]: ...
# Tasks methods
if sys.version_info >= (3, 11):
if sys.version_info >= (3, 14):
@abstractmethod
def create_task(
self,
coro: _CoroutineLike[_T],
*,
name: str | None = None,
context: Context | None = None,
eager_start: bool | None = False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eager_start: bool | None = False,
eager_start: bool | None = None,

) -> Task[_T]: ...
elif sys.version_info >= (3, 11):
@abstractmethod
def create_task(
self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None
Expand Down
15 changes: 14 additions & 1 deletion stdlib/asyncio/taskgroups.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,18 @@ class TaskGroup:

async def __aenter__(self) -> Self: ...
async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ...
def create_task(self, coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None) -> Task[_T]: ...
if sys.version_info >= (3, 14):
def create_task(
self,
coro: _CoroutineLike[_T],
*,
name: str | None = None,
context: Context | None = None,
eager_start: bool | None = False,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eager_start: bool | None = False,
eager_start: bool | None = None,

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

def _on_task_done(self, task: Task[object]) -> None: ...
7 changes: 6 additions & 1 deletion stdlib/asyncio/tasks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,12 @@ else:

def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ...

if sys.version_info >= (3, 11):
if sys.version_info >= (3, 14):
def create_task(
coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = False
coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None

) -> Task[_T]: ...

elif sys.version_info >= (3, 11):
def create_task(coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None) -> Task[_T]: ...

else:
Expand Down