Skip to content

fix: wrap raw SQL in text() in test_history.py for SQLAlchemy 2.x - #10

Merged
leochong merged 1 commit into
mainfrom
fix/history-tests-sqlalchemy2-text
Aug 8, 2026
Merged

fix: wrap raw SQL in text() in test_history.py for SQLAlchemy 2.x#10
leochong merged 1 commit into
mainfrom
fix/history-tests-sqlalchemy2-text

Conversation

@leochong

@leochong leochong commented Aug 8, 2026

Copy link
Copy Markdown

Summary

Test plan

  • Verified in an isolated venv against SQLAlchemy 2.0.51 (the actual latest release, matching what CI would resolve): test_history.py — 17/17 passed
  • Same venv: test_command_promote.py + test_command_rollback_tracking.py — 15/15 passed
  • Same venv: full suite (tests/, excluding characterization) — 342 passed, 2 skipped, no other SQLAlchemy 2.x issues found anywhere else in the codebase

🤖 Generated with Claude Code

Three s.execute() calls passed raw strings directly instead of
wrapping them in sqlalchemy.text(). SQLAlchemy 1.4 (installed locally)
only warns about this; SQLAlchemy 2.x — which CI resolves to since
pyproject.toml pins sqlalchemy to "*" — raises ArgumentError and fails
the test. Verified against SQLAlchemy 2.0.51 in an isolated venv:
these 3 tests plus the other 2 new test files (32 tests total) and
the full 342-test suite all pass.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@leochong
leochong force-pushed the fix/history-tests-sqlalchemy2-text branch from 9343cd8 to 27d16b1 Compare August 8, 2026 20:53
@leochong
leochong merged commit 46c2447 into main Aug 8, 2026
14 checks passed
@leochong
leochong deleted the fix/history-tests-sqlalchemy2-text branch August 8, 2026 20:56
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.

1 participant