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 Sep 7 08:28:37 UTC 2026
Modified Files:
pkgsrc/databases/py-peewee: Makefile distinfo
Log Message:
py-peewee: updated to 4.5.0
4.5.0
Backwards-incompatible:
* MySQL and MariaDB connections no longer set `sql_mode`. Peewee had been
setting `PIPES_AS_CONCAT`, but the param replaced the server's mode rather
than adding to it, which silently disabled `STRICT_TRANS_TABLES` (etc).
Going forward Peewee will not modify `sql_mode` by default and use
`CONCAT()` rather than `||` for MySQL/MariaDB.
* MySQL and MariaDB connection charset defaults to `utf8mb4` instead of `utf8`,
which is an alias for `utf8mb3` and cannot store 4-byte characters.
* A field's `sequence=` is now qualified with the model's `Meta.schema`. If the
name you pass already contains a dot it is treated as fully-qualified and
used as-is, so `sequence='other.seq'` is unaffected by `Meta.schema`. Also,
`sequence_exists()` accepts a schema-qualified name.
* SQLite `BEGIN`, `COMMIT` and `ROLLBACK` are issued directly on a cursor
rather than through `execute_sql()`, so they are no longer debug-logged, do
not fire query hooks and are not counted by `count_queries()`. This matches
Postgres and MySQL.
* `atomic()` and `transaction()` on a closed database with `autoconnect=False`
now raise `InterfaceError` on Postgres and MySQL, as they already did on
SQLite (and as queries do). Previously `begin()` opened a connection
regardless of `autoconnect`.
Improvements:
* Add `SqliteDatabase(..., lock_type=...)` to set the default locking strategy
for transactions that do not specify one, e.g. `lock_type='IMMEDIATE'`.
* Postgres introspection (`get_tables()`, `get_columns()`, `get_indexes()`,
`get_primary_keys()`, `get_foreign_keys()`, `get_views()`) with no `schema`
now follows the search path via `current_schema()` instead of assuming
`public`, matching MySQL's `DATABASE()` behavior.
* Add `Runner(db, schema=...)` and `pwmigrate --schema` for running
migrations against a specific schema. The history table lives in that
schema, so each schema tracks its own applied set and one set of migration
files can be run against any number of schemas.
* Add `SchemaMigrator(db, schema=...)`, which qualifies every table name w/the
given schema (or database on MySQL). Not supported for SQLite, as the
table-rebuild rewrites DDL straight from `sqlite_master`.
* Add `websearch=True` to `TSVectorField.match()` and `Match()` to parse the
query using `websearch_to_tsquery()` (pg 11+). Accepts user input without
raising (quoted phrases, `or`, and `-negation`).
* Add `Database.query_hooks`, a list of callables invoked after every query
with a `QueryEvent` named tuple (`sql`, `params`, `duration`, `exception`),
on success and failure both. No timing overhead when the list is empty.
* Add `Database.after_commit(fn)`, which runs a callable after the outermost
transaction commits. Hook is discarded on rollback and runs immediately if
no transaction is active. Use for, e.g., writing a row PK to a task queue.
* Add `EnumField` and `IntEnumField` to `playhouse.fields`, storing
`member.value` and returning the member, rejecting unknown values on write
and comparison. `to_pydantic()` maps any field with an `enum_class`
attribute to the enum itself, so schemas validate membership.
* Add `Database.dispose()` / `PooledDatabase.dispose()` for discarding and
resetting local connection state, e.g. in a child process after `fork()`.
* `Model.bind_ctx()` and `Database.bind_ctx()` can be used as decorators, like
the other peewee context-managers. Previously the decorator form raised
`TypeError: '_BoundModelsContext' object is not callable`.
* `TimeField` supports utc offsets like `DateTimeField`, parsing e.g.
`'11:12:13+02:00'` to an aware `datetime.time` instead of returning `str`.
Only sqlite stores the offset. The postgres/mysql drivers drop it on write.
To generate a diff of this commit:
cvs rdiff -u -r1.140 -r1.141 pkgsrc/databases/py-peewee/Makefile
cvs rdiff -u -r1.105 -r1.106 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/Makefile
diff -u pkgsrc/databases/py-peewee/Makefile:1.140 pkgsrc/databases/py-peewee/Makefile:1.141
--- pkgsrc/databases/py-peewee/Makefile:1.140 Mon Aug 24 12:40:22 2026
+++ pkgsrc/databases/py-peewee/Makefile Mon Sep 7 08:28:37 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.140 2026/08/24 12:40:22 adam Exp $
+# $NetBSD: Makefile,v 1.141 2026/09/07 08:28:37 adam Exp $
-DISTNAME= peewee-4.4.0
+DISTNAME= peewee-4.5.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= databases python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/peewee/}
@@ -11,8 +11,8 @@ COMMENT= Small, expressive ORM for Postg
LICENSE= mit
TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools
-TOOL_DEPENDS+= ${PYPKGPREFIX}-sphinx-[0-9]*:../../textproc/py-sphinx
-TOOL_DEPENDS+= ${PYPKGPREFIX}-sphinx-rtd-theme-[0-9]*:../../textproc/py-sphinx-rtd-theme
+TOOL_DEPENDS+= ${PYPKGPREFIX}-sphinx>=0:../../textproc/py-sphinx
+TOOL_DEPENDS+= ${PYPKGPREFIX}-sphinx-rtd-theme>=0:../../textproc/py-sphinx-rtd-theme
PYTHON_VERSIONS_INCOMPATIBLE= 310 311 # py-sphinx
Index: pkgsrc/databases/py-peewee/distinfo
diff -u pkgsrc/databases/py-peewee/distinfo:1.105 pkgsrc/databases/py-peewee/distinfo:1.106
--- pkgsrc/databases/py-peewee/distinfo:1.105 Mon Aug 24 12:40:22 2026
+++ pkgsrc/databases/py-peewee/distinfo Mon Sep 7 08:28:37 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.105 2026/08/24 12:40:22 adam Exp $
+$NetBSD: distinfo,v 1.106 2026/09/07 08:28:37 adam Exp $
-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
+BLAKE2s (peewee-4.5.0.tar.gz) = 580e929216832a2c57e2a17322c74d17baa5f3191f080438613a73789a651560
+SHA512 (peewee-4.5.0.tar.gz) = 9de82e1d9c2f579aaf93e6a0900b10e95c1682644eee4fc0569b9a2e8bc612baa4353d9374a91ef502c76c47c5b8167e79e587b3fc01fde6b9f0c9ea4707cdc8
+Size (peewee-4.5.0.tar.gz) = 822868 bytes
Home |
Main Index |
Thread Index |
Old Index