Skip to content

Commit ad6827f

Browse files
committed
Try to disable buffering
1 parent 4ab63a5 commit ad6827f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

python_packages/jupyter_lsp/jupyter_lsp/session.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def init_process(self):
137137
stdin=subprocess.PIPE,
138138
stdout=subprocess.PIPE,
139139
env=self.substitute_env(self.spec.get("env", {}), os.environ),
140+
bufsize=0,
140141
)
141142

142143
def init_queues(self):

python_packages/jupyter_lsp/jupyter_lsp/stdio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class LspStdIoBase(LoggingConfigurable):
3131
executor = None
3232

3333
stream = Instance(
34-
io.BufferedIOBase, help="the stream to read/write"
35-
) # type: io.BufferedIOBase
34+
io.RawIOBase, help="the stream to read/write"
35+
) # type: io.RawIOBase
3636
queue = Instance(Queue, help="queue to get/put")
3737

3838
def __repr__(self): # pragma: no cover

python_packages/jupyter_lsp/jupyter_lsp/tests/test_stdio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def spawn_writer(self, message: str, repeats: int = 1, interval=None):
3232
)
3333
)
3434
return subprocess.Popen(
35-
["python", "-u", str(commands_file)], stdout=subprocess.PIPE
35+
["python", "-u", str(commands_file)], stdout=subprocess.PIPE, bufsize=0
3636
)
3737

3838

0 commit comments

Comments
 (0)