python / python/cpython

Add structured version info for dbm.ndbm

未關閉
#157,480 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

3.16 extension-modules type-feature
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Feature or enhancement

dbm.ndbm can be built with GDBM's compatibility interface, with Berkeley DB, or with a classic NDBM library, and only exposes library, the name of the implementation. No version information is available, and library is 'GNU gdbm' even for a classic NDBM library, because the USE_NDBM build assumes GDBM.

The library used by dbm.ndbm may differ from the one used by dbm.gnu (different builds of GDBM, or Berkeley DB), so dbm.ndbm needs its own constants, named after the library it was built with:

  • if library is 'GNU gdbm': GDBM_VERSION_INFO, gdbm_version_info and gdbm_version, as in dbm.gnu (gh-157478).
  • if library is 'Berkeley DB': DB_VERSION and DB_VERSION_INFO for the build-time version (DB_VERSION_STRING, DB_VERSION_MAJOR/MINOR/PATCH), db_version and db_version_info for the runtime version (db_version()).
  • for a classic NDBM library there is no version information; library should be 'ndbm'.
Linked PRs
  • gh-157484

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 dbm.ndbm 的實作開始,並按照 gh-157478 中的參考,將其公開的函式庫資訊與 dbm.gnu 進行比較。檢查 GNU gdbm 和 Berkeley DB 的建置時與執行時版本需求,並驗證傳統 NDBM 不回報版本資訊且將自身識別為 ndbm;gh-157484 表示相關工作已在進行中。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
databases
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。