Skip to content

[stdlib] Allow loop.create_task eager_start on Python 3.13 - #16142

Open
nightcityblade wants to merge 1 commit into
python:mainfrom
nightcityblade:fix/issue-15269
Open

[stdlib] Allow loop.create_task eager_start on Python 3.13#16142
nightcityblade wants to merge 1 commit into
python:mainfrom
nightcityblade:fix/issue-15269

Conversation

@nightcityblade

Copy link
Copy Markdown
Contributor

Fixes#15269.

Python 3.13.3 added arbitrary keyword forwarding to event-loop create_task, which allows eager_start to be passed to a compatible task factory. Move the existing loop-specific eager_start signature gate from Python 3.14 to Python 3.13 while leaving the high-level asyncio.create_task and TaskGroup.create_task gates unchanged.

Add regression coverage for both AbstractEventLoop and BaseEventLoop.

Tests:

  • pre-commit run --files stdlib/asyncio/base_events.pyi stdlib/asyncio/events.pyi stdlib/@tests/test_cases/asyncio/check_task.py
  • python tests/mypy_test.py stdlib/asyncio -p 3.13
  • python tests/pyright_test.py stdlib/asyncio --pythonversion 3.13 -p pyrightconfig.stricter.json
  • python tests/pyright_test.py stdlib/@tests/test_cases/asyncio/check_task.py --pythonversion 3.13 -p pyrightconfig.testcases.json
  • python tests/regr_test.py stdlib -p 3.13

@github-actions

Copy link
Copy Markdown
Contributor

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

Sign up for freeto 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.

kwargs missing on loop.create_task methods

1 participant

@nightcityblade