Skip to content

v1.5.0 — SQLAlchemy 2.1/2.2 forward-compat shims, async stability

Choose a tag to compare

@yeongseon yeongseon released this 23 May 14:24
· 276 commits to main since this release

Highlights

Added

  • SQLAlchemy 2.1 / forward-compat shims for SA 2.2 (#206) — dependency upper bound bumped to <2.3 (now sqlalchemy>=2.0,<2.3), enabling installation on SA 2.1 and future 2.2 releases.
    • New CubridCompiler.update_post_criteria_clause override routes the existing cubrid_limit LIMIT rendering through the SA 2.1 hook that replaced update_limit_clause.
    • _render_json_extract_from_binary now recognises Float as a numeric affinity since SA 2.1 split it out of Numeric, restoring CAST(... AS DOUBLE) emission for JSON[...].as_float().
    • AsyncAdapt_pycubrid_connection.await_ is redeclared as a class-level staticmethod because SA 2.1 dropped the inherited attribute on AsyncAdapt_dbapi_connection.
    • Cross-version offline test suite (639 tests) green on both SA 2.0.49 and SA 2.1.0b2.
  • `sqlalchemy-22-canary` CI job promoted to gating (#206) — previously `continue-on-error: true` against a non-existent `sqlalchemy>=2.2.0b1`. Now installs `--pre "sqlalchemy>=2.1.0b1,<2.3"` so the job actually exercises the latest available SA pre-release and fails the build on regressions.

Fixed

  • Async integration stability for issue #208 — `test/test_aio_integration.py` now seeds per-test data instead of relying on module-shared CRUD state, adds live `pool_pre_ping=True` recovery coverage after an internal async transport drop, and verifies async SQLAlchemy INSERT returns `lastrowid`.
  • bandit B110 cleared in `trace.py` — replaced `try/except/pass` cleanup with `_logger.debug("...", exc_info=exc)` so cleanup failures are observable without masking the original exception (#212).

Validated

  • Native pycubrid ping causally validated — Tier 2 ORM benchmark in cubrid-benchmark `2026-04-22_native-ping-hotpath` (paired same-version A/B, 7 trials, bootstrap 95% CI) confirms the `do_ping()` native CHECK_CAS path delivers a practical pre-ping hot-path win: SQLAlchemy Core `checkout_select_by_pk` +108.2% throughput, ORM `session_select_by_pk` +42.1%, with p50/p95 latency also reduced.

Compatibility

Backward-compatible with 1.4.x. No public API removals or signature changes. Same driver options (`cubrid://`, `cubrid+pycubrid://`, `cubrid+aiopycubrid://`). Pairs with pycubrid 1.5.0 released alongside.

Install

```bash
pip install --upgrade sqlalchemy-cubrid

or with the pure Python driver:

pip install --upgrade "sqlalchemy-cubrid[pycubrid]"
```

Full changelog

https://github.com/cubrid-lab/sqlalchemy-cubrid/blob/v1.5.0/CHANGELOG.md