python / python/cpython

Add structured version info for dbm.gnu

Open
#157,478 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.16 extension-modules type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

_gdbm._GDBM_VERSION (a private plain tuple from the GDBM_VERSION_MAJOR, GDBM_VERSION_MINOR and GDBM_VERSION_PATCH macros, added in gh-78082 for tests) is the only information about the gdbm library, and it only describes the version the module was built against. The version of the library loaded at runtime is not exposed, although gdbm provides it as gdbm_version_number[] and as the release string gdbm_version (a banner like 'GDBM version 1.26. 30/07/2025', possibly with a build date).

Add dbm.gnu.GDBM_VERSION_INFO for the build-time version, dbm.gnu.gdbm_version_info for the runtime version (both named tuples), and dbm.gnu.gdbm_version for the release string.

Linked PRs
  • gh-157479

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the dbm.gnu module and the existing _GDBM_VERSION exposure, then inspect how the gdbm library version is accessed. The work is done when the module exposes the two named version-info values and the runtime release string described in the issue; gh-157479 is listed as a linked PR.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.