github coleifer/peewee 2.8.7

latest releases: 3.14.10, 3.14.9, 3.14.8...
7 years ago

This release contains numerous cleanups.

Bugs fixed

  • #1087 - Fixed a misuse of the iteration protocol in the sqliteq extension.
  • Ensure that driver exceptions are wrapped when calling commit and
    rollback.
  • #1096 - Fix representation of recursive foreign key relations when using the
    model_to_dict helper.
  • #1126 - Allow pskel to be installed into bin directory.
  • #1105 - Added a Tuple() type to Peewee to enable expressing arbitrary
    tuple expressions in SQL.
  • #1133 - Fixed bug in the conversion of objects to Decimal instances in the
    DecimalField.
  • Fixed an issue renaming a unique foreign key in MySQL.
  • Remove the join predicate from CROSS JOINs.
  • #1148 - Ensure indexes are created when a column is added using a schema
    migration.
  • #1165 - Fix bug where the primary key was being overwritten in queries using
    the closure-table extension.

New stuff

  • Added properties to the SqliteExtDatabase to expose common PRAGMA
    settings. For example, to set the cache size to 4MB, db.cache_size = 1000.
  • Clarified documentation on calling commit() or rollback() from within the
    scope of an atomic block. See docs.
  • Allow table creation dependencies to be specified using new depends_on meta
    option. Refs #1076.
  • Allow specification of the lock type used in SQLite transactions. Previously
    this behavior was only present in playhouse.sqlite_ext.SqliteExtDatabase,
    but it now exists in peewee.SqliteDatabase.
  • Added support for CROSS JOIN expressions in select queries.
  • Docs on how to implement optimistic locking.
  • Documented optional dependencies.
  • Generic support for specifying select queries as locking the selected rows
    FOR X, e.g. FOR UPDATE or FOR SHARE.
  • Support for specifying the frame-of-reference in window queries, e.g.
    specifying UNBOUNDED PRECEDING, etc. See docs.

Backwards-incompatible changes

  • As of 9e76c99, an OperationalError is raised if the user calls connect()
    on an already-open Database object. Previously, the existing connection would
    remain open and a new connection would overwrite it, making it impossible to
    close the previous connection. If you find this is causing breakage in your
    application, you can switch the connect() call to get_conn() which will
    only open a connection if necessary. The error is indicative of a real
    issue, though, so audit your code for places where you may be opening a
    connection without closing it (module-scope operations, e.g.).

View commits

Don't miss a new peewee release

NewReleases is sending notifications on new releases.