Add structured version info for pyexpat
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Feature or enhancement
pyexpat.EXPAT_VERSION (from XML_ExpatVersion()) and pyexpat.version_info (from XML_ExpatVersionInfo()) describe the Expat library loaded at runtime: both functions are compiled into libexpat from its XML_MAJOR_VERSION, XML_MINOR_VERSION and XML_MICRO_VERSION macros. The same macros evaluated in pyexpat.c give the version of the headers the module was built against, which is what the #if XML_COMBINED_VERSION >= ... checks in the module depend on. The two can differ when a system libexpat is used. The build-time version is not exposed to Python; it can only be inferred from which parser methods exist.
Add pyexpat.VERSION_INFO for the build-time version, and make pyexpat.version_info a named tuple.
Linked PRs
- gh-157474
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 pyexpat.c 開始,這裡公開了 Expat 版本巨集和執行階段版本 API。追蹤現有的 VERSION_INFO 和 version_info 定義,然後驗證建置時版本是否被分開公開,以及 version_info 是否具有具名元組行為。如果有 pyexpat API 測試,請檢查這些測試,並確認當兩個版本不同時,它們都能被正確回報。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- c, python
- 領域
- api, backend
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100