Skip to content

Dependencies: Update to sqlalchemy-cratedb 0.43.0, remove monkeypatches - #232

Merged
amotl merged 2 commits into
mainfrom
sqlalchemy-next
Jul 1, 2026
Merged

Dependencies: Update to sqlalchemy-cratedb 0.43.0, remove monkeypatches#232
amotl merged 2 commits into
mainfrom
sqlalchemy-next

Conversation

@amotl

@amotl amotl commented Jun 18, 2026

Copy link
Copy Markdown
Member

About

Remove custom monkeypatches after release of the SQLAlchemy dialect.

References

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Python 3.9 support is dropped: the CI matrix switches to 3.10, pyproject.toml raises requires-python to >=3.10 and removes the 3.9 classifier, and sqlalchemy-cratedb is bumped from 0.41.0 to 0.43.0. CrateDBSQLAlchemyJobStore is refactored to use refresh_after_dml from the library instead of manual event hooks, and patchme() is narrowed to only patch CrateTypeCompiler.visit_BLOB.

Changes

Python 3.9 drop, dependency bump, and CrateDB store simplification

Layer / File(s) Summary
Drop Python 3.9 from CI, packaging, and changelog
pyproject.toml, .github/workflows/main.yml, CHANGES.md
requires-python raised to >=3.10, 3.9 Trove classifier removed, sqlalchemy-cratedb bumped to 0.43.0, CI matrix updated from 3.9 to 3.10, and CHANGES.md records both removals.
CrateDB store: delegate refresh and narrow compiler patches
supertask/store/cratedb.py
__init__ replaces manual after_execute event hooks with refresh_after_dml(self.engine); patchme() is reduced to only overriding CrateTypeCompiler.visit_BLOB, removing FLOAT and create-index patches.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hippity-hop, 3.9 must go,
The rabbit upgrades the Python flow!
refresh_after_dml — no need to patch,
The library now handles the whole match.
Less code to carry, more hops to spare,
A leaner burrow with fresher air! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: updating sqlalchemy-cratedb to 0.43.0 and removing monkeypatches, which directly align with the changeset.
Description check ✅ Passed The description is related to the changeset, explaining the rationale for removing monkeypatches after the SQLAlchemy dialect release and referencing the relevant issue.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sqlalchemy-next

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 zizmor (1.25.2)
.github/workflows/main.yml

INFO zizmor: 🌈 zizmor v1.25.2
fatal: no audit was performed
error: failed to load file://.github/workflows/main.yml as workflow
|
= help: this typically indicates a bug in zizmor; please report it
= help: https://github.com/zizmorcore/zizmor/issues/new?template=bug-report.yml

Caused by:
0: failed to load file://.github/workflows/main.yml as workflow
1: failed to load internal pathing document
2: input is not valid YAML


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.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.68%. Comparing base (40ed9bd) to head (2e55484).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
- Coverage   84.07%   81.68%   -2.39%     
==========================================
  Files           8        8              
  Lines         427      415      -12     
==========================================
- Hits          359      339      -20     
- Misses         68       76       +8     
Flag Coverage Δ
main 81.68% <100.00%> (-2.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amotl
amotl marked this pull request as ready for review June 18, 2026 20:37

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Line 31: Update the Python version requirement comments in the example files
to match the new minimum version specified in pyproject.toml. Locate the
requires-python comment at line 5 in both examples/minimal/hellodb.py and
examples/contrib/cratedb_cleanup.py, and change the version constraint from
">=3.9" to ">=3.10" in each file to align with the pyproject.toml requirement of
requires-python = ">=3.10".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 76caef7e-2165-4d8c-a932-763332dfe01e

📥 Commits

Reviewing files that changed from the base of the PR and between 40ed9bd and 2e55484.

📒 Files selected for processing (4)
  • .github/workflows/main.yml
  • CHANGES.md
  • pyproject.toml
  • supertask/store/cratedb.py

Comment thread pyproject.toml
{ name = "Andreas Motl", email = "andreas.motl@crate.io" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify stale Python runtime hints in examples.
rg -n --iglob 'examples/**/*.py' 'requires-python\s*=\s*">=3\.9"'

Repository: pyveci/supertask

Length of output: 184


Update example file Python version comments to match the new requirement floor of >=3.10.

The example files at examples/minimal/hellodb.py line 5 and examples/contrib/cratedb_cleanup.py line 5 still have # requires-python = ">=3.9" while pyproject.toml line 31 specifies requires-python = ">=3.10". Update these comments to align with the new minimum requirement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 31, Update the Python version requirement comments in
the example files to match the new minimum version specified in pyproject.toml.
Locate the requires-python comment at line 5 in both examples/minimal/hellodb.py
and examples/contrib/cratedb_cleanup.py, and change the version constraint from
">=3.9" to ">=3.10" in each file to align with the pyproject.toml requirement of
requires-python = ">=3.10".

@amotl
amotl merged commit c6ade88 into main Jul 1, 2026
6 checks passed
@amotl
amotl deleted the sqlalchemy-next branch July 1, 2026 10:30
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