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 ofTrue
for thethreadlocals
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) thethreadlocals
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 specifythreadlocals=False
. For more information, see the documentation.I also renamed the
Model.get_id()
andModel.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 ofbsddb3
.