From 0a8d05981feb138772960ca5f3c437bd72a6261f Mon Sep 17 00:00:00 2001 From: donbarbos Date: Thu, 5 Feb 2026 00:32:45 +0400 Subject: [PATCH 1/2] [asyncio] Fix version for eager_start param in create_task Closes: #15269 Fixes: #15211 --- stdlib/asyncio/base_events.pyi | 3 ++- stdlib/asyncio/events.pyi | 3 ++- stdlib/asyncio/taskgroups.pyi | 3 ++- stdlib/asyncio/tasks.pyi | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/stdlib/asyncio/base_events.pyi b/stdlib/asyncio/base_events.pyi index 0d8ac2d47491..dac6164d736d 100644 --- a/stdlib/asyncio/base_events.pyi +++ b/stdlib/asyncio/base_events.pyi @@ -83,7 +83,8 @@ class BaseEventLoop(AbstractEventLoop): # Future methods def create_future(self) -> Future[Any]: ... # Tasks methods - if sys.version_info >= (3, 14): + if sys.version_info >= (3, 13): + # `eager_start` parameter added in Python 3.13.3 def create_task( self, coro: _CoroutineLike[_T], diff --git a/stdlib/asyncio/events.pyi b/stdlib/asyncio/events.pyi index 4f2f45355f5b..aff85018b90d 100644 --- a/stdlib/asyncio/events.pyi +++ b/stdlib/asyncio/events.pyi @@ -161,7 +161,8 @@ class AbstractEventLoop: @abstractmethod def create_future(self) -> Future[Any]: ... # Tasks methods - if sys.version_info >= (3, 14): + if sys.version_info >= (3, 13): + # `eager_start` parameter added in Python 3.13.3 @abstractmethod def create_task( self, diff --git a/stdlib/asyncio/taskgroups.pyi b/stdlib/asyncio/taskgroups.pyi index 2968b0719761..a6cbcafa3c1c 100644 --- a/stdlib/asyncio/taskgroups.pyi +++ b/stdlib/asyncio/taskgroups.pyi @@ -22,7 +22,8 @@ class TaskGroup: async def __aenter__(self) -> Self: ... async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ... - if sys.version_info >= (3, 14): + if sys.version_info >= (3, 13): + # `eager_start` parameter added in Python 3.13.3 def create_task( self, coro: _CoroutineLike[_T], diff --git a/stdlib/asyncio/tasks.pyi b/stdlib/asyncio/tasks.pyi index be9b60cd36ae..9b7bc914a10f 100644 --- a/stdlib/asyncio/tasks.pyi +++ b/stdlib/asyncio/tasks.pyi @@ -413,7 +413,8 @@ else: def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... -if sys.version_info >= (3, 14): +if sys.version_info >= (3, 13): + # `eager_start` parameter added in Python 3.13.3 def create_task( coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None ) -> Task[_T]: ... From a0a01b960255c441c1cbe3f233ae2d9d0f05adab Mon Sep 17 00:00:00 2001 From: donbarbos Date: Thu, 5 Feb 2026 01:09:45 +0400 Subject: [PATCH 2/2] to see CI problems related with new releases --- stdlib/asyncio/base_events.pyi | 4 ++-- stdlib/asyncio/events.pyi | 4 ++-- stdlib/asyncio/taskgroups.pyi | 4 ++-- stdlib/asyncio/tasks.pyi | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stdlib/asyncio/base_events.pyi b/stdlib/asyncio/base_events.pyi index dac6164d736d..038d226152d1 100644 --- a/stdlib/asyncio/base_events.pyi +++ b/stdlib/asyncio/base_events.pyi @@ -83,8 +83,8 @@ class BaseEventLoop(AbstractEventLoop): # Future methods def create_future(self) -> Future[Any]: ... # Tasks methods - if sys.version_info >= (3, 13): - # `eager_start` parameter added in Python 3.13.3 + if sys.version_info >= (3, 14): + # `eager_start` only exists in Python 3.13.3 def create_task( self, coro: _CoroutineLike[_T], diff --git a/stdlib/asyncio/events.pyi b/stdlib/asyncio/events.pyi index aff85018b90d..dbf53d5935d9 100644 --- a/stdlib/asyncio/events.pyi +++ b/stdlib/asyncio/events.pyi @@ -161,8 +161,8 @@ class AbstractEventLoop: @abstractmethod def create_future(self) -> Future[Any]: ... # Tasks methods - if sys.version_info >= (3, 13): - # `eager_start` parameter added in Python 3.13.3 + if sys.version_info >= (3, 14): + # `eager_start` only exists in Python 3.13.3 @abstractmethod def create_task( self, diff --git a/stdlib/asyncio/taskgroups.pyi b/stdlib/asyncio/taskgroups.pyi index a6cbcafa3c1c..dd0e976535f6 100644 --- a/stdlib/asyncio/taskgroups.pyi +++ b/stdlib/asyncio/taskgroups.pyi @@ -22,8 +22,8 @@ class TaskGroup: async def __aenter__(self) -> Self: ... async def __aexit__(self, et: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None) -> None: ... - if sys.version_info >= (3, 13): - # `eager_start` parameter added in Python 3.13.3 + if sys.version_info >= (3, 14): + # `eager_start` only exists in Python 3.13.3 def create_task( self, coro: _CoroutineLike[_T], diff --git a/stdlib/asyncio/tasks.pyi b/stdlib/asyncio/tasks.pyi index 9b7bc914a10f..6648c6c48359 100644 --- a/stdlib/asyncio/tasks.pyi +++ b/stdlib/asyncio/tasks.pyi @@ -413,8 +413,8 @@ else: def all_tasks(loop: AbstractEventLoop | None = None) -> set[Task[Any]]: ... -if sys.version_info >= (3, 13): - # `eager_start` parameter added in Python 3.13.3 +if sys.version_info >= (3, 14): + # `eager_start` only exists in Python 3.13.3 def create_task( coro: _CoroutineLike[_T], *, name: str | None = None, context: Context | None = None, eager_start: bool | None = None ) -> Task[_T]: ...