Skip to content

Merge SA 2.1 compat into core20.py, supporting both SA 2.0 and 2.1#254

Draft
kneth wants to merge 1 commit intokneth/sqlalchemy-21-compatibilityfrom
kneth/sqlalchemy-21-compatibility-consolidated
Draft

Merge SA 2.1 compat into core20.py, supporting both SA 2.0 and 2.1#254
kneth wants to merge 1 commit intokneth/sqlalchemy-21-compatibilityfrom
kneth/sqlalchemy-21-compatibility-consolidated

Conversation

@kneth
Copy link
Copy Markdown
Member

@kneth kneth commented Mar 20, 2026

Summary of the changes / Why this is an improvement

A commit in response to #253 (comment)

Checklist

  • Link to issue this PR refers to (if applicable): Fixes #???

Consolidate `core21.py` into `core20.py` by guarding the three
SA 2.1-specific differences behind `SA_VERSION >= SA_2_1` checks:
- `visiting_cte` parameter and `toplevel` logic in `visit_update`
- `update_post_criteria_clause` (renamed from `update_limit_clause`)
- removal of the `_ordered_values` branch in `_get_crud_params`

Delete `core21.py` and simplify the dialect dispatch to always use
`CrateCompilerSA20` for SA >= 2.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 62d891ee-b722-4f62-b814-ff8eba9cb124

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch kneth/sqlalchemy-21-compatibility-consolidated
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

@kneth kneth mentioned this pull request Mar 20, 2026
1 task
@amotl amotl requested review from amotl, matriv and seut March 30, 2026 20:52
Copy link
Copy Markdown
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Kenneth. @mfussenegger agreed on this at #253 (comment). Can you integrate it into the other PR if you are also convinced this is the right solution?

Please let us know about any concerns. If @matriv has a minute, he might also have a look. Otherwise, please proceed. 🙏

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