10000 [3.11] Add missed `stream` argument (GH-111775) (#115717) · python/cpython@aff083e · GitHub
[go: up one dir, main page]

Skip to content

Commit aff083e

Browse files
[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 1ff6c14) Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
1 parent 01c37f1 commit aff083e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/importlib/resources/simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def is_dir(self):
6969
def open(self, mode='r', *args, **kwargs):
7070
stream = self.parent.reader.open_binary(self.name)
7171
if 'b' not in mode:
72-
stream = io.TextIOWrapper(*args, **kwargs)
72+
stream = io.TextIOWrapper(stream, *args, **kwargs)
7373
return stream
7474

7575
def joinpath(self, name):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix :meth:`importlib.resources.simple.ResourceHandle.open` for text mode,
2+
added missed ``stream`` argument.

0 commit comments

Comments
 (0)
0