From 82f3972b856dc36c36a6234e8c968039668abfbc0952ca1458efc210d8162a31 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 7 Oct 2022 08:11:28 +0000 Subject: [PATCH] Accepting request 1008036 from home:yarunachalam:branches:devel:languages:python - Update to 3.15.3 Add scalars() query method (complements scalar()), roughly equivalent to writing [t[0] for t in query.tuples()]. Small doc improvements Fix and remove some flaky test assertions with Sqlite INSERT + RETURNING. Fix innocuous failing Sqlite test on big-endian machines. View commits - Update to 3.15.2 Fix bug where field-specific conversions were being applied to the pattern used for LIKE / ILIKE operations. Refs #2609 Fix possible infinite loop when accidentally invoking the __iter__ method on certain Column subclasses. Refs #2606 Add new helper for specifying which Model a particular selected column-like should be bound to, in queries with joins that select from multiple sources. View commits - Update to 3.15.1 Fix issue introduced in Sqlite 3.39.0 regarding the propagation of column subtypes in subqueries. Fix bug where cockroachdb server version was not set when beginning a transaction on an unopened database. View commits - Update to 3.15.0 Rollback behavior change in commit ab43376697 (GH #2026). 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() OBS-URL: https://build.opensuse.org/request/show/1008036 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-peewee?expand=0&rev=36 --- peewee-3.14.10.tar.gz | 3 --- peewee-3.15.2.tar.gz | 3 +++ python-peewee.changes | 46 +++++++++++++++++++++++++++++++++++++++++++ python-peewee.spec | 2 +- 4 files changed, 50 insertions(+), 4 deletions(-) delete mode 100644 peewee-3.14.10.tar.gz create mode 100644 peewee-3.15.2.tar.gz diff --git a/peewee-3.14.10.tar.gz b/peewee-3.14.10.tar.gz deleted file mode 100644 index 934d1fb..0000000 --- a/peewee-3.14.10.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc68047b1d413bd0c3a002ebfd55ae8fe620c0d11057fc354f7b5c97fc245de5 -size 896121 diff --git a/peewee-3.15.2.tar.gz b/peewee-3.15.2.tar.gz new file mode 100644 index 0000000..bb72ae9 --- /dev/null +++ b/peewee-3.15.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd48a227de5784f630aff1edd2805d438ecc21ffd05b11917eca821b94d50083 +size 905707 diff --git a/python-peewee.changes b/python-peewee.changes index 74a89cc..ad33a59 100644 --- a/python-peewee.changes +++ b/python-peewee.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Tue Oct 4 22:59:19 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 3.15.3 + Add scalars() query method (complements scalar()), roughly equivalent to writing [t[0] for t in query.tuples()]. + Small doc improvements + Fix and remove some flaky test assertions with Sqlite INSERT + RETURNING. + Fix innocuous failing Sqlite test on big-endian machines. + View commits + +- Update to 3.15.2 + Fix bug where field-specific conversions were being applied to the pattern used for LIKE / ILIKE operations. Refs #2609 + Fix possible infinite loop when accidentally invoking the __iter__ method on certain Column subclasses. Refs #2606 + Add new helper for specifying which Model a particular selected column-like should be bound to, in queries with joins that select from multiple sources. + View commits + +- Update to 3.15.1 + Fix issue introduced in Sqlite 3.39.0 regarding the propagation of column subtypes in subqueries. + Fix bug where cockroachdb server version was not set when beginning a transaction on an unopened database. + View commits + +- Update to 3.15.0 + Rollback behavior change in commit ab43376697 (GH #2026). 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 - see #2152. + 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. + ------------------------------------------------------------------- Sat Apr 16 15:24:55 UTC 2022 - Matej Cepl diff --git a/python-peewee.spec b/python-peewee.spec index 27f8369..3df27b7 100644 --- a/python-peewee.spec +++ b/python-peewee.spec @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-peewee -Version: 3.14.10 +Version: 3.15.2 Release: 0 Summary: An expressive ORM that supports multiple SQL backends License: BSD-3-Clause