Skip to content

Commit

Permalink
Add missed stream argument (python#111775)
Browse files Browse the repository at this point in the history
* Add missed `stream` argument

* Add news
  • Loading branch information
shadchin authored and woodruffw committed Mar 4, 2024
1 parent bd179f5 commit 468e14a
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
Expand Up @@ -88,7 +88,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
@@ -0,0 +1,2 @@
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
added missed ``stream`` argument.

0 comments on commit 468e14a

Please sign in to comment.