Skip to content

3.7.0

Compare
Choose a tag to compare
@coleifer coleifer released this 06 Sep 19:50
· 916 commits to master since this release

Backwards-incompatible changes

  • Pool database close_all() method renamed to close_idle() to better reflect the actual behavior.
  • Databases will now raise InterfaceError when connect() or close() are called on an uninitialized, deferred database object.

New features

  • Add methods to the migrations extension to support adding and dropping table constraints.
  • Add Model.bulk_create() method for bulk-inserting unsaved model instances.
  • Add close_stale() method to the connection pool to support closing stale connections.
  • The FlaskDB class in playhouse.flask_utils now accepts a model_class parameter, which can be used to specify a custom base-class for models.

Bugfixes

  • Parentheses were not added to subqueries used in function calls with more than one argument.
  • Fixed bug when attempting to serialize many-to-many fields which were created initially with a DeferredThroughModel, see #1708.
  • Fixed bug when using the Postgres ArrayField with an array of BlobField.
  • Allow Proxy databases to be used as a context-manager.
  • Fixed bug where the APSW driver was referring to the SQLite version from the standard library sqlite3 driver, rather than from apsw.
  • Reflection library attempts to wrap server-side column defaults in quotation marks if the column data-type is text/varchar.
  • Missing import in migrations library, which would cause errors when attempting to add indexes whose name exceeded 64 chars.
  • When using the Postgres connection pool, ensure any open/pending transactions are rolled-back when the connection is recycled.
  • Even more changes to the setup.py script. In this case I've added a helper function which will reliably determine if the SQLite3 extensions can be built. This follows the approach taken by the Python YAML package.

View commits