Skip to content

sdk/python: fix native initialization and status arguments - #7903

Merged
jiefenghuang merged 4 commits into
juicedata:mainfrom
adenzhou1350:codex/fix-python-init-error-name
Nov 25, 2026
Merged

jiefenghuang merged 4 commits into
juicedata:mainfrom
adenzhou1350:codex/fix-python-init-error-name

Conversation

@adenzhou1350

@adenzhou1350 adenzhou1350 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Fix two Python/native argument mismatches:

  • Initialization failure decodes the credential pointer instead of the client name (args[0] vs args[2]), raising AttributeError. Preserve the existing generic OSError, errno and message.
  • status(session=2) passes a boolean and returns session 1. Pass the session ID as uint64, matching jfs_status.

Add one regression per bug to the existing SDK suite and brief usage notes. With real libjfs and private SQLite/file storage, the same four tests give original: 2 passed / 2 failed; fixed: 4 passed, with no errors/skips. Initialization failure and session lookups are not mocked; existing read/write controls pass in both arms.

Validation used Python 3.12 and reused libjfs from 331de6ea. Pinned whitespace checks pass. Official CI has also passed fresh libjfs builds and the complete source-tree pysdk_test.py suite on Redis, MySQL and TiKV. All 29 check runs, including the three complete SDK workflows, and the CLA check now pass.

AI assisted the audit, patch and tests; native comparisons were independently executed.

jfs_init receives credential pointer and count before the client name. Decode the name at index 2 when native initialization returns 0, preserving the existing OSError behavior. Cover a real native rejection in the current SDK suite.
Signed-off-by: Xucheng Zhou <aden1350@outlook.com>
@adenzhou1350 adenzhou1350 changed the title sdk/python: fix name lookup when initialization fails sdk/python: fix native initialization and status arguments Nov 23, 2026
Comment thread docs/en/deployment/python_sdk.md Resolved
jiefenghuang and others added 2 commits November 25, 2026 10:12
Co-authored-by: Caitin <34535727+CaitinChen@users.noreply.github.com>
@jiefenghuang
jiefenghuang merged commit b4f20cf into juicedata:main Nov 25, 2026
20 of 24 checks passed
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.

3 participants