3.7.0
Backwards-incompatible changes
- Pool database
close_all()
method renamed toclose_idle()
to better reflect the actual behavior. - Databases will now raise
InterfaceError
whenconnect()
orclose()
are called on an uninitialized, deferred database object.
New features
- Add methods to the migrations extension to support adding and dropping table constraints.
- Add Model.bulk_create() method for bulk-inserting unsaved model instances.
- Add
close_stale()
method to the connection pool to support closing stale connections. - The
FlaskDB
class inplayhouse.flask_utils
now accepts amodel_class
parameter, which can be used to specify a custom base-class for models.
Bugfixes
- Parentheses were not added to subqueries used in function calls with more than one argument.
- Fixed bug when attempting to serialize many-to-many fields which were created initially with a
DeferredThroughModel
, see #1708. - Fixed bug when using the Postgres
ArrayField
with an array ofBlobField
. - Allow
Proxy
databases to be used as a context-manager. - Fixed bug where the APSW driver was referring to the SQLite version from the standard library
sqlite3
driver, rather than fromapsw
. - Reflection library attempts to wrap server-side column defaults in quotation marks if the column data-type is text/varchar.
- Missing import in migrations library, which would cause errors when attempting to add indexes whose name exceeded 64 chars.
- When using the Postgres connection pool, ensure any open/pending transactions are rolled-back when the connection is recycled.
- Even more changes to the
setup.py
script. In this case I've added a helper function which will reliably determine if the SQLite3 extensions can be built. This follows the approach taken by the Python YAML package.