python3-peewee: cherry-picked commit for python3-cython 3.0

This commit is contained in:
Tim Biermann 2023-07-23 17:03:07 +02:00
parent df9c47dbf8
commit 3fca559361
4 changed files with 148 additions and 66 deletions

View File

@ -5,66 +5,41 @@ drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/python3.10/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/
drwxr-xr-x root/root usr/lib/python3.10/site-packages/__pycache__/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/peewee.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/peewee.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/pwiz.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/pwiz.cpython-310.pyc
drwxr-xr-x root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/PKG-INFO
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/SOURCES.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/dependency_links.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/not-zip-safe
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2-py3.10.egg-info/top_level.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/peewee.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/__pycache__/pwiz.cpython-310.opt-2.pyc
drwxr-xr-x root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/LICENSE
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/METADATA
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/RECORD
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/WHEEL
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee-3.16.2.dist-info/top_level.txt
-rw-r--r-- root/root usr/lib/python3.10/site-packages/peewee.py
drwxr-xr-x root/root usr/lib/python3.10/site-packages/playhouse/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__init__.py (EMPTY)
drwxr-xr-x root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/__init__.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/__init__.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/apsw_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/apsw_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/cockroachdb.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/cockroachdb.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/dataset.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/dataset.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/db_url.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/db_url.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/fields.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/fields.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/flask_utils.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/flask_utils.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/hybrid.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/hybrid.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/kv.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/kv.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/migrate.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/migrate.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/mysql_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/mysql_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/pool.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/pool.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/postgres_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/postgres_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/psycopg3_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/psycopg3_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/reflection.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/reflection.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/shortcuts.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/shortcuts.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/signals.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/signals.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlcipher_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlcipher_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_changelog.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_changelog.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_ext.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_ext.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_udf.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_udf.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqliteq.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqliteq.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/test_utils.cpython-310.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/test_utils.cpython-310.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/__init__.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/apsw_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/cockroachdb.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/dataset.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/db_url.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/fields.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/flask_utils.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/hybrid.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/kv.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/migrate.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/mysql_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/pool.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/postgres_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/psycopg3_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/reflection.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/shortcuts.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/signals.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlcipher_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_changelog.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_ext.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqlite_udf.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/sqliteq.cpython-310.opt-2.pyc
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/__pycache__/test_utils.cpython-310.opt-2.pyc
-rwxr-xr-x root/root usr/lib/python3.10/site-packages/playhouse/_sqlite_ext.cpython-310-x86_64-linux-gnu.so
-rwxr-xr-x root/root usr/lib/python3.10/site-packages/playhouse/_sqlite_udf.cpython-310-x86_64-linux-gnu.so
-rw-r--r-- root/root usr/lib/python3.10/site-packages/playhouse/apsw_ext.py

View File

@ -1,5 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3/WQQhVj8t6u5ncDiCfE0j5SMziC4kVoxgZBPjq3rJXDdrjUCkB2bfRo6c5hRIdbDYaGP97h3yNLfOZaUzrIeg0=
SHA256 (Pkgfile) = 87c52cb39828edb5164f648bda0380223ed1be1aeb15cec8cb7d01faa59acf3e
SHA256 (.footprint) = 70ddde4a9581e49e23aeae4fd65c15c28907384955a01aa07a50b406cf708a07
RWSagIOpLGJF30UnYKOk9p1ChL5K8dTocKX5nIsg/RO1mF3cu+RheH3M06gcQdVh/SKk3K70qqthA4cwuDgCyvZbk8lEBFDhwgk=
SHA256 (Pkgfile) = a3946c3d03e6c607391e7de7e9778d566362f6378fe6345be90e267d4f9bdf7f
SHA256 (.footprint) = ce1ccecdd74db1c0484eade0de3d737d7dcbb26282dc665fdfb4df016118f91c
SHA256 (python3-peewee-3.16.2.tar.gz) = 7bf665e90672b1fc2f3e7f2a5bf9361c99088727b64e23d2bc73e9d42e91e5c2
SHA256 (83c6b78bd5df2c8c942f4fc32c4daedde01e8a63.patch) = dc911e1ff59caedb9136ecb32ae4984b7332f1979c4b115e5fa1f8a7fb0401fe

View File

