Skip to content

[Enhancement]: Unify Python SDK parameter, result and optional-dependency contracts #30069

Closed

Description

@dengn

Existing issue check

  • Checked relevant Python SDK issues; this report concerns the SDK client path.

Environment

Repository main 3e50e1b32d8da61bbbf70c89989fb08b671809de, Python 3.12, SQLAlchemy 1.4/2.x. Initial findings were reproduced offline with synthetic inputs; real-service validation will be linked from the implementation PR.

Priority: P2.

Requirements

Document and converge the different parameter conventions of Client/AsyncClient/Session/analytics; introduce a compatibility path toward driver-bound parameters while preserving callers. Standardize return types, type hints, context lifetime and sync/async API parity. Publish a tested core/analytics/DataFrame optional-dependency matrix rather than treating grammar parsing as runtime support.

Audit advertised Python >=3.8 support against runtime annotations and dependency availability. PyArrow >=18 analytics requires a compatible Python version; this must be explicit. Correct SQLAlchemy 2.1 changes in reserved-field tests without pretending a warning is still an exception.

Design and acceptance tests

Specify migration/deprecation policy, install/import minimal core and each extra in supported Python versions, validate wheel metadata/stubs and run representative sync/async/result APIs. Verify marker-looking strings, named/positional mappings, empty/all-NULL results and dependency-absent diagnostics. Distinguish newly confirmed compatibility bugs from optional API redesign.

Implementation tracking

Design/implementation follow-up remains open. This requirement is not claimed as implemented by the current bug-fix/performance PRs. Related synchronous analytics draft: #30054.

Confirmed dependency-matrix boundary

SQLAlchemy 2.1 declares Requires-Python >=3.11. Python 3.10 must use a compatible earlier series (such as 2.0), rather than an impossible 3.10/2.1 CI cell. The SDK CI PR #30075 now encodes this boundary. Core Python 3.8/3.9 qualification remains an explicit follow-up.

Activity

  1. XuPeng-SH commented on Oct 30, 2026

    @XuPeng-SH
    Contributor

    QA handoff for merged #31774 (main bbfe55669a1440424914d45a283a1d0e36f722fa): please verify the public SDK contract and failure/recovery controls for Unify Python SDK parameter, result and optional-dependency contracts. This isolated QA run inspected the issue and source but did not run functional tests or a live MatrixOne service at this SHA because the existing resource guard left insufficient headroom. Author-reported PR validation is separate evidence, not a result of this QA run.

  2. Ariznawlll commented on Oct 30, 2026

    @Ariznawlll
    Collaborator

    测试补充

    SDK:官方 main d39d8a40343ccd40bf665036388df7a40ee867f8,版本 0.1.16。真实服务使用 #31774 CI 构建,服务端 SHA db8b7b096aa67aa5922d8aef78c78b68baada983,并非该 SDK main SHA 的完整服务端二进制。

    • 覆盖参数、结果、可选依赖和缺依赖提示;Python 3.9 / SQLAlchemy 1.4.54、3.10 / 2.0.43、3.11 / 2.1.6 的 core 合同测试各 106 项通过,真实 sync/async 各 3 轮通过;此前还检查 Python 3.8 core 和 Python 3.12。
    • SQLAlchemy 1.4.24 下,26 个选定变体各重复 3 次为 54 次通过、24 次失败;同样 78 次在 2.1.6 全部通过。真实连接取消及含空格 expanding bind 各 3 轮验证了差异。

    后续跟踪与边界

    按功能收尾处理关闭本 issue;上述仍开放的独立问题及未通过的测试门槛保持原状态,继续按关联 issue 跟踪。

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions