Skip to content

Conversation

@kevinderuijter
Copy link

@kevinderuijter kevinderuijter commented Jan 2, 2026

@github-actions

This comment has been minimized.

@donbarbos
Copy link
Contributor

Thanks you!
I'm not asyncio expert, but seems this argument has been added to all create_task methods:

Source FTR: python/cpython#128307

Could you reflect it in your PR?

@kevinderuijter kevinderuijter changed the title fix: add eager_start as an arugment. Draft: fix: add eager_start as an argument. Jan 2, 2026
@kevinderuijter
Copy link
Author

python/cpython#128307

Thank you for your response and advice. I've reflected my PR by adding eager_start: bool | None = False to all create_task methods. Only when if sys.version_info >= (3, 14) is True.

@github-actions

This comment has been minimized.

@kevinderuijter kevinderuijter changed the title Draft: fix: add eager_start as an argument. fix: add eager_start as an argument. Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Contributor

@donbarbos donbarbos left a comment

Choose a reason for hiding this comment

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

thanks, I have last suggesion: let's also set the default value as in the documentation

*,
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,

*,
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,

*,
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,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eager_start missing in stdlib/asyncio/tasks.pyi

2 participants