Fixed compatibility with SQLAlchemy >= 2.0 #250

Merged
blacklight merged 9 commits from 239-sqlalchemy-2-compatibility into master 2023-04-25 10:47:28 +02:00
Owner

Closes: #239

Closes: #239
blacklight added this to the SQLAlchemy 2.x migration milestone 2023-04-24 22:54:05 +02:00
blacklight self-assigned this 2023-04-24 22:54:05 +02:00
blacklight added 1 commit 2023-04-24 22:54:06 +02:00
blacklight added 1 commit 2023-04-24 23:23:04 +02:00
91df18f7b5
Better way to import `declarative_base` from SQLAlchemy.
Import `declarative_base` in a way that is compatible with any
SQLAlchemy version between 1.3 and 2.x.
blacklight added 2 commits 2023-04-24 23:56:21 +02:00
blacklight added 4 commits 2023-04-25 10:42:34 +02:00
e1cd22121a
Removed `connection.begin()` pattern from the `db` plugin.
SQLAlchemy should automatically begin a transaction on
connection/session creation. Plus, `.begin()` messes up things with
SQLAlchemy 2, which has `autobegin` enabled with no easy way of
disabling it.
4cc88fcf5f
Rewritten the `variable` plugin to use SQLAlchemy's ORM.
This removes the need for raw SQL statements and CREATE TABLE statements
that may be engine-specific.
dd60b8924d
Wrap the `PRAGMA` statement in `sqlalchemy.text`.
SQLAlchemy 2 no longer supports raw strings passed to `.execute()`
methods.
blacklight added 1 commit 2023-04-25 10:44:42 +02:00
blacklight changed title from WIP: Fixed compatibility with SQLAlchemy >= 2.0 to Fixed compatibility with SQLAlchemy >= 2.0 2023-04-25 10:47:00 +02:00
blacklight merged commit 99382e4505 into master 2023-04-25 10:47:28 +02:00
Sign in to join this conversation.
No reviewers
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: platypush/platypush#250
No description provided.