databases

Async database support for Python. 🗄

BSD-3-CLAUSE License

Downloads
1.4M
Stars
3.7K
Committers
59

Bot releases are hidden (Show)

databases - Version 0.9.0 Latest Release

Published by zanieb 8 months 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)
databases - Version 0.8.0

Published by zanieb about 1 year 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)
databases - Version 0.7.0

Published by Kludex almost 2 years ago

Fixed

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

Published by aminalaee almost 2 years ago

0.6.2 (Nov 7th, 2022)

Changes

  • Pinned SQLAlchemy <=1.4.41 to avoid breaking changes (#520).
databases - Version 0.6.1

Published by aminalaee about 2 years ago

0.6.1 (Aug 9th, 2022)

Fixed

  • Improve typing for Transaction (#493)
  • Allow string indexing into Record (#501)
databases - Version 0.6.0

Published by aminalaee over 2 years 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)
databases - Version 0.5.5

Published by collerek over 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
databases - Version 0.5.4

Published by aminalaee almost 3 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)
databases - Version 0.5.3

Published by aminalaee about 3 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)
databases - Version 0.5.2

Published by aminalaee about 3 years ago

0.5.2 (September 10th, 2021)

Fixed

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

Published by aminalaee about 3 years ago

0.5.1 (September 2nd, 2021)

Added

  • Make database connect and disconnect calls idempotent (#379)

Fixed

  • Fix in_ and notin_ queries in SQLAlchemy 1.4 (#378)
databases - Version 0.5.0

Published by aminalaee about 3 years ago

0.5.0 (August 26th, 2021)

Added

  • Support SQLAlchemy 1.4 (#299)

Fixed

  • Fix concurrent transactions (#328)
databases - Version 0.4.3

Published by tomchristie over 3 years ago

0.4.3 (March 26th, 2021)

Fixed

  • Pin SQLAlchemy to <1.4.* (#314)
databases - 0.4.2

Published by rafalp over 3 years ago

Changelog:

  • Fix memory leak with asyncpg for SQLAlchemy generic functions (#273)
databases - 0.4.1

Published by vmarkovtsev almost 4 years ago

Changelog:

databases - 0.4.0

Published by vmarkovtsev almost 4 years ago

Changelog:

  • Use backend native fetch_val() implementation when available (#132)
  • Replace psycopg2-binary with psycopg2 (#204)
  • Speed up PostgresConnection fetch() and iterate() (#193)
  • Access asyncpg Record field by key on raw query (#207)
  • Fix type hinting for sqlite backend (#227)
  • Allow setting min_size and max_size in postgres DSN (#210)
  • Add option pool_recycle in postgres DSN (#233)
  • Fix SQLAlchemy DDL statements (#226)
  • Make fetch_val call fetch_one for type conversion (#246)
  • Allow extra transaction options (#242)
  • Unquote username and password in DatabaseURL (#248)
databases - Version 0.3.2

Published by tomchristie over 4 years ago

  • Build queries before acquiring the lock. #199
  • Return correct values from PostgreSQL record when columns have identical name. #173
databases -

Published by gvbgduh over 4 years ago