0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 00:38:00 +01:00

Add missed stream argument (#111775)

* Add missed `stream` argument

* Add news
This commit is contained in:
Alexander Shadchin 2024-02-20 17:09:46 +03:00 committed by GitHub
parent d24bed5ba0
commit 1ff6c1416b
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.