Add PEP 741 PyInitConfig API to the limited C API
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
The GDB project would be interested to use the limited C API to embed Python. Some APIs used by GDB are missing from the limited C API (well, it's limited ;-)), one of them is the PEP 741 PyInitConfig API.
I propose adding PEP 741 PyInitConfig API to the limited C API.
PEP 741 Rationale lists other projects embedding Python. More projects would benefit from PyInitConfig being in the limited C API.
For example, the vim text editor uses dlopen/dlsym and GetProcAddress on Windows to get Python symbols at runtime. The libpython library is loaded on demand (at the first Python usage). vim already supports the stable ABI. See src/if_python3.c.
So far, I found pyinstaller which already adopted the PyInitConfig API.
Linked PRs
- gh-149194
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
閱讀 PEP 741 中關於嵌入的理由,並檢查 Vim 的 src/if_python3.c,以了解 limited ABI 的使用情境。接著檢視連結的 PR gh-149194 以及 limited C API 相關工作;當 PyInitConfig 可透過該 API 供嵌入 Python 的專案使用時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- c, python
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100