Peewee v2.3.3 Release Notes

  • ๐Ÿ›  This release contains a lot of improvements to the documentation and a mixed bag of other new features and bugfixes.

    Backwards-incompatible changes

    ๐Ÿ“š As of 2.3.3, all peewee Database instances have a default of True for the threadlocals parameter. This means that a connection is opened for each thread. It seemed to me that by sharing connections across threads caused a lot of confusion to users who weren't aware of (or familiar with) the threadlocals parameter. For single-threaded apps the behavior will not be affected, but for multi-threaded applications, if you wish to share your connection across threads you must now specify threadlocals=False. For more information, see the documentation.

    I also renamed the Model.get_id() and Model.set_id() convenience methods so as not to conflict with Flask-Login. These methods should have probably been private anyways, and the new methods are named _get_pk_value() and _set_pk_value().

    ๐Ÿ†• New features

    • โœ… Basic support for Postgresql full-text search.
    • Helper functions for converting models to dictionaries and unpacking dictionaries into model instances. See docs.

    ๐Ÿ› Bugs fixed

    • ๐Ÿ›  Fixed #428, documentation formatting error.
    • ๐Ÿ›  Fixed #429, which fixes the way default values are initialized for bulk inserts.
    • ๐Ÿ›  Fixed #432, making the HStore extension optional when using PostgresqlExtDatabase.
    • ๐Ÿ›  Fixed #435, allowing peewee to be used with Flask-Login.
    • Fixed #436, allowing the SQLite date_part and date_trunc functions to correctly handle NULL values.
    • ๐Ÿ›  Fixed #438, in which the ordering of clauses in a Join expression were causing unpredictable behavior when selecting related instances.
    • โšก๏ธ Updated the berkeley_build.sh script, which was incompatible with the newest version of bsddb3.

    View commits