Subject: CVS commit: pkgsrc/databases/py-peewee
From: Adam Ciarcinski
Date: 2022-06-17 19:35:22
Message id: 20220617173522.77228FB1A@cvs.NetBSD.org

Log Message:
py-peewee: updated to 3.15.0

3.15.0

Rollback behavior change in commit ab43376697. Peewee will no longer \ 
automatically return the cursor rowcount for certain bulk-inserts. This should \ 
only affect users of MySQL and Sqlite who relied on a bulk INSERT returning the \ 
rowcount (as opposed to the cursor's lastrowid). The rowcount behavior is still \ 
available chaining the as_rowcount() method:

# NOTE: this change only affects MySQL or Sqlite.
db = MySQLDatabase(...)

# Previously, bulk inserts of the following forms would return the rowcount.
query = User.insert_many(...)  # Bulk insert.
query = User.insert_from(...)  # Bulk insert (INSERT INTO .. SELECT FROM).

# Previous behavior (peewee 3.12 - 3.14.10):
# rows_inserted = query.execute()

# New behavior:
last_id = query.execute()

# To get the old behavior back:
rows_inserted = query.as_rowcount().execute()
This release contains a fix for a long-standing request to allow data-modifying \ 
queries to support CTEs. CTEs are now supported for use with INSERT, DELETE and \ 
UPDATE queries.

Additionally, this release adds better support for using the new RETURNING \ 
syntax with Sqlite automatically. Specify returing_clause=True when initializing \ 
your SqliteDatabase and all bulk inserts will automatically specify a RETURNING \ 
clause, returning the newly-inserted primary keys. This functionality requires \ 
Sqlite 3.35 or newer.

Smaller changes:

Add shortcuts.insert_where() helper for generating conditional INSERT with a bit \ 
less boilerplate.
Fix bug in test_utils.count_queres() which could erroneously include pool events \ 
such as connect/disconnect, etc.

Files:
RevisionActionfile
1.85modifypkgsrc/databases/py-peewee/Makefile
1.69modifypkgsrc/databases/py-peewee/distinfo