- Adds preliminary support for
asynciovia a new playhouse extension. See the documentation for details. PostgresqlDatabasecan usepsycopg(psycopg3) if it is installed. If both psycopg2 and psycopg3 are installed, Peewee will prefer psycopg2, but this can be controlled by specifyingprefer_psycopg3=Truein the constructor. Same applies toPostgresqlExtDatabase.Psycopg3Databaseclass has been moved toplayhouse.postgres_extand is now just a thin wrapper aroundPostgresqlExtDatabase.- Postgres JSON operations no longer dump and try to do minimal casts, instead relying on the driver-provided
Json()wrapper(s). - Adds new
ISODateTimeFieldfor Sqlite that encodes datetimes in ISO format (more friendly when db is shared with other tools), and also properly reads back UTC offset info. - Remove
playhouse.sqlite_ext.ClosureTableimplementation. - Add a
Model.dirty_field_namesattribute that is safe for membership testing, since testingx in dirty_fieldsreturns True if one or more field exists due to operator overloads returning a truthy Expression object. Refs #3028. - Removal of Cython
_sqlite_extextension. The C implementations of the FTS rank functions are moved tosqlite_udf. Most of the remaining functionality is moved toplayhouse.cysqlite_extwhich supports it natively.
Migrating CSqliteExtDatabase usage:
You can either use sqlite_ext.SqliteExtDatabase or try the new
cysqlite_ext.CySqliteDatabase if you want all the old functionality and are
willing to try a new driver.