mirror of
https://github.com/dgelessus/python-rsrcfork.git
synced 2024-06-20 21:29:26 +00:00
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:
parent
6d03954784
commit
9ef084de58
|
@ -306,7 +306,7 @@ class ResourceFile(collections.abc.Mapping):
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unsupported value for the fork parameter: {fork!r}")
|
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.
|
"""Create a ResourceFile wrapping the given byte stream.
|
||||||
|
|
||||||
To read resource file data from a bytes object, wrap it in an io.BytesIO.
|
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__()
|
super().__init__()
|
||||||
|
|
||||||
self._close_stream: bool = close
|
self._close_stream: bool = close
|
||||||
self._stream: typing.io.BinaryIO
|
self._stream: typing.BinaryIO
|
||||||
if stream.seekable():
|
if stream.seekable():
|
||||||
self._stream = stream
|
self._stream = stream
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user