Skip to content

[Design] Proposal for pylibseekdb Build Information#131

Open
zamaoxiaoji wants to merge 1 commit intooceanbase:developfrom
zamaoxiaoji:feature/issue-110
Open

[Design] Proposal for pylibseekdb Build Information#131
zamaoxiaoji wants to merge 1 commit intooceanbase:developfrom
zamaoxiaoji:feature/issue-110

Conversation

@zamaoxiaoji
Copy link

Task Description

Currently, pylibseekdb users have no way to determine the exact build information of the library they are using, such as:

  • Commit ID (Git revision)
  • Version number
  • Build date and time
  • Build branch
  • Build flags

Solution Description

Currently, pylibseekdb users have no way to determine the exact build information of the library they are using, such as:

  • Commit ID (Git revision)
  • Version number
  • Build date and time
  • Build branch
  • Build flags

Passed Regressions

Verify output matches expected format after build:

python3 -c "import libseekdb_python as seekdb; seekdb.print_version()"

Expected output format:

pylibseekdb (OceanBase seekdb 1.1.0.0)
REVISION: 1-<git-sha>
BUILD_BRANCH: <branch-name>
BUILD_TIME: <date> <time>
BUILD_FLAGS: <build-type>

Upgrade Compatibility

  • __version__: Currently exists but returns data version (e.g., "1.1.0.0"). We will keep this behavior or enhance it to return PACKAGE_VERSION which is more meaningful for users.
  • New APIs: build_info, print_version(), get_version_string() are purely additive and do not break existing code.
  • Requires Python 3.6+ (same as existing pylibseekdb requirement)
  • Uses standard pybind11 bindings, no special Python version dependencies

@hnwyllmm
Copy link
Member

This solution will fix #110.

@hnwyllmm
Copy link
Member

hnwyllmm commented Feb 9, 2026

This solution looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants