Skip to content

[socket] Use concrete classes for socket.makefile return types - #16587

Merged
srittau merged 4 commits into
python:mainfrom
srittau:socket-makefile
Oct 28, 2026
Merged

srittau merged 4 commits into
python:mainfrom
srittau:socket-makefile

Conversation

@srittau

@srittau srittau commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

This is the only function that returns IOBase, which does not have standard read and write methods. Check whether this overload is actually needed.

Cf. #16583

@srittau srittau changed the title Remove socket.makefile fallback overload [socket] Remove socket.makefile fallback overload Oct 21, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@srittau srittau changed the title [socket] Remove socket.makefile fallback overload [socket] Use concrete classes for socket.makefile return types Oct 21, 2026
@srittau

srittau commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

Update: The overload seems still needed, but I've exchanged IOBase for a union of the concrete classes returned.

@srittau
srittau marked this pull request as ready for review October 21, 2026 10:33
@github-actions

Copy link
Copy Markdown
Contributor

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

@srittau
srittau merged commit 44a9df6 into python:main Oct 28, 2026
88 checks passed
@srittau
srittau deleted the socket-makefile branch October 28, 2026 19:51
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.

1 participant