[3.12] Add missed stream argument (GH-111775) (#115716)

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:55 +01:00 committed by GitHub
parent b7c633fbfc
commit 20907ca844
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -88,7 +88,7 @@ class ResourceHandle(Traversable):
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.