311devs-peewee

Latest version: v2.10.2.1

Safety actively analyzes 630254 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

2.8.0

This release includes a couple new field types and greatly improved C extension support for both speedups and SQLite enhancements. Also includes some work, suggested by foxx, to remove some places where `Proxy` was used in favor of more obvious APIs.

New features

* [travis-ci builds](http://travis-ci.org/coleifer/peewee/builds/) now include MySQL and Python 3.5. Dropped support for Python 3.2 and 3.3. Builds also will run the C-extension code.
* C extension speedups now enabled by default, includes faster implementations for `dict` and `tuple` `QueryResultWrapper` classes, faster date formatting, and a faster field and model sorting.
* C implementations of SQLite functions is now enabled by default. SQLite extension is now compatible with APSW and can be used in standalone form directly from Python. See [SqliteExtDatabase](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlSqliteExtDatabase) for more details.
* SQLite C extension now supports `murmurhash2`.
* `UUIDField` is now supported for SQLite and MySQL, using `text` and `varchar` respectively, thanks foxx!
* Added `BinaryField`, thanks again, foxx!
* Added `PickledField` to `playhouse.fields`.
* `ManyToManyField` now accepts a list of primary keys when adding or removing values from the through relationship.
* Added support for SQLite [table-valued functions](http://sqlite.org/vtab.htmltabfunc2) using the [sqlite-vtfunc library](https://github.com/coleifer/sqlite-vtfunc).
* Significantly simplified the build process for compiling the C extensions.

Backwards-incompatible changes

* Instead of using a `Proxy` for defining circular foreign key relationships, you now need to use [DeferredRelation](http://docs.peewee-orm.com/en/latest/peewee/api.htmlDeferredRelation).
* Instead of using a `Proxy` for defining many-to-many through tables, you now need to use [DeferredThroughModel](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlDeferredThroughModel).
* SQLite Virtual Models must now use `Meta.extension_module` and `Meta.extension_options` to declare extension and any options. For more details, see [VirtualModel](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlVirtualModel).
* MySQL database will now issue `COMMIT` statements for `SELECT` queries. This was not necessary, but added due to an influx of confused users creating GitHub tickets. Hint: learn to user your damn database, it's not magic!

Bugs fixed

Some of these may have been included in a previous release, but since I did not list them I'm listing them here.

* 766, fixed bug with PasswordField and Python3. Fuck Python 3.
* 768, fixed SortedFieldList and `remove_field()`. Thanks klen!
* 771, clarified docs for APSW.
* 773, added docs for request hooks in Pyramid (who uses Pyramid, by the way?).
* 774, prefetch() only loads first ForeignKeyField for a given relation.
* 782, fixed typo in docs.
* 791, foreign keys were not correctly handling coercing to the appropriate python value.
* 792, cleaned up some CSV utils code.
* 798, cleaned up iteration protocol in QueryResultWrappers.
* 806, not really a bug, but MySQL users were clowning around and needed help.

[View commits](https://github.com/coleifer/peewee/compare/2.7.4...2.8.0)

2.7.4

This is another small release which adds code to automatically build the SQLite C extension if `libsqlite` is available. The release also includes:

* Support for `UUIDField` with SQLite.
* Support for registering additional database classes with the `db_url` module via `register_database`.
* `prefetch()` supports fetching multiple foreign-keys to the same model class.
* Added method to validate FTS5 search queries.

[View commits](https://github.com/coleifer/peewee/compare/2.7.3...2.7.4)

2.7.3

Small release which includes some changes to the BM25 sorting algorithm and the addition of a [`JSONField`](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlJSONField) for use with the new [JSON1 extension](http://sqlite.org/json1.html).

2.7.2

People were having trouble building the sqlite extension. I figure enough people are having trouble that I made it a separate command: `python setup.py build_sqlite_ext`.

2.7.1

Jacked up the setup.py

2.7.0

New APIs, features, and performance improvements.

Notable changes and new features

* [`PasswordField`](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlPasswordField) that uses the `bcrypt` module.
* Added new Model [`Meta.only_save_dirty`](http://docs.peewee-orm.com/en/latest/peewee/models.htmlmodel-options-and-table-metadata) flag to, by default, only save fields that have been modified.
* Added support for [`upsert()`](http://docs.peewee-orm.com/en/latest/peewee/api.htmlInsertQuery.upsert) on MySQL (in addition to SQLite).
* Implemented SQLite ranking functions (``rank`` and ``bm25``) in Cython, and changed both the Cython and Python APIs to accept weight values for every column in the search index. This more closely aligns with the APIs provided by FTS5. In fact, made the APIs for FTS4 and FTS5 result ranking compatible.
* Major changes to the :ref:`sqlite_ext` module. Function callbacks implemented in Python were implemented in Cython (e.g. date manipulation and regex processing) and will be used if Cython is available when Peewee is installed.
* Support for the experimental new [FTS5](http://sqlite.org/fts5.html) SQLite search extension.
* Added :py:class:`SearchField` for use with the SQLite FTS extensions.
* Added :py:class:`RowIDField` for working with the special ``rowid`` column in SQLite.
* Added a model class validation hook to allow model subclasses to perform any validation after class construction. This is currently used to ensure that ``FTS5Model`` subclasses do not violate any rules required by the FTS5 virtual table.

Bugs fixed

* **751**, fixed some very broken behavior in the MySQL migrator code. Added more tests.
* **718**, added a `RetryOperationalError` mixin that will try automatically reconnecting after a failed query. There was a bug in the previous error handler implementation that made this impossible, which is also fixed.

Small bugs

* 713, fix column name regular expression in SQLite migrator.
* 724, fixed `NULL` handling with the Postgresql `JSONField`.
* 725, added `__module__` attribute to `DoesNotExist` classes.
* 727, removed the `commit_select` logic for MySQL databases.
* 730, added documentation for `Meta.order_by` API.
* 745, added `cast()` method for casting JSON field values.
* 748, added docs and method override to indicate that SQLite does not support adding foreign key constraints after table creation.
* Check whether pysqlite or libsqlite were compiled with BerkeleyDB support when using the :py:class:`BerkeleyDatabase`.
* Clean up the options passed to SQLite virtual tables on creation.

Small features

* 700, use sensible default if field's declared data-type is not present in the field type map.
* 707, allow model to be specified explicitly in `prefetch()`.
* 734, automatic testing against python 3.5.
* 753, added support for `upsert()` ith MySQL via the `REPLACE INTO ...` statement.
* 757, `pwiz`, the schema intropsection tool, will now generate multi-column index declarations.
* 756, `pwiz` will capture passwords using the `getpass()` function rather than via the command-line.
* Removed `Database.sql_error_handler()`, replaced with the `RetryOperationalError` mixin class.
* Documentation for `Meta.order_by` and `Meta.primary_key`.
* Better documentation around column and table constraints.
* Improved performance for some methods that are called frequently.
* Added `coerce` parameter to `BareField` and added documentation.

[View commits](https://github.com/coleifer/peewee/compare/2.6.4...2.7.0)

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.