IPythonKernel.log.debug can get stuck (waiting for writable socket ?)
- Lenguaje dominante
- Python
- Estrellas
- 734
- Forks
- 412
- Merge medio
- 1 d 5 h
- PR fusionados (30 d)
- 8
Descripción
I have (roughly) the following (working on Jedi completion):
```
def do_complete(self, code, cursor_pos):
...
txt, matches = self.shell.complete('', line, line_cursor)
result = {'matches' : matches,
'cursor_end' : cursor_pos,
'cursor_start' : cursor_pos - len(txt),
'metadata' : {},
'status' : 'ok'}
self.log.debug(json.dumps(result))
return result
```
The self.log.debug line will semi-randomly (like randomly but highly biased toward reproductible) just block. I've narrowed it down to it by printing a non context dependant long string (independant of the result). That's seem to be triggered only by nteract (cc @rgbkrk), but it feel worry some that enabling logging can halt the kernel in an indefinitely waiting state (which took me a days to debug).
I'm going to assume that's because the stream is waiting for something to write what has been written to it so write more and vice-versa on the other side. Unsure if there is a bug and whether this is smth we want to fix.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.