Skip to content

Conversation

@tungol
Copy link
Contributor

@tungol tungol commented Oct 9, 2024

Following up on #12755

The __enter__'s were due to using TypeVar instead of Self originally. I'm not totally sure about the others, but they don't seem necessary anymore.

stdlib/_io.pyi Outdated
# operations.
def seek(self, cookie: int, whence: int = 0, /) -> int: ...

# The C implementation is not a subclass of TextIOWrapper at runtime,
Copy link
Member

Choose a reason for hiding this comment

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

The C implementation is the one that virtually all users would use, right? In that case, it would be better to follow the C implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wouldn't mind untangling that, but I think that's for another MR. I can remove the note if you'd prefer, it's not terribly important to capture that here right now.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

@JelleZijlstra JelleZijlstra merged commit 42ebc89 into python:main Oct 10, 2024
@tungol tungol deleted the io-clean branch October 23, 2024 17:06
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.

2 participants