CVS commit: pkgsrc/databases/py-peewee
"Adam Ciarcinski" <[email protected]> Mon, 3 Aug 2026 09:49:36 +0000
| Newsgroups | gmane.os.netbsd.devel.pkgsrc.cvs |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--_----------=_178575057687540
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="US-ASCII"
Module Name: pkgsrc
Committed By: adam
Date: Mon Aug 3 09:49:36 UTC 2026
Modified Files:
pkgsrc/databases/py-peewee: Makefile PLIST distinfo
Log Message:
py-peewee: updated to 4.3.0
4.3.0
Backwards-incompatible:
* Specify `requires-python >= 3.8`. I've been putting off committing to
anything like this, since technically we still work on 3.7, but 3.8 is the
minimum we run on CI so it felt correct.
* Replace `docid` implicit primary key on legacy `FTSModel` (FTS4) with
`rowid`, which is equivalent. Using `docid` presents no benefit and
switching to `rowid` makes operations more consistent. Users have a couple
options when updating:
* Explicitly add `docid = DocIDField()` to your FTSModel classes.
* Update your code, replacing `docid` with `rowid`. The underlying data
does not require a migration, as docid was just an alias for rowid.
* When a RETURNING-clause insert of a single row inserts nothing, e.g. a
conflict was ignored, `execute()` returns `None` on every backend.
Improvements:
* Connection pools roll back transactions left open on check-in.
* Pooled Postgres probes idle connections with `SELECT 1` and discards dead
ones, matching the MySQL pool's ping. Previously a connection terminated
server-side while parked in the pool was handed out and failed on first use.
* `close_pool()` in pwasyncio no longer spins the event loop on Python
3.13+ attempting to reclaim connections in use, and pool creation is now
bounded by `acquire_timeout`. Connections terminated during shutdown are
detected as stale and discarded at the next checkout.
* `JSONField` negative path indexes render as `$[last]` / `$[last-n]` on
MySQL/MariaDB. Previously the sqlite-only `$[#-n]` form was emitted, which
MariaDB evaluates to NULL (overwriting the column when used with `set()`)
and MySQL rejects as an invalid path.
* `JSONField` mutators (`set()`, `insert()`, etc) store Python booleans as
json true/false instead of the driver's 0/1, so values written by `create()`
and by mutators compare consistently. Floats on MySQL/MariaDB likewise take
their json text form, as MariaDB reformats driver floats in a way that
breaks equality against the stored document.
* Reflection/pwiz map MySQL JSON columns to the core `JSONField` instead of
emitting `from playhouse.mysql_ext import *` for a re-exported field.
* `playhouse.pwasyncio` logs to the `peewee.pwasyncio` logger rather than
`playhouse.pwasyncio`.
* Fix `dataset` freeze/thaw of NULL blob and datetime values. Empty CSV cells
now import as NULL for non-text fields.
* Lateral joins honor a user-supplied `on=` predicate instead of silently
replacing it with `true`, and default to `ON true` when `on=` is omitted.
* The SQLite FTS `content` option must be a Model or table-name string.
Passing a Field now raises `ImproperlyConfigured`: it generated DDL that
fts5 rejects outright and that fts4 silently truncated to the table name.
* Fix `FTS5Model.VocabModel()`: term/col/offset were declared as virtual
fields and omitted from default SELECTs, the instance-type model had the
wrong column set, all three table-types shared one default table name, and
the generated class was cached with whatever database was bound at first
call. Vocab models are now built fresh per call with real fields, correct
columns and per-type default names.
* Add `FTS5Model.web_query()`, which translates the query syntax users expect
from a search box (quoted phrases, AND/OR/NOT, `-exclusion`, `column:`
filters and parentheses) into an FTS5 query. Anything else is searched as
text, so `covid-19` or `c++` need no escaping, and the translation is always
a valid query. The parser lives in the new `playhouse.fts_parser` module.
Use it with search: `Doc.search(Doc.web_query(user_input))`.
* Add `FTS5Model.delete_command()`, which removes a row using the fts5 `delete`
command. This is how rows are removed from external-content and contentless
tables, which need the originally-indexed values supplied back to them:
sqlite treats an omitted column as NULL, and values that do not match what
was indexed leave stale entries behind (undetectably so on a contentless
table). Peewee therefore requires a value for every indexed column; pass
`None` where NULL was indexed. The command exists only for those two
configurations - default-storage and `contentless_delete=1` tables reject
it and use ordinary `DELETE`.
* Add support for cysqlite's sick table func decorator syntax.
* Better behavior for INSERT when `as_rowcount()` is specified, along with
proper return of all parts of a composite PK instead of just the 1st column.
* `last_insert_id()` is implemented once on `Database`, with backends
overriding `_last_insert_rowid()` where the driver differs. APSW and the
MariaDB connector inherit composite primary-key support as a result, having
previously returned only the first column.
* Don't apply field kwargs to barefield instances w/reflection
To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 pkgsrc/databases/py-peewee/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/databases/py-peewee/PLIST
cvs rdiff -u -r1.103 -r1.104 pkgsrc/databases/py-peewee/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
--_----------=_178575057687540
Content-Disposition: inline
Content-Length: 2489
Content-Transfer-Encoding: binary
Content-Type: text/x-diff; charset=us-ascii
Modified files:
Index: pkgsrc/databases/py-peewee/Makefile
diff -u pkgsrc/databases/py-peewee/Makefile:1.138 pkgsrc/databases/py-peewee/Makefile:1.139
--- pkgsrc/databases/py-peewee/Makefile:1.138 Mon Jul 20 12:20:47 2026
+++ pkgsrc/databases/py-peewee/Makefile Mon Aug 3 09:49:35 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.138 2026/07/20 12:20:47 adam Exp $
+# $NetBSD: Makefile,v 1.139 2026/08/03 09:49:35 adam Exp $
-DISTNAME= peewee-4.2.6
+DISTNAME= peewee-4.3.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= databases python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/peewee/}
Index: pkgsrc/databases/py-peewee/PLIST
diff -u pkgsrc/databases/py-peewee/PLIST:1.28 pkgsrc/databases/py-peewee/PLIST:1.29
--- pkgsrc/databases/py-peewee/PLIST:1.28 Sun Jun 28 14:52:51 2026
+++ pkgsrc/databases/py-peewee/PLIST Mon Aug 3 09:49:35 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.28 2026/06/28 14:52:51 adam Exp $
+@comment $NetBSD: PLIST,v 1.29 2026/08/03 09:49:35 adam Exp $
bin/pwiz-${PYVERSSUFFIX}
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
@@ -37,6 +37,9 @@ ${PYSITELIB}/playhouse/fields.pyo
${PYSITELIB}/playhouse/flask_utils.py
${PYSITELIB}/playhouse/flask_utils.pyc
${PYSITELIB}/playhouse/flask_utils.pyo
+${PYSITELIB}/playhouse/fts_parser.py
+${PYSITELIB}/playhouse/fts_parser.pyc
+${PYSITELIB}/playhouse/fts_parser.pyo
${PYSITELIB}/playhouse/hybrid.py
${PYSITELIB}/playhouse/hybrid.pyc
${PYSITELIB}/playhouse/hybrid.pyo
Index: pkgsrc/databases/py-peewee/distinfo
diff -u pkgsrc/databases/py-peewee/distinfo:1.103 pkgsrc/databases/py-peewee/distinfo:1.104
--- pkgsrc/databases/py-peewee/distinfo:1.103 Mon Jul 20 12:20:47 2026
+++ pkgsrc/databases/py-peewee/distinfo Mon Aug 3 09:49:35 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.103 2026/07/20 12:20:47 adam Exp $
+$NetBSD: distinfo,v 1.104 2026/08/03 09:49:35 adam Exp $
-BLAKE2s (peewee-4.2.6.tar.gz) = 0953391d20d4363d1047ddc50ff6397928fcd5463a8e2a77b5fba88ba1331d94
-SHA512 (peewee-4.2.6.tar.gz) = 759f4d0c5fdb8f58a4467301e205c68a2f3eaf5098365dfc520326b850a9b518a6329e1d469ce0b0e18f5694e6c91ffd5f1687dcc23eb174d98eb1c6e1f26f60
-Size (peewee-4.2.6.tar.gz) = 779493 bytes
+BLAKE2s (peewee-4.3.0.tar.gz) = 9d8f0c0299b2b6aa2a0b309066e95a5a8eece805393efc3e1479f20c3e80554c
+SHA512 (peewee-4.3.0.tar.gz) = 98ad92a231dd99deb1e41683ef1d6942eaa7ca005c16aa8f734276270803d5d039d06fdef2b837e4952e73354940701c47b85f658760153a6b2b2b6c598b32a5
+Size (peewee-4.3.0.tar.gz) = 795277 bytes
--_----------=_178575057687540--