Skip to content

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

Open
nightcityblade wants to merge 2 commits into
python:mainfrom
nightcityblade:fix/issue-15269
Open

[stdlib] Allow loop.create_task eager_start on Python 3.13#16142
nightcityblade wants to merge 2 commits 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

This comment has been minimized.

@nightcityblade

Copy link
Copy Markdown
Contributor Author

Refreshed the branch with current main in 6e276e8, which brings in the upstream fixes for both unrelated failures from the original run: the Python 3.15 _ctypes.dllist stub and the stub_uploader dependency pin. After the merge, pre-commit and structure checks passed; mypy on stdlib/asyncio passed for Python 3.13 and 3.14; the stdlib regression cases passed for 3.13 and 3.14; ty passed for stdlib/asyncio on 3.13; and the Pyright regression suite passed on 3.13. The host-dependent stdlib stubtest is not part of that proof because this local macOS Python lacks Tk and several curses runtime symbols; current main CI is green and the refreshed PR CI will provide the full matrix.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

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.

kwargs missing on loop.create_task methods

1 participant