Skip to content

Commit

Permalink
[3.11] Add missed stream argument (GH-111775) (#115717)
Browse files Browse the repository at this point in the history
Add missed `stream` argument (GH-111775)

* Add missed `stream` argument

* Add news
(cherry picked from commit 1ff6c14)

Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
  • Loading branch information
miss-islington and shadchin committed Feb 20, 2024
1 parent 01c37f1 commit aff083e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/importlib/resources/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
added missed ``stream`` argument.

0 comments on commit aff083e

Please sign in to comment.