clj-python / clj-python/libpython-clj
"auto flush" tty optionally
還沒有人認領這個 Issue。
- 主要語言
- 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 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先比較 auto-flush 分支與目前的 libpython-clj 實作,並檢視 #216 的修正。定義應如何設定 autoflush,並透過一個使用第三方 Python 函式庫進行寫入的長時間執行程序加以驗證;啟用此選項後能可靠地在每次寫入時執行 flush,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- clojure, python
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100