[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:
Miss Islington (bot) 2024-02-20 17:36:59 +01:00 committed by GitHub
parent 01c37f1d07
commit aff083e8ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -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):

View File

@ -0,0 +1,2 @@
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
added missed ``stream`` argument.