clj-python / clj-python/libpython-clj

"auto flush" tty optionally

Abierto
#270 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Clojure
Estrellas
1.2k
Forks
74
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The fix of #216 is not fully solving the issue.

using "libpythin-clj", there is so far no way to enforce "autoflush".
So when a third party python library does not explicitly flush, then we cannot force it.
And this can result in not seeing "debug outputs" on time for long running processes.
(in my tests they only came when the JVM proccess ends)

When using a normal "python" executable, there are some documented ways, but none of it is working with "libpython-clj".
(using "unbuffer" and similar tricks, like env varaibales: PYTHONUNBUFFERED=false)

On this branch https://github.com/behrica/libpython-clj/tree/auto-flush
I have a solution (so far hardcoded), which solves it.
It adds "flush" to each write.

This would need to be optional and configurable (eventually together with a way to configure as well the return value of "isatty" (which I did not need in my tests, false was working fine)

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza comparando la rama auto-flush con la implementación actual de libpython-clj y revisa el fix para #216. Define cómo debe configurarse autoflush y verifícalo con un proceso de larga duración que escriba mediante una biblioteca Python de terceros; se considerará terminado cuando la opción vacíe el búfer de forma fiable después de cada escritura al estar habilitada.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
clojure, python
Área
backend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.