Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

Closes #3993.

def __init__(
self,
buffer: IO[bytes],
buffer: BinaryIO,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe CI fails due to this change. Honestly, I would just leave this instance as IO[bytes] for now. In the future it might make sense to make TextIOWrapper generic over the buffer, but I haven't looked at it in depth.

@hauntsaninja
Copy link
Collaborator

As it happens, I just removed that particular sample from mypy (python/mypy#8838), so if you re-run CI it should pass.

@srittau
Copy link
Collaborator

srittau commented May 18, 2020

I'm re-running it. It would be great if someone with a large typed code base (hey Dropbox team) could check this, though. Our internal code base doesn't use TextIOWrapper directly.

Copy link
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.

Ok, let's try this out. If it breaks anything, we can always partly revert before the next mypy release.

@srittau srittau merged commit 9902348 into python:master May 19, 2020
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
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.

The result of TextIOWrapper.detach() should be IO[bytes]

3 participants