All Versions
123
Latest Version
Avg Release Cycle
36 days
Latest Release
-

Changelog History
Page 1

  • v3.14.4 Changes

    🚀 This release contains an important fix for a regression introduced by commit ebe3ad5, which affected the way model instances are converted to parameters for 👉 use in expressions within a query. The bug could manifest when code uses model instances as parameters in expressions against fields that are not foreign-keys.

    The issue is described in #2376.

    View commits

  • v3.14.3 Changes

    🚀 This release contains a single fix for ensuring NULL values are inserted when issuing a bulk-insert of heterogeneous dictionaries which may be missing 🛠 explicit NULL values. Fixes issue #2638.

    View commits

  • v3.14.2 Changes

    🚀 This is a small release mainly to get some fixes out.

    • 👌 Support for named Check and foreign-key constraints.
    • 👍 Better foreign-key introspection for CockroachDB (and Postgres).
    • Register UUID adapter for Postgres.
    • ➕ Add fn.array_agg() to blacklist for automatic value coercion.

    View commits

  • v3.14.1 Changes

    🛠 This release contains primarily bugfixes.

    • Properly delegate to a foreign-key field's db_value() function when converting model instances. #2304.
    • Strip quote marks and parentheses from column names returned by sqlite cursor when a function-call is projected without an alias. #2305.
    • 🛠 Fix DataSet.create_index() method, #2319.
    • 🛠 Fix column-to-model mapping in model-select from subquery with joins, #2320.
    • 👌 Improvements to foreign-key lazy-loading thanks @conqp, #2328.
    • Preserve and handle CHECK() constraints in Sqlite migrator, #2343.
    • ➕ Add stddev aggregate function to collection of sqlite user-defined funcs.

    View commits

  • v3.14.0 Changes

    November 07, 2020

    🚀 This release has been a bit overdue and there are numerous small improvements
    🛠 and bug-fixes. The bugfix that prompted this release is #2293, which is a
    regression in the Django-inspired .filter() APIs that could cause some
    filter expressions to be discarded from the generated SQL. Many thanks for the
    excellent bug report, Jakub.

    • Add an experimental helper, shortcuts.resolve_multimodel_query(), for resolving multiple models used in a compound select query.
    • ➕ Add a lateral() method to select query for use with lateral joins, refs issue #2205.
    • ➕ Added support for nested transactions (savepoints) in cockroach-db (requires 20.1 or newer).
    • Automatically escape wildcards passed to string-matching methods, refs #2224.
    • 👍 Allow index-type to be specified on MySQL, refs #2242.
    • ➕ Added a new API, converter() to be used for specifying a function to use to convert a row-value pulled off the cursor, refs #2248.
    • ➕ Add set() and clear() method to the bitfield flag descriptor, refs #2257.
    • ➕ Add support for range types with IN and other expressions.
    • 👌 Support CTEs bound to compound select queries, refs #2289.

    🐛 Bug-fixes

    • 🛠 Fix to return related object id when accessing via the object-id descriptor, when the related object is not populated, refs #2162.
    • 🛠 Fix to ensure we do not insert a NULL value for a primary key.
    • 🛠 Fix to conditionally set the field/column on an added column in a migration, refs #2171.
    • 🛠 Apply field conversion logic to model-class values. Relocates the logic from issue #2131 and fixes #2185.
    • 👯 Clone node before modifying it to be flat in an enclosed nodelist expr, fixes issue #2200.
    • 🛠 Fix an invalid item assignment in nodelist, refs #2220.
    • 🛠 Fix an incorrect truthiness check used with save() and only=, refs #2269.
    • Fix regression in filter() where using both *args and **kwargs caused the expressions passed as args to be discarded. See #2293.

    View commits

  • v3.13.3 Changes

    April 24, 2020
    • 👍 Allow arbitrary keyword arguments to be passed to DataSet constructor, which are then passed to the instrospector.
    • 👍 Allow scalar subqueries to be compared using numeric operands.
    • 🛠 Fix bulk_create() when model being inserted uses FK identifiers.
    • 🛠 Fix bulk_update() so that PK values are properly coerced to the right data-type (e.g. UUIDs to strings for Sqlite).
    • 👍 Allow array indices to be used as dict keys, e.g. for the purposes of updating a single array index value.

    View commits

  • v3.13.2 Changes

    March 27, 2020
    • 👍 Allow aggregate functions to support an ORDER BY clause, via the addition of an order_by() method to the function (fn) instance. Refs #2094.
    • 🛠 Fix prefetch() bug, where related "backref" instances were marked as dirty, even though they had no changes. Fixes #2091.
    • 👌 Support LIMIT 0. Previously a limit of 0 would be translated into effectively an unlimited query on MySQL. References #2084.
    • 👌 Support indexing into arrays using expressions with Postgres array fields. References #2085.
    • 🛠 Ensure postgres introspection methods return the columns for multi-column indexes in the correct order. Fixes #2104.
    • ➕ Add support for arrays of UUIDs to postgres introspection.
    • 🛠 Fix introspection of columns w/capitalized table names in postgres (#2110).
    • 🛠 Fix to ensure correct exception is raised in SqliteQueueDatabase when iterating over cursor/result-set.
    • 🛠 Fix bug comparing subquery against a scalar value. Fixes #2118.
    • 🛠 Fix issue resolving composite primary-keys that include foreign-keys when building the model-graph. Fixes #2115.
    • 👍 Allow model-classes to be passed as arguments, e.g., to a table function. Refs #2131.
    • Ensure postgres JSONField.concat() accepts expressions as arguments.

    View commits

  • v3.13.1 Changes

    December 06, 2019

    🛠 Fix a regression when specifying keyword arguments to the atomic() or
    transaction() helper methods. Note: this only occurs if you were using Sqlite
    and were explicitly setting the lock_type= parameter.

    View commits

  • v3.13.0 Changes

    December 06, 2019

    👍 CockroachDB support added

    🚀 This will be a notable release as it adds support for
    CockroachDB, a distributed, horizontally-scalable
    SQL database.

    🛠 Other features and fixes

    • 👍 Allow FOR UPDATE clause to specify one or more tables (FOR UPDATE OF...).
    • 👌 Support for Postgres LATERAL join.
    • ⏪ Properly wrap exceptions raised during explicit commit/rollback in the appropriate peewee-specific exception class.
    • 👻 Capture original exception object and expose it as exc.orig on the wrapped exception.
    • 👕 Properly introspect SMALLINT columns in Postgres schema reflection.
    • More flexible handling of passing database-specific arguments to atomic() and transaction() context-manager/decorator.
    • 🛠 Fix non-deterministic join ordering issue when using the filter() API across several tables (#2063).

    View commits

  • v3.12.0 Changes

    November 24, 2019
    • Bulk insert (insert_many() and insert_from()) will now return the row count instead of the last insert ID. If you are using Postgres, peewee will continue to return a cursor that provides an iterator over the newly-inserted primary-key values by default. This behavior is being retained by default for compatibility. Postgres users can simply specify an empty returning() call to disable the cursor and retrieve the rowcount instead.
    • 👍 Migration extension now supports altering a column's data-type, via the new alter_column_type() method.
    • Added Database.is_connection_usabe() method, which attempts to look at the status of the underlying DB-API connection to determine whether the connection is usable.
    • Common table expressions include a materialized parameter, which can be used to control Postgres' optimization fencing around CTEs.
    • ➕ Added BloomFilter.from_buffer() method for populating a bloom-filter from the output of a previous call to the to_buffer() method.
    • 🛠 Fixed APSW extension's commit() and rollback() methods to no-op if the database is in auto-commit mode.
    • ➕ Added generate_always= option to the IdentityField (defaults to False).

    View commits