Skip to content

chore: remove deprecated Compiler.compile() wrapper and unused Param class#17

Merged
dtsong merged 2 commits intomasterfrom
cleanup/remove-deprecated-compile-and-param
Mar 2, 2026
Merged

chore: remove deprecated Compiler.compile() wrapper and unused Param class#17
dtsong merged 2 commits intomasterfrom
cleanup/remove-deprecated-compile-and-param

Conversation

@dtsong
Copy link
Owner

@dtsong dtsong commented Mar 2, 2026

Summary

  • Remove deprecated compile() wrapper method #7: Remove the deprecated Compiler.compile() wrapper method. All callers (tests) now use dialect.compile() directly, matching production code.
  • Dead code: Param class may be unused #10: Remove the unused Param class, its render_param method, the cv_params context variable, and the contextvars import — nothing in the codebase ever instantiates Param.
  • Fix 2 pre-existing ruff UP038 lint violations in ast_classes.py (use X | Y instead of (X, Y) in isinstance).

Closes #7, closes #10

Test plan

  • All 13 test_query.py tests pass (updated to use dialect.compile())
  • All 7 test_mssql.py tests pass
  • test_sql.py tests require live MySQL — pre-existing, unrelated to this change
  • grep -r 'Param' data_diff/ returns no matches
  • ruff + ruff-format pass

🤖 Generated with Claude Code

dtsong and others added 2 commits March 1, 2026 17:07
…class

Remove the deprecated compile() method on Compiler — all callers now
use dialect.compile() directly. Also remove the Param class, its
render method, and the cv_params context variable, as nothing in the
codebase ever instantiates Param.

Closes #7, closes #10

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The params argument was left behind after removing the Param/cv_params
system — it was silently accepted but never used.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dtsong dtsong merged commit f070d2b into master Mar 2, 2026
1 of 6 checks passed
@dtsong dtsong deleted the cleanup/remove-deprecated-compile-and-param branch March 2, 2026 02:22
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.

Dead code: Param class may be unused Remove deprecated compile() wrapper method

1 participant