311devs-peewee

Latest version: v2.10.2.1

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

Scan your dependencies

Page 4 of 8

2.6.4

Updating so some of the new APIs are available on pypi.

Bugs fixed

* 646, fixed a bug with the Cython speedups not being included in package.
* 654, documented how to create models with no primary key.
* 659, allow bare `INSERT` statements.
* 674, regarding foreign key / one-to-one relationships.
* 676, allow `ArrayField` to accept tuples in addition to lists.
* 679, fix regarding unsaved relations.
* 682, refactored QueryResultWrapper to allow multiple independent iterations over the same underlying result cache.
* 692, fix bug with multiple joins to same table + eager loading.
* 695, fix bug when connection fails while using an execution context.
* 698, use correct column names with non-standard django foreign keys.
* 706, return `datetime.time` instead of `timedelta` for MySQL time fields.
* 712, fixed SQLite migrator regular expressions. Thanks sroebert.

New features

* 647, 649, 650, added support for `RETURNING` clauses. Update, Insert and Delete queries can now be called with `RETURNING` to retrieve the rows that were affected. [See docs](http://docs.peewee-orm.com/en/latest/peewee/querying.htmlreturning-clause).
* 685, added web request hook docs.
* 691, allowed arbitrary model attributes and methods to be serialized by `model_to_dict()`. [Docs](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlmodel_to_dict).
* 696, allow `model_to_dict()` to introspect query for which fields to serialize.
* Added backend-agnostic [truncate_date()](http://docs.peewee-orm.com/en/latest/peewee/api.htmlDatabase.truncate_date) implementation.
* Added a `FixedCharField` which uses column type `CHAR`.
* Added support for arbitrary `PRAGMA` statements to be run on new SQLite connections. [Docs](http://docs.peewee-orm.com/en/latest/peewee/databases.htmlsqlite-pragma).
* Removed `berkeley_build.sh` script. See instructions [on my blog instead](http://charlesleifer.com/blog/building-the-python-sqlite-driver-for-use-with-berkeleydb/).

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

2.6.2

Just a regular old release.

Bugs fixed

* 641, fixed bug with exception wrapping and Python 2.6
* 634, fixed bug where correct query result wrapper was not being used for certain composite queries.
* 625, cleaned up some example code.
* 614, fixed bug with `aggregate_rows()` when there are multiple joins to the same table.

New features

* Added [create_or_get()](http://docs.peewee-orm.com/en/latest/peewee/querying.htmlcreate-or-get) as a companion to `get_or_create()`.
* Added support for `ON CONFLICT` clauses for `UPDATE` and `INSERT` queries. [Docs](http://docs.peewee-orm.com/en/latest/peewee/api.htmlUpdateQuery.on_conflict).
* Added a [JSONKeyStore](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlJSONKeyStore) to `playhouse.kv`.
* Added Cythonized version of `strip_parens()`, with plans to perhaps move more performance-critical code to Cython in the future.
* Added docs on specifying [vendor-specific database parameters](http://docs.peewee-orm.com/en/latest/peewee/database.htmlvendor-specific-parameters).
* Added docs on specifying [field default values](http://docs.peewee-orm.com/en/latest/peewee/models.htmldefault-field-values) (both client and server-side).
* Added docs on [foreign key field back-references](http://docs.peewee-orm.com/en/latest/peewee/models.htmlforeignkeyfield).
* Added docs for [models without a primary key](http://docs.peewee-orm.com/en/latest/peewee/models.htmlmodels-without-a-primary-key).
* Cleaned up docs on `prefetch()` and `aggregate_rows()`.

[View commits](https://github.com/coleifer/peewee/compare/2.6.1...2.6.2)

2.6.1

This release contains a number of small fixes and enhancements.

Bugs fixed

* 606, support self-referential joins with `prefetch` and `aggregate_rows()` methods.
* 588, accomodate changes in SQLite's `PRAGMA index_list()` return value.
* 607, fixed bug where `pwiz` was not passing table names to introspector.
* 591, fixed bug with handling of named cursors in older psycopg2 version.
* Removed some cruft from the `APSWDatabase` implementation.

New features

* Added [CompressedField](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlCompressedField) and [AESEncryptedField](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlAESEncryptedField)
* 609, 610, added Django-style foreign key ID lookup. [Docs](http://docs.peewee-orm.com/en/latest/peewee/models.htmlforeignkeyfield).
* Added support for [Hybrid Attributes](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlhybrid-attributes) (cool idea courtesy of SQLAlchemy).
* Added ``upsert`` keyword argument to the `Model.save()` function (SQLite only).
* 587, added support for ``ON CONFLICT`` SQLite clause for `INSERT` and `UPDATE` queries. [Docs](http://docs.peewee-orm.com/en/latest/peewee/api.htmlUpdateQuery.on_conflict)
* 601, added hook for programmatically defining table names. [Model options docs](http://docs.peewee-orm.com/en/latest/peewee/models.htmlmodel-options-and-table-metadata)
* 581, 611, support connection pools with `playhouse.db_url.connect()`. [Docs](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlconnect).
* Added [Contributing section](http://docs.peewee-orm.com/en/latest/peewee/contributing.html) section to docs.

[View commits](https://github.com/coleifer/peewee/compare/2.6.0...2.6.1)

2.6.0

This is a tiny update, mainly consisting of a new-and-improved implementation of ``get_or_create()`` ([docs](http://docs.peewee-orm.com/en/latest/peewee/api.htmlModel.get_or_create)).

Backwards-incompatible changes

* ``get_or_create()`` now returns a 2-tuple consisting of the model instance and a boolean indicating whether the instance was created. The function now behaves just like the Django equivalent.

New features

* 574, better support for setting the character encoding on Postgresql database connections. Thanks klen!
* Improved implementation of [get_or_create()](http://docs.peewee-orm.com/en/latest/peewee/api.htmlModel.get_or_create).

[View commits](https://github.com/coleifer/peewee/compare/2.5.1...2.6.0)

2.5.1

This is a relatively small release with a few important bugfixes.

Bugs fixed

* 566, fixed a bug regarding parentheses around compound `SELECT` queries (i.e. `UNION`, `INTERSECT`, etc).
* Fixed unreported bug where table aliases were not generated correctly for compound `SELECT` queries.
* 559, add option to preserve original column order with `pwiz`. Thanks elgow!
* Fixed unreported bug where selecting all columns from a `ModelAlias` does not use the appropriate `FieldAlias` objects.

New features

* 561, added an option for bulk insert queries to return the list of auto-generated primary keys. See [docs for InsertQuery.return_id_list](http://docs.peewee-orm.com/en/latest/peewee/api.htmlInsertQuery.return_id_list).
* 569, added `parse` function to the `playhouse.db_url` module. Thanks stt!
* Added [hacks](http://docs.peewee-orm.com/en/latest/peewee/hacks.html) section to the docs. Please contribute your hacks!

Backwards-incompatible changes

* Calls to `Node.in_()` and `Node.not_in()` do not take `*args` anymore and instead take a single argument.

[View commits](https://github.com/coleifer/peewee/compare/2.5.0...2.5.1)

2.5.0

There are a couple new features so I thought I'd bump to 2.5.x. One change Postgres users may be happy to see is the use of `INSERT ... RETURNING` to perform inserts. This should definitely speed up inserts for Postgres, since an extra query is no longer needed to get the new auto-generated primary key.

I also added a [new context manager/decorator](http://docs.peewee-orm.com/en/latest/peewee/database.htmlusing-multiple-databases) that allows you to use a different database for the duration of the wrapped block.

Bugs fixed

* 534, CSV utils was erroneously stripping the primary key from CSV data.
* 537, fix upserts when using `insert_many`.
* 541, respect `autorollback` with `PostgresqlExtDatabase`. Thanks davidmcclure.
* 551, fix for QueryResultWrapper's implementation of the iterator protocol.
* 554, allow SQLite journal_mode to be set at run-time.
* Fixed case-sensitivity issue with `DataSet`.

New features

* Added support for [CAST expressions](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlcast).
* Added a hook for [extending Node](http://docs.peewee-orm.com/en/latest/peewee/api.htmlNode.extend) with custom methods.
* `JOIN_<type>` became `JOIN.<type>`, e.g. `.join(JOIN.LEFT_OUTER)`.
* `OP_<code>` became `OP.<code>`.
* 556, allowed using `+` and `-` prefixes to indicate ascending/descending ordering.
* 550, added [Database.initialize_connection()](http://docs.peewee-orm.com/en/latest/peewee/database.htmladditional-connection-initialization) hook.
* 549, bind selected columns to a particular model. Thanks jhorman, nice PR!
* 531, support for swapping databases at run-time via [Using](http://docs.peewee-orm.com/en/latest/peewee/database.htmlusing-multiple-databases).
* 530, support for SQLCipher and Python3.
* New `RowIDField` for `sqlite_ext` playhouse module. This field can be used to interact with SQLite `rowid` fields.
* Added `LateralJoin` helper to the `postgres_ext` playhouse module.
* New [example blog app](https://github.com/coleifer/peewee/tree/master/examples/blog).

[View commits](https://github.com/coleifer/peewee/compare/2.4.7...2.5.0)

Page 4 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.