Skip to content

asyncio: fix create_server overloads - #16170

Draft
aryansk wants to merge 2 commits into
python:mainfrom
aryansk:codex/typeshed-create-server-port-none
Draft

asyncio: fix create_server overloads#16170
aryansk wants to merge 2 commits into
python:mainfrom
aryansk:codex/typeshed-create-server-port-none

Conversation

@aryansk

@aryansk aryansk commented Aug 9, 2026

Copy link
Copy Markdown

Add the missing host-and-null-port overload to the asyncio event-loop stubs while keeping the abstract and concrete interfaces aligned.

Fixes #16157

Agent used: Codex

@github-actions

This comment has been minimized.

@donbarbos

Copy link
Copy Markdown
Contributor

Please remove the tests. In typeshed, we only add regression tests for functions and classes which are known to have caused complex problems in the past, or where stubs are difficult to get right. 100% test coverage for typeshed is neither necessary nor desirable, as it would lead to code duplication.

See tests/REGRESSION.md for more information.

typeshed only keeps regression tests where stubs are difficult to get
right; the create_server overloads are covered by existing test suites.
@aryansk

aryansk commented Aug 14, 2026

Copy link
Copy Markdown
Author

Done — I've removed the regression test file. The PR now only carries the stub overload changes for create_server. Thanks for the pointer to tests/REGRESSION.md.

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

websockets (https://github.com/aaugustin/websockets)
+ src/websockets/asyncio/server.py:672: error: Unused "type: ignore" comment  [unused-ignore]

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.

BaseEventLoop.create_server overload doesn't allow passing host with port=None

2 participants