Peewee v3.14.5 Release Notes

  • ๐Ÿš€ This release contains a number of bug-fixes and small improvements.

    • Only raise DoesNotExist when lazy_load is enabled on ForeignKeyField, fixes issue #2377.
    • Add missing convenience method ModelSelect.get_or_none()
    • ๐Ÿ‘ Allow ForeignKeyField to specify a custom BackrefAccessorClass, references issue #2391.
    • โšก๏ธ Ensure foreign-key-specific conversions are applied on INSERT and UPDATE, fixes #2408.
    • โž• Add handling of MySQL error 4031 (inactivity timeout) to the ReconnectMixin helper class. Fixes #2419.
    • ๐Ÿ‘Œ Support specification of conflict target for ON CONFLICT/DO NOTHING.
    • โž• Add encoding parameter to the DataSet freeze() and thaw() methods, fixes #2425.
    • ๐Ÿ›  Fix bug which prevented DeferredForeignKey from being used as a model's primary key, fixes #2427.
    • Ensure foreign key's related object cache is cleared when the foreign-key is set to None. Fixes #2428.
    • ๐Ÿ‘ Allow specification of (schema, table) to be used with CREATE TABLE AS..., fixes #2423.
    • ๐Ÿ‘ Allow reusing open connections with DataSet, refs #2441.
    • โž• Add highlight() and snippet() helpers to Sqlite SearchField, for use with full-text search extension.
    • ๐Ÿ›  Preserve user-provided aliases in column names. Fixes #2453.
    • โž• Add support for Sqlite 3.37 strict tables.
    • ๐Ÿ“‡ Ensure database is inherited when using ThreadSafeDatabaseMetadata, and also adds an implementation in playhouse.shortcuts along with basic unit tests.
    • ๐Ÿ‘ Better handling of Model's dirty fields when saving, fixes #2466.
    • โž• Add basic support for MariaDB connector driver in playhouse.mysql_ext, refs issue #2471.
    • Begin a basic implementation for a psycopg3-compatible pg database, refs issue #2473.
    • โž• Add provisional support for RETURNING when using the appropriate versions of Sqlite or MariaDB.

    View commits