Remove uses of the typing.io pseudo-module

According to https://bugs.python.org/issue35089, typing.io should not
be used anymore, and the types that it contains should be accessed
through the main typing module instead.
This commit is contained in:
dgelessus 2019-09-28 01:40:34 +02:00
parent 6d03954784
commit 9ef084de58
1 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ class ResourceFile(collections.abc.Mapping):
else:
raise ValueError(f"Unsupported value for the fork parameter: {fork!r}")
def __init__(self, stream: typing.io.BinaryIO, *, close: bool=False):
def __init__(self, stream: typing.BinaryIO, *, close: bool=False):
"""Create a ResourceFile wrapping the given byte stream.
To read resource file data from a bytes object, wrap it in an io.BytesIO.
@ -321,7 +321,7 @@ class ResourceFile(collections.abc.Mapping):
super().__init__()
self._close_stream: bool = close
self._stream: typing.io.BinaryIO
self._stream: typing.BinaryIO
if stream.seekable():
self._stream = stream
else: