From 9ef084de5855284946f26ce710f9ea5209e90615 Mon Sep 17 00:00:00 2001 From: dgelessus Date: Sat, 28 Sep 2019 01:40:34 +0200 Subject: [PATCH] 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. --- rsrcfork/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsrcfork/api.py b/rsrcfork/api.py index b1819f3..1d91192 100644 --- a/rsrcfork/api.py +++ b/rsrcfork/api.py @@ -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: