Databases Versions Save

Async database support for Python. 🗄

0.9.0

1 month ago

Changed

  • Drop support for Python 3.7 and add support for Python 3.12 (#583)
  • Add support for SQLAlchemy 2+ (#540)
  • Allow SSL string parameters in PostgresSQL URL (#575) and (#576)

0.8.0

8 months ago

Breaking

This release improves isolation of connections and transactions across concurrent tasks:

  • Database connections are now task-local and are not inherited by child tasks
  • The @db.transaction decorator uses the calling task's connection
  • Each new task uses a new connection unless a connection is explicitly provided

These 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.

Added

  • Allow SQLite query parameters and support cached databases (#561)
  • Support for unix socket for aiomysql and asyncmy (#551)

Changed

  • Improve isolation of connections and transactions during concurrent usage (#546)
  • Bump requests from 2.28.1 to 2.31.0 (#562) zanieb marked this conversation as resolved.
  • Bump starlette from 0.20.4 to 0.27.0 (#560)
  • Bump up asyncmy version to fix No module named 'asyncmy.connection' (#553)
  • Bump wheel from 0.37.1 to 0.38.1 (#524)

Fixed

  • Fix the type-hints using more standard mode (#526)

0.7.0

1 year ago

Fixed

  • Fixed breaking changes in SQLAlchemy cursor; supports >=1.4.42,<1.5 (#513).
  • Wrapped types in typing.Optional where applicable (#510).

0.6.2

1 year ago

0.6.2 (Nov 7th, 2022)

Changes

  • Pinned SQLAlchemy <=1.4.41 to avoid breaking changes (#520).

0.6.1

1 year ago

0.6.1 (Aug 9th, 2022)

Fixed

  • Improve typing for Transaction (#493)
  • Allow string indexing into Record (#501)

0.6.0

1 year ago

0.6.0 (May 30th, 2022)

  • Dropped Python 3.6 support (#458)

Added

  • Add _mapping property to the result set interface (#447 )
  • Add contributing docs (#453 )

Fixed

  • Fix query result named access (#448)
  • Fix connections getting into a bad state when a task is cancelled (#457)
  • Revert #328 parallel transactions (#472)
  • Change extra installations to specific drivers (#436)

0.5.5

2 years ago

0.5.5 (January 20th, 2022)

Fixed

  • Revert the change of Record type to Sequence from Mapping(#408) to maintain backward compatibility

0.5.4

2 years ago

0.5.4 (January 14th, 2022)

Added

  • Support for Unix domain in connections (#423)
  • asyncmy MySQL driver (#382)

Fixed

  • Fix SQLite fetch queries with multiple parameters (#435)
  • Change Record type to Sequence (#408)

0.5.3

2 years ago

0.5.3 (October 10th, 2021)

Added

  • Support dialect+driver for default database drivers like postgresql+asyncpg (#396)

Fixed

  • Documentation of low-level transaction (#390)

0.5.2

2 years ago

0.5.2 (September 10th, 2021)

Fixed

  • Reset counter for failed connections (#385)
  • Avoid dangling task-local connections after Database.disconnect() (#211)