311devs-peewee

Latest version: v2.10.2.1

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

Scan your dependencies

Page 1 of 8

2.10.0

The main change in this release is the removal of the `AESEncryptedField`,
which was included as part of the `playhouse.fields` extension. It was brought
to my attention that there was some serious potential for security
vulnerabilities. Rather than give users a false sense of security, I've decided
the best course of action is to remove the field.

* Remove the `playhouse.fields.AESEncryptedField` over security concerns
described in ticket 1264.
* Correctly resolve explicit table dependencies when creating tables, refs
1076. Thanks maaaks.
* Implement not equals comparison for `CompositeKey`.

[View commits](https://github.com/coleifer/peewee/compare/2.9.2...2.10.0)

2.9.2

* Fixed significant bug in the `savepoint` commit/rollback implementation. Many
thanks to Syeberman for raising the issue. See 1225 for details.
* Added support for postgresql `INTERVAL` columns. The new `IntervalField` in
the `postgres_ext` module is suitable for storing `datetime.timedelta`.
* Fixed bug where missing `sqlite3` library was causing other, unrelated
libraries to throw errors when attempting to import.
* Added a `case_sensitive` parameter to the SQLite `REGEXP` function
implementation. The default is `False`, to preserve backwards-compatibility.
* Fixed bug that caused tables not to be created when using the `dataset`
extension. See 1213 for details.
* Modified `drop_table` to raise an exception if the user attempts to drop
tables with `CASCADE` when the database backend does not support it.
* Fixed Python3 issue in the `AESEncryptedField`.
* Modified the behavior of string-typed fields to treat the addition operator
as concatenation. See 1241 for details.

[View commits](https://github.com/coleifer/peewee/compare/2.9.1...2.9.2)

2.9.1

* Fixed 1218, where the use of `playhouse.flask_utils` was requiring the
`sqlite3` module to be installed.
* Fixed 1219 regarding the SQL generation for composite key sub-selects,
joins, etc.

[View commits](https://github.com/coleifer/peewee/compare/2.9.0...2.9.1)

2.9.0

In this release there are two notable changes:

* The ``Model.create_or_get()`` method was removed. See the [documentation](http://docs.peewee-orm.com/en/latest/peewee/querying.htmlcreate-or-get)
for an example of the code one would write to replicate this functionality.
* The SQLite closure table extension gained support for many-to-many
relationships thanks to a nice PR by necoro. [Docs](http://docs.peewee-orm.com/en/latest/peewee/playhouse.htmlClosureTable).

[View commits](https://github.com/coleifer/peewee/compare/2.8.8...2.9.0)

2.8.8

This release contains a single important bugfix for a regression in specifying
the type of lock to use when opening a SQLite transaction.

[View commits](https://github.com/coleifer/peewee/compare/2.8.7...2.8.8)

2.8.7

This release contains numerous cleanups.

Bugs fixed

* 1087 - Fixed a misuse of the iteration protocol in the `sqliteq` extension.
* Ensure that driver exceptions are wrapped when calling `commit` and
`rollback`.
* 1096 - Fix representation of recursive foreign key relations when using the
`model_to_dict` helper.
* 1126 - Allow `pskel` to be installed into `bin` directory.
* 1105 - Added a `Tuple()` type to Peewee to enable expressing arbitrary
tuple expressions in SQL.
* 1133 - Fixed bug in the conversion of objects to `Decimal` instances in the
`DecimalField`.
* Fixed an issue renaming a unique foreign key in MySQL.
* Remove the join predicate from CROSS JOINs.
* 1148 - Ensure indexes are created when a column is added using a schema
migration.
* 1165 - Fix bug where the primary key was being overwritten in queries using
the closure-table extension.

New stuff

* Added properties to the `SqliteExtDatabase` to expose common `PRAGMA`
settings. For example, to set the cache size to 4MB, `db.cache_size = 1000`.
* Clarified documentation on calling `commit()` or `rollback()` from within the
scope of an atomic block. [See docs](http://docs.peewee-orm.com/en/latest/peewee/transactions.htmltransactions).
* Allow table creation dependencies to be specified using new `depends_on` meta
option. Refs 1076.
* Allow specification of the lock type used in SQLite transactions. Previously
this behavior was only present in `playhouse.sqlite_ext.SqliteExtDatabase`,
but it now exists in `peewee.SqliteDatabase`.
* Added support for `CROSS JOIN` expressions in select queries.
* Docs on how to implement [optimistic locking](http://docs.peewee-orm.com/en/latest/peewee/hacks.htmloptimistic-locking).
* Documented optional dependencies.
* Generic support for specifying select queries as locking the selected rows
`FOR X`, e.g. `FOR UPDATE` or `FOR SHARE`.
* Support for specifying the frame-of-reference in window queries, e.g.
specifying `UNBOUNDED PRECEDING`, etc. [See docs](http://docs.peewee-orm.com/en/latest/peewee/api.htmlWindow).

Backwards-incompatible changes

* As of 9e76c99, an `OperationalError` is raised if the user calls `connect()`
on an already-open Database object. Previously, the existing connection would
remain open and a new connection would overwrite it, making it impossible to
close the previous connection. If you find this is causing breakage in your
application, you can switch the `connect()` call to `get_conn()` which will
only open a connection if necessary. The error **is** indicative of a real
issue, though, so audit your code for places where you may be opening a
connection without closing it (module-scope operations, e.g.).

[View commits](https://github.com/coleifer/peewee/compare/2.8.5...2.8.7)

Page 1 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.