Skip to content

Annotate encoding argument and return type of io.text_encoding as TypeVar with upper bound str in second overload#15663

Merged
srittau merged 1 commit intopython:mainfrom
jonathandung:patch-1
Apr 22, 2026
Merged

Annotate encoding argument and return type of io.text_encoding as TypeVar with upper bound str in second overload#15663
srittau merged 1 commit intopython:mainfrom
jonathandung:patch-1

Conversation

@jonathandung
Copy link
Copy Markdown
Contributor

Closes #15662.

@github-actions
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@srittau srittau merged commit 4849b07 into python:main Apr 22, 2026
51 checks passed
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.

io.text_encoding should realistically only take strings or None

2 participants