Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/execnet/gateway_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,8 @@ def _finished_receiving(self) -> None:


class ChannelFile:
encoding = "utf-8"

def __init__(self, channel: Channel, proxyclose: bool = True) -> None:
self.channel = channel
self._proxyclose = proxyclose
Expand Down
5 changes: 5 additions & 0 deletions testing/test_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ def f(item):


class TestChannelFile:
def test_channel_file_encoding(self, gw: Gateway) -> None:
channel = gw.newchannel()
assert channel.makefile("r").encoding == "utf-8"
assert channel.makefile("w").encoding == "utf-8"

def test_channel_file_write(self, gw: Gateway) -> None:
channel = gw.remote_exec(
"""
Expand Down