Skip to content

Releases: coleifer/peewee

3.17.6

06 Jul 17:14
Compare
Choose a tag to compare
  • Fix bug in recursive model.delete_instance() when a table contains foreign-keys at multiple depths of the graph, #2893.
  • Fix regression in pool behavior on systems where time.time() returns identical values for two connections. This adds a no-op comparable sentinel to the heap to prevent any recurrence of this problem, #2901.
  • Ensure that subqueries inside CASE statements generate correct SQL.
  • Fix regression that broke server-side cursors with Postgres (introduced in 3.16.0).
  • Fix to ensure compatibility with psycopg3 - the libpq TransactionStatus constants are no longer available on the Connection instance.
  • Fix quoting issue in pwiz that could generate invalid python code for double-quoted string literals used as column defaults.

View commits

3.17.5

10 May 13:47
Compare
Choose a tag to compare

Fixes package installation issue on 3.12 and newer introduced in the last version.

3.17.4

10 May 13:06
Compare
Choose a tag to compare
  • Fix bug that could occur when using CASE inside a function, and one or more of the CASE clauses consisted of a subquery. Refs #2873. new fix in #2872 for regression in truthiness of cursor.
  • Fix bug in the conversion of TIMESTAMP type in Sqlite on Python 3.12+.
  • Fix for hybrid properties on subclasses when aliased (#2888).
  • Many fixes for SqliteQueueDatabase (#2874, #2876, #2877).

View commits

3.17.3

17 Apr 15:30
Compare
Choose a tag to compare
  • Better fix for #2871 (extraneous queries when coercing query to list), and new fix in #2872 for regression in truthiness of cursor.

View commits

3.17.2

17 Apr 15:30
Compare
Choose a tag to compare
  • Full support for psycopg3.
  • Basic support for Sqlite jsonb.
  • Fix bug where calling list(query) resulted in extra queries, #2871

View commits

3.17.1

05 Feb 15:05
Compare
Choose a tag to compare
  • Add bitwise and other helper methods to BigBitField, #2802.
  • Add add_column_default and drop_column_default migrator methods for specifying a server-side default value, #2803.
  • The new star attribute was causing issues for users who had a field named star on their models. This attribute is now renamed to __star__. #2796.
  • Fix compatibility issues with 3.12 related to utcnow() deprecation.
  • Add stricter locking on connection pool to prevent race conditions.
  • Add adapters and converters to Sqlite to replace ones deprecated in 3.12.
  • Fix bug in model_to_dict() when only aliases are present.
  • Fix version check for Sqlite native drop column support.
  • Do not specify a reconnect= argument to ping() if using MySQL 8.x.

View commits

3.17.0

13 Oct 15:46
Compare
Choose a tag to compare
  • Only roll-back in the outermost @db.transaction decorator/ctx manager if an unhandled exception occurs. Previously, an unhandled exception that occurred in a nested transaction context would trigger a rollback. The use of nested transaction has long been discouraged in the documentation: the recommendation is to always use db.atomic, which will use savepoints to properly handle nested blocks. However, the new behavior should make it easier to reason about transaction boundaries - see #2767 for discussion.
  • Cover transaction BEGIN in the reconnect-mixin. Given that no transaction has been started, reconnecting when beginning a new transaction ensures that a reconnect will occur if it is safe to do so.
  • Add support for setting isolation_level in db.atomic() and db.transaction() when using Postgres and MySQL/MariaDB, which will apply to the wrapped transaction. Note: Sqlite has supported a similar lock_type parameter for some time.
  • Add support for the Sqlite SQLITE_DETERMINISTIC function flag. This allows user-defined Sqlite functions to be used in indexes and may be used by the query planner.
  • Fix unreported bug in dataset import when inferred field name differs from column name.

View commits

3.16.3

14 Aug 14:19
Compare
Choose a tag to compare
  • Support for Cython 3.0.
  • Add flag to ManyToManyField to prevent setting/getting values on unsaved instances. This is worthwhile, since reading or writing a many-to-many has no meaning when the instance is unsaved.
  • Adds a star() helper to Source base-class for selecting all columns.
  • Fix missing binary types for mysql-connector and mariadb-connector.
  • Add extract() method to MySQL JSONField for extracting a jsonpath.

View commits

3.16.2

21 Apr 20:18
Compare
Choose a tag to compare

Fixes a longstanding issue with thread-safety of various decorators, including atomic(), transaction(), savepoint(). The context-managers are unaffected. See #2709 for details.

View commits

3.16.1

18 Apr 17:11
Compare
Choose a tag to compare
  • Add changes required for building against Cython 3.0 and set Cython language-level to 3.
  • Ensure indexes aren't added to unindexed fields during introspection, #2691.
  • Ensure we don't redundantly select same PK in prefetch when using PREFETCH_TYPE.JOIN.
  • In Sqlite migrator, use Sqlite's builtin DROP and RENAME column facilities when possible. This can be overridden by passing legacy=True flag.

View commits