pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/databases/py-peewee
Module Name: pkgsrc
Committed By: adam
Date: Mon Aug 24 12:40:22 UTC 2026
Modified Files:
pkgsrc/databases/py-peewee: ALTERNATIVES Makefile PLIST distinfo
Log Message:
py-peewee: updated to 4.4.0
4.4.0
In which we learn to migrate (somewhat).
* Add `playhouse.migrations` for running migration scripts. Migrations are
python files defining `up(migrator, db)` and optionally `down(...)`.
Migrations are applied in numeric order a-la Django, and stored by name in a
history table. CLI via `pwmigrate` accepting `status`, `up`, `down`,
`initial`, `create`, `generate`, `fake` and `diff`. To run from python,
`migrations.run(db)`.
* Add basic `playhouse.schema_diff` for comparing models against the
schema and reporting differences (tables to create, columns added or
removed, indexes added or removed).
* Allow adding column to existing table as `NOT NULL` with migrator, which
allows skipping the 3-step process of add nullable, populate default, set not
null.
* `db_url.connect()` raises `ValueError` for a url with no database name,
e.g. `postgres://dbname` (two slashes reads `dbname` as the host).
* Add a `SchemaMigrator.migration_context()` helper for wrapping migrations.
This was wanted for SQLite in order to disable FK pragma, which could trigger
cascading deletes while recreating tables.
* Allow `SchemaMigrator.from_database()` to support database proxies.
* Add support for newer SQLite ALTER TABLE functionality from 3.53.0.
* Do not allow `delete()` method to be called on a model instance.
`Model.delete()` is a classmethod for constructing a `DELETE` query, and
`model.delete_instance()` has always been the correct path for deleting a
model instance. This new check just ensures that a new user cannot
accidentally delete their whole table by using the class-version from an
instance.
* Server-side cursors opened inside a transaction on psycopg3 are no longer
declared `WITH HOLD`. They stream and are scoped to the transaction, rather
than spooling their remaining rows server-side at commit.
* `scalar()` applies a `LIMIT 1` via `first()`, rather than running the
query unbounded and reading the first value. The query itself is not mutated,
the limit is applied only on an internal copy.
* Ensure `JSONField` works when proxy is already initialized. Thanks
@NotAFlightRisk.
* `commit()` / `rollback()` on a closed db will raise rather than silently open
a new connection.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/databases/py-peewee/ALTERNATIVES
cvs rdiff -u -r1.139 -r1.140 pkgsrc/databases/py-peewee/Makefile
cvs rdiff -u -r1.29 -r1.30 pkgsrc/databases/py-peewee/PLIST
cvs rdiff -u -r1.104 -r1.105 pkgsrc/databases/py-peewee/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/databases/py-peewee/ALTERNATIVES
diff -u pkgsrc/databases/py-peewee/ALTERNATIVES:1.4 pkgsrc/databases/py-peewee/ALTERNATIVES:1.5
--- pkgsrc/databases/py-peewee/ALTERNATIVES:1.4 Wed May 6 11:16:45 2020
+++ pkgsrc/databases/py-peewee/ALTERNATIVES Mon Aug 24 12:40:22 2026
@@ -1 +1,2 @@
bin/pwiz @PREFIX@/bin/pwiz-@PYVERSSUFFIX@
+bin/pwmigrate @PREFIX@/bin/pwmigrate-@PYVERSSUFFIX@
Index: pkgsrc/databases/py-peewee/Makefile
diff -u pkgsrc/databases/py-peewee/Makefile:1.139 pkgsrc/databases/py-peewee/Makefile:1.140
--- pkgsrc/databases/py-peewee/Makefile:1.139 Mon Aug 3 09:49:35 2026
+++ pkgsrc/databases/py-peewee/Makefile Mon Aug 24 12:40:22 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.139 2026/08/03 09:49:35 adam Exp $
+# $NetBSD: Makefile,v 1.140 2026/08/24 12:40:22 adam Exp $
-DISTNAME= peewee-4.3.0
+DISTNAME= peewee-4.4.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= databases python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/peewee/}
@@ -22,7 +22,7 @@ FILES_SUBST+= PKGMANDIR=${PKGMANDIR}
MESSAGE_SUBST+= PYPKGPREFIX=${PYPKGPREFIX}
REPLACE_PYTHON+= pwiz.py
-PY_RENAME_BINARIES= pwiz
+PY_RENAME_BINARIES= pwiz pwmigrate
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
Index: pkgsrc/databases/py-peewee/PLIST
diff -u pkgsrc/databases/py-peewee/PLIST:1.29 pkgsrc/databases/py-peewee/PLIST:1.30
--- pkgsrc/databases/py-peewee/PLIST:1.29 Mon Aug 3 09:49:35 2026
+++ pkgsrc/databases/py-peewee/PLIST Mon Aug 24 12:40:22 2026
@@ -1,5 +1,6 @@
-@comment $NetBSD: PLIST,v 1.29 2026/08/03 09:49:35 adam Exp $
+@comment $NetBSD: PLIST,v 1.30 2026/08/24 12:40:22 adam Exp $
bin/pwiz-${PYVERSSUFFIX}
+bin/pwmigrate-${PYVERSSUFFIX}
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
@@ -49,6 +50,9 @@ ${PYSITELIB}/playhouse/kv.pyo
${PYSITELIB}/playhouse/migrate.py
${PYSITELIB}/playhouse/migrate.pyc
${PYSITELIB}/playhouse/migrate.pyo
+${PYSITELIB}/playhouse/migrations.py
+${PYSITELIB}/playhouse/migrations.pyc
+${PYSITELIB}/playhouse/migrations.pyo
${PYSITELIB}/playhouse/mysql_ext.py
${PYSITELIB}/playhouse/mysql_ext.pyc
${PYSITELIB}/playhouse/mysql_ext.pyo
@@ -67,6 +71,9 @@ ${PYSITELIB}/playhouse/pydantic_utils.py
${PYSITELIB}/playhouse/reflection.py
${PYSITELIB}/playhouse/reflection.pyc
${PYSITELIB}/playhouse/reflection.pyo
+${PYSITELIB}/playhouse/schema_diff.py
+${PYSITELIB}/playhouse/schema_diff.pyc
+${PYSITELIB}/playhouse/schema_diff.pyo
${PYSITELIB}/playhouse/shortcuts.py
${PYSITELIB}/playhouse/shortcuts.pyc
${PYSITELIB}/playhouse/shortcuts.pyo
Index: pkgsrc/databases/py-peewee/distinfo
diff -u pkgsrc/databases/py-peewee/distinfo:1.104 pkgsrc/databases/py-peewee/distinfo:1.105
--- pkgsrc/databases/py-peewee/distinfo:1.104 Mon Aug 3 09:49:35 2026
+++ pkgsrc/databases/py-peewee/distinfo Mon Aug 24 12:40:22 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.104 2026/08/03 09:49:35 adam Exp $
+$NetBSD: distinfo,v 1.105 2026/08/24 12:40:22 adam Exp $
-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
+BLAKE2s (peewee-4.4.0.tar.gz) = 941060ee12eca5f97500d4be6dcd3af19573e9b81686debbb3ac3facf99492ec
+SHA512 (peewee-4.4.0.tar.gz) = 249f60114609b3c824d0ccf450c90290c9526a8402dd15fe9e8100d4bc7713c14127d506c3dc57718606a50385ba842e8f4d6be12f09cd8e5e780f1b7e349fad
+Size (peewee-4.4.0.tar.gz) = 817279 bytes
Home |
Main Index |
Thread Index |
Old Index