clj-python / clj-python/libpython-clj

"auto flush" tty optionally

Offen
#270 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Clojure
Sterne
1.2k
Forks
74
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den auto-flush-Branch mit der aktuellen libpython-clj-Implementierung zu vergleichen und den Fix für #216 zu überprüfen. Lege fest, wie autoflush konfiguriert werden soll, und verifiziere dies mit einem lang laufenden Prozess, der über eine Python-Bibliothek eines Drittanbieters schreibt; abgeschlossen ist die Arbeit, wenn die Option bei Aktivierung zuverlässig nach jedem Schreibvorgang einen Flush ausführt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
clojure, python
Bereich
backend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.