clj-python / clj-python/libpython-clj
"auto flush" tty optionally
まだ誰も着手していません。
- 主要言語
- Clojure
- スター
- 1.2k
- フォーク
- 74
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、auto-flushブランチと現在のlibpython-clj実装を比較し、#216の修正を確認します。autoflushをどのように設定するべきかを定義し、サードパーティのPythonライブラリ経由で書き込みを行う長時間実行プロセスで検証します。有効化したときに、このオプションが各書き込みを確実にflushすれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- clojure, python
- 領域
- backend
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100