Async database support for Python. 🗄
This release improves isolation of connections and transactions across concurrent tasks:
@db.transaction
decorator uses the calling task's connectionThese changes improve the consistency of behavior and fix bugs where connections and transactions were not properly isolated such as: https://github.com/encode/databases/issues/123, https://github.com/encode/databases/issues/125, https://github.com/encode/databases/issues/134, https://github.com/encode/databases/issues/155, https://github.com/encode/databases/issues/424, and https://github.com/encode/databases/issues/452.
In most cases, these changes should not be breaking. However, if using an open transaction across tasks, the active connection (db.connection()
) now needs to be explicitly passed to each task. See the new documentation for an example.
No module named 'asyncmy.connection'
(#553)