mirror of https://github.com/python/cpython.git
[3.11] Add missed `stream` argument (GH-111775) (#115717)
Add missed `stream` argument (GH-111775)
* Add missed `stream` argument
* Add news
(cherry picked from commit 1ff6c1416b
)
Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
This commit is contained in:
parent
01c37f1d07
commit
aff083e8ee
|
@ -69,7 +69,7 @@ def is_dir(self):
|
|||
def open(self, mode='r', *args, **kwargs):
|
||||
stream = self.parent.reader.open_binary(self.name)
|
||||
if 'b' not in mode:
|
||||
stream = io.TextIOWrapper(*args, **kwargs)
|
||||
stream = io.TextIOWrapper(stream, *args, **kwargs)
|
||||
return stream
|
||||
|
||||
def joinpath(self, name):
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
|
||||
added missed ``stream`` argument.
|
Loading…
Reference in New Issue