Bump the minimum sqlalchemy-cratedb version to >=0.43.1 and fix a compatibility regression in the PyMongo adapter that surfaces when the new release resolves crate-python 2.2.1 on Python ≥ 3.10.
Why this needed
crate-python changed paramstyle=pyformat, which means SQLAlchemy now compiles insert statements with named placeholders (%(col)s).
The PyMongo adapter's insert_returning_id function in collection.py bypasses SQLAlchemy and calls the raw crate cursor directly, so we should implement new format to new version of cratedb-toolkit.
Tests with new version
https://github.com/crate/cratedb-toolkit/actions/workflows/pymongo.yml?query=event%3Aschedule
Bump the minimum sqlalchemy-cratedb version to
>=0.43.1and fix a compatibility regression in the PyMongo adapter that surfaces when the new release resolvescrate-python 2.2.1onPython ≥ 3.10.Why this needed
crate-python changed
paramstyle=pyformat, which means SQLAlchemy now compiles insert statements with named placeholders(%(col)s).The PyMongo adapter's
insert_returning_idfunction incollection.pybypasses SQLAlchemy and calls the raw crate cursor directly, so we should implement new format to new version of cratedb-toolkit.Tests with new version
https://github.com/crate/cratedb-toolkit/actions/workflows/pymongo.yml?query=event%3Aschedule