@ -0,0 +1,105 @@
From 83c6b78bd5df2c8c942f4fc32c4daedde01e8a63 Mon Sep 17 00:00:00 2001
From: Charles Leifer <coleifer@gmail.com>
Date: Tue, 18 Jul 2023 17:37:27 -0500
Subject: [PATCH] Changes for Cython 3.0
---
playhouse/_sqlite_ext.pyx | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/playhouse/_sqlite_ext.pyx b/playhouse/_sqlite_ext.pyx
index c4a0102b0..41df21870 100644
--- a/playhouse/_sqlite_ext.pyx
+++ b/playhouse/_sqlite_ext.pyx
@@ -386,7 +386,7 @@ ctypedef struct peewee_cursor:
# We define an xConnect function, but leave xCreate NULL so that the
# table-function can be called eponymously.
cdef int pwConnect(sqlite3 *db, void *pAux, int argc, const char *const*argv,
- sqlite3_vtab **ppVtab, char **pzErr) with gil:
+ sqlite3_vtab **ppVtab, char **pzErr) noexcept with gil:
cdef:
int rc
object table_func_cls = <object>pAux
@@ -407,7 +407,7 @@ cdef int pwConnect(sqlite3 *db, void *pAux, int argc, const char *const*argv,
return rc
-cdef int pwDisconnect(sqlite3_vtab *pBase) with gil:
+cdef int pwDisconnect(sqlite3_vtab *pBase) noexcept with gil:
cdef:
peewee_vtab *pVtab = <peewee_vtab *>pBase
object table_func_cls = <object>(pVtab.table_func_cls)
@@ -419,7 +419,8 @@ cdef int pwDisconnect(sqlite3_vtab *pBase) with gil:
# The xOpen method is used to initialize a cursor. In this method we
# instantiate the TableFunction class and zero out a new cursor for iteration.
-cdef int pwOpen(sqlite3_vtab *pBase, sqlite3_vtab_cursor **ppCursor) with gil:
+cdef int pwOpen(sqlite3_vtab *pBase, sqlite3_vtab_cursor **ppCursor) \
+ noexcept with gil:
cdef:
peewee_vtab *pVtab = <peewee_vtab *>pBase
peewee_cursor *pCur = <peewee_cursor *>0
@@ -443,7 +444,7 @@ cdef int pwOpen(sqlite3_vtab *pBase, sqlite3_vtab_cursor **ppCursor) with gil:
return SQLITE_OK
-cdef int pwClose(sqlite3_vtab_cursor *pBase) with gil:
+cdef int pwClose(sqlite3_vtab_cursor *pBase) noexcept with gil:
cdef:
peewee_cursor *pCur = <peewee_cursor *>pBase
object table_func = <object>pCur.table_func
@@ -454,7 +455,7 @@ cdef int pwClose(sqlite3_vtab_cursor *pBase) with gil:
# Iterate once, advancing the cursor's index and assigning the row data to the
# `row_data` field on the peewee_cursor struct.
-cdef int pwNext(sqlite3_vtab_cursor *pBase) with gil:
+cdef int pwNext(sqlite3_vtab_cursor *pBase) noexcept with gil:
cdef:
peewee_cursor *pCur = <peewee_cursor *>pBase
object table_func = <object>pCur.table_func
@@ -483,7 +484,7 @@ cdef int pwNext(sqlite3_vtab_cursor *pBase) with gil:
# Return the requested column from the current row.
cdef int pwColumn(sqlite3_vtab_cursor *pBase, sqlite3_context *ctx,
- int iCol) with gil:
+ int iCol) noexcept with gil:
cdef:
bytes bval
peewee_cursor *pCur = <peewee_cursor *>pBase
@@ -502,7 +503,7 @@ cdef int pwColumn(sqlite3_vtab_cursor *pBase, sqlite3_context *ctx,
return python_to_sqlite(ctx, row_data[iCol])
-cdef int pwRowid(sqlite3_vtab_cursor *pBase, sqlite3_int64 *pRowid):
+cdef int pwRowid(sqlite3_vtab_cursor *pBase, sqlite3_int64 *pRowid) noexcept:
cdef:
peewee_cursor *pCur = <peewee_cursor *>pBase
pRowid[0] = <sqlite3_int64>pCur.idx
@@ -510,7 +511,7 @@ cdef int pwRowid(sqlite3_vtab_cursor *pBase, sqlite3_int64 *pRowid):
# Return a boolean indicating whether the cursor has been consumed.
-cdef int pwEof(sqlite3_vtab_cursor *pBase):
+cdef int pwEof(sqlite3_vtab_cursor *pBase) noexcept:
cdef:
peewee_cursor *pCur = <peewee_cursor *>pBase
return 1 if pCur.stopped else 0
@@ -520,7 +521,8 @@ cdef int pwEof(sqlite3_vtab_cursor *pBase):
# get access to the parameters that the function was called with, and call the
# TableFunction's `initialize()` function.
cdef int pwFilter(sqlite3_vtab_cursor *pBase, int idxNum,
- const char *idxStr, int argc, sqlite3_value **argv) with gil:
+ const char *idxStr, int argc, sqlite3_value **argv) \
+ noexcept with gil:
cdef:
peewee_cursor *pCur = <peewee_cursor *>pBase
object table_func = <object>pCur.table_func
@@ -572,7 +574,7 @@ cdef int pwFilter(sqlite3_vtab_cursor *pBase, int idxNum,
# SQLite will (in some cases, repeatedly) call the xBestIndex method to try and
# find the best query plan.
cdef int pwBestIndex(sqlite3_vtab *pBase, sqlite3_index_info *pIdxInfo) \
- with gil:
+ noexcept with gil:
cdef:
int i
int col_idx

View File

@ -5,14 +5,15 @@
name=python3-peewee
version=3.16.2
release=1
source=(https://github.com/coleifer/peewee/archive/$version/$name-$version.tar.gz)
release=2
source=(https://github.com/coleifer/peewee/archive/$version/$name-$version.tar.gz
83c6b78bd5df2c8c942f4fc32c4daedde01e8a63.patch)
build() {
cd peewee-$version
/usr/bin/python3 setup.py build
/usr/bin/python3 setup.py install --prefix=/usr \
--root=$PKG \
--skip-build \
-O1
patch -Np1 -i $SRC/83c6b78bd5df2c8c942f4fc32c4daedde01e8a63.patch
/usr/bin/python3 -m build --wheel --skip-dependency-check --no-isolation
/usr/bin/python3 -m installer --compile-bytecode 2 --destdir=$PKG dist/*.whl
}