Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-apsw for openSUSE:Factory checked in at 2024-04-21 20:27:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-apsw (Old) and /work/SRC/openSUSE:Factory/.python-apsw.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-apsw" Sun Apr 21 20:27:39 2024 rev:24 rq:1169376 version:3.45.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-apsw/python-apsw.changes 2024-03-18 16:47:26.453336273 +0100 +++ /work/SRC/openSUSE:Factory/.python-apsw.new.26366/python-apsw.changes 2024-04-21 20:29:12.066149062 +0200 @@ -1,0 +2,6 @@ +Sat Apr 20 14:09:15 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 3.45.3.0: + * No APSW changes. + +------------------------------------------------------------------- Old: ---- apsw-3.45.2.0.tar.gz New: ---- apsw-3.45.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-apsw.spec ++++++ --- /var/tmp/diff_new_pack.TaHDo1/_old 2024-04-21 20:29:12.890179310 +0200 +++ /var/tmp/diff_new_pack.TaHDo1/_new 2024-04-21 20:29:12.894179457 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-apsw -Version: 3.45.2.0 +Version: 3.45.3.0 Release: 0 Summary: Another Python SQLite Wrapper License: Zlib ++++++ apsw-3.45.2.0.tar.gz -> apsw-3.45.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/.github/workflows/build-pypi.yml new/apsw-3.45.3.0/.github/workflows/build-pypi.yml --- old/apsw-3.45.2.0/.github/workflows/build-pypi.yml 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/.github/workflows/build-pypi.yml 2024-04-16 17:00:14.000000000 +0200 @@ -8,13 +8,13 @@ runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16 + uses: pypa/cibuildwheel@v2.17 env: CIBW_SKIP: pp* CIBW_ARCHS_MACOS: all @@ -43,7 +43,7 @@ platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16 + uses: pypa/cibuildwheel@v2.17 env: CIBW_SKIP: pp* CIBW_ARCHS_LINUX: ${{ matrix.arch }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/.github/workflows/build-testpypi.yml new/apsw-3.45.3.0/.github/workflows/build-testpypi.yml --- old/apsw-3.45.2.0/.github/workflows/build-testpypi.yml 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/.github/workflows/build-testpypi.yml 2024-04-16 17:00:14.000000000 +0200 @@ -8,13 +8,13 @@ runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16 + uses: pypa/cibuildwheel@v2.17 env: CIBW_SKIP: pp* CIBW_ARCHS_MACOS: all @@ -43,7 +43,7 @@ platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16 + uses: pypa/cibuildwheel@v2.17 env: CIBW_SKIP: pp* CIBW_ARCHS_LINUX: ${{ matrix.arch }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/Makefile new/apsw-3.45.3.0/Makefile --- old/apsw-3.45.2.0/Makefile 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/Makefile 2024-04-16 17:00:14.000000000 +0200 @@ -1,8 +1,8 @@ -SQLITEVERSION=3.45.2 +SQLITEVERSION=3.45.3 APSWSUFFIX=.0 -RELEASEDATE="13 March 2024" +RELEASEDATE="17 April 2024" VERSION=$(SQLITEVERSION)$(APSWSUFFIX) VERDIR=apsw-$(VERSION) @@ -34,7 +34,7 @@ git push --tags clean: ## Cleans up everything - make PYTHONPATH="`pwd`" VERSION=$(VERSION) -C doc clean + $(MAKE) PYTHONPATH="`pwd`" VERSION=$(VERSION) -C doc clean rm -rf dist build work/* megatestresults apsw.egg-info __pycache__ apsw/__pycache__ :memory: .mypy_cache .ropeproject htmlcov "System Volume Information" doc/docdb.json mkdir dist for i in 'vgcore.*' '.coverage' '*.pyc' '*.pyo' '*~' '*.o' '*.so' '*.dll' '*.pyd' '*.gcov' '*.gcda' '*.gcno' '*.orig' '*.tmp' 'testdb*' 'testextension.sqlext' ; do \ @@ -50,7 +50,7 @@ rm -f testdb env PYTHONPATH=. $(PYTHON) tools/docmissing.py env PYTHONPATH=. $(PYTHON) tools/docupdate.py $(VERSION) - make PYTHONPATH="`pwd`" VERSION=$(VERSION) RELEASEDATE=$(RELEASEDATE) -C doc clean html + $(MAKE) PYTHONPATH="`pwd`" VERSION=$(VERSION) RELEASEDATE=$(RELEASEDATE) -C doc clean html tools/spellcheck.sh rst2html.py --strict --verbose --exit-status 1 README.rst >/dev/null @@ -134,7 +134,7 @@ fulltest: test test_debug linkcheck: ## Checks links from doc - env PYTHONPATH="`pwd`" make RELEASEDATE=$(RELEASEDATE) VERSION=$(VERSION) -C doc linkcheck + env PYTHONPATH="`pwd`" $(MAKE) RELEASEDATE=$(RELEASEDATE) VERSION=$(VERSION) -C doc linkcheck unwrapped: ## Find SQLite APIs that are not wrapped by APSW env PYTHONPATH=. $(PYTHON) tools/find_unwrapped_apis.py @@ -155,7 +155,7 @@ -rm -rf sqlite3 mkdir sqlite3 set -e ; cd sqlite3 ; curl --output - https://www.sqlite.org/src/tarball/sqlite.tar.gz | tar xfz - --strip-components=1 - set -e ; cd sqlite3 ; ./configure --quiet --enable-all ; make sqlite3.c sqlite3 + set -e ; cd sqlite3 ; ./configure --quiet --enable-all ; $(MAKE) sqlite3.c sqlite3 -mv sqlite3config.h sqlite3/ # the funky test stuff is to exit successfully when grep has rc==1 since that means no lines found. @@ -221,7 +221,7 @@ cd dist ; zip -m $(VERDIR)-sigs.zip *.asc # building a python debug interpreter -PYDEBUG_VER=3.12.0 +PYDEBUG_VER=3.12.3 PYDEBUG_DIR=/space/pydebug PYVALGRIND_VER=$(PYDEBUG_VER) PYVALGRIND_DIR=/space/pyvalgrind @@ -233,18 +233,18 @@ curl https://www.python.org/ftp/python/`echo $(PYDEBUG_VER) | sed 's/[abr].*//'`/Python-$(PYDEBUG_VER).tar.xz | tar xfJ - && \ cd Python-$(PYDEBUG_VER) && \ ./configure --with-address-sanitizer --with-undefined-behavior-sanitizer --without-pymalloc --with-pydebug --prefix="$(PYDEBUG_DIR)" \ - CPPFLAGS="-DPyDict_MAXFREELIST=0 -DPyFloat_MAXFREELIST=0 -DPyTuple_MAXFREELIST=0 -DPyList_MAXFREELIST=0" && \ - env PATH="/usr/lib/ccache:$$PATH" ASAN_OPTIONS=detect_leaks=false make -j install - make dev-depends PYTHON=$(PYDEBUG_DIR)/bin/python3 + --without-freelists --with-assertions && \ + env ASAN_OPTIONS=detect_leaks=false $(MAKE) -j install + $(MAKE) dev-depends PYTHON=$(PYDEBUG_DIR)/bin/python3 pyvalgrind: ## Build a debug python with valgrind integration set -x && cd "$(PYVALGRIND_DIR)" && find . -delete && \ curl https://www.python.org/ftp/python/`echo $(PYVALGRIND_VER) | sed 's/[abr].*//'`/Python-$(PYVALGRIND_VER).tar.xz | tar xfJ - && \ cd Python-$(PYVALGRIND_VER) && \ ./configure --with-valgrind --without-pymalloc --with-pydebug --prefix="$(PYVALGRIND_DIR)" \ - CPPFLAGS="-DPyDict_MAXFREELIST=0 -DPyFloat_MAXFREELIST=0 -DPyTuple_MAXFREELIST=0 -DPyList_MAXFREELIST=0" && \ - env PATH="/usr/lib/ccache:$$PATH" make -j install - make dev-depends PYTHON=$(PYVALGRIND_DIR)/bin/python3 + --without-freelists --with-assertions && \ + $(MAKE) -j install + $(MAKE) dev-depends PYTHON=$(PYVALGRIND_DIR)/bin/python3 valgrind: $(PYVALGRIND_DIR)/bin/python3 src/faultinject.h ## Runs multiple iterations with valgrind to catch leaks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/apsw/speedtest.py new/apsw-3.45.3.0/apsw/speedtest.py --- old/apsw-3.45.2.0/apsw/speedtest.py 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/apsw/speedtest.py 2024-04-16 17:00:14.000000000 +0200 @@ -48,8 +48,6 @@ import sqlite3 print("Testing with sqlite3 file ", sqlite3.__file__) - if sqlite3.version != "2.6.0": # stdlib version never changed this - print(" sqlite3 version ", sqlite3.version) print(" SQLite version ", sqlite3.sqlite_version, end="\n\n") def sqlite3_setup(dbfile): @@ -141,7 +139,7 @@ for i in range(1, scale * 10000 + 1): r = random.randint(0, 500000) if bindings: - yield ("INSERT INTO t1 VALUES(:1, :2, number_name(:2))", (i, r)) + yield ("INSERT INTO t1 VALUES(?, ?, number_name(?))", (i, r, r)) else: yield ("INSERT INTO t1 VALUES(%d, %d, '%s')" % (i, r, number_name(r)), ) yield ("COMMIT", ) @@ -154,7 +152,7 @@ x = number_name(r) t1c_list.append(x) if bindings: - yield ("INSERT INTO t2 VALUES(:1, :2, number_name(:2))", (i, r)) + yield ("INSERT INTO t2 VALUES(?, ?, number_name(?))", (i, r, r)) else: yield ("INSERT INTO t2 VALUES(%d, %d, '%s')" % (i, r, x), ) yield ("COMMIT", ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/checksums new/apsw-3.45.3.0/checksums --- old/apsw-3.45.2.0/checksums 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/checksums 2024-04-16 17:00:14.000000000 +0200 @@ -8,6 +8,7 @@ # more peace of mind because the SQLite releases are not signed in any # way. +https://sqlite.org/2024/sqlite-autoconf-3450300.tar.gz 3235957 b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531 cc1050780e0266de4d91b31c8deaf4638336908c12c21898e9f1fcae1e2ac303 https://sqlite.org/2024/sqlite-autoconf-3450200.tar.gz 3234010 bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae 1b02c58a711d15b50da8a1089e0f8807ebbdf3e674c714100eda9a03a69ac758 https://sqlite.org/2024/sqlite-autoconf-3450100.tar.gz 3232682 cd9c27841b7a5932c9897651e20b86c701dd740556989b01ca596fcfa3d49a0a a54395aa2cf76b5b973fa420715b6108afedc4d8c0209c763fd2c1b517f8ad9f https://sqlite.org/2024/sqlite-autoconf-3450000.tar.gz 3231697 72887d57a1d8f89f52be38ef84a6353ce8c3ed55ada7864eb944abd9a495e436 9fc2a78088875ae7c112957d58ccc52b1a0a4afa34ac669290be42f352b1aa76 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/doc/changes.rst new/apsw-3.45.3.0/doc/changes.rst --- old/apsw-3.45.2.0/doc/changes.rst 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/doc/changes.rst 2024-04-16 17:00:14.000000000 +0200 @@ -10,6 +10,11 @@ APSW changes by version ----------------------- +3.45.3.0 +======== + +No APSW changes. + 3.45.2.0 ======== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/doc/install.rst new/apsw-3.45.3.0/doc/install.rst --- old/apsw-3.45.2.0/doc/install.rst 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/doc/install.rst 2024-04-16 17:00:14.000000000 +0200 @@ -74,12 +74,12 @@ .. downloads-begin -* `apsw-3.45.2.0.zip - <https://github.com/rogerbinns/apsw/releases/download/3.45.2.0/apsw-3.45.2.0.zip>`__ +* `apsw-3.45.3.0.zip + <https://github.com/rogerbinns/apsw/releases/download/3.45.3.0/apsw-3.45.3.0.zip>`__ (Source, includes this HTML Help) -* `apsw-3.45.2.0-sigs.zip - <https://github.com/rogerbinns/apsw/releases/download/3.45.2.0/apsw-3.45.2.0-sigs.zip>`__ +* `apsw-3.45.3.0-sigs.zip + <https://github.com/rogerbinns/apsw/releases/download/3.45.3.0/apsw-3.45.3.0-sigs.zip>`__ GPG signatures for all files .. downloads-end @@ -104,7 +104,7 @@ .. code-block:: console - $ gpg --verify apsw-3.45.2.0.zip.asc + $ gpg --verify apsw-3.45.3.0.zip.asc gpg: Signature made ... date ... using DSA key ID 0DFBD904 gpg: Good signature from "Roger Binns <rog...@rogerbinns.com>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/src/apsw.c new/apsw-3.45.3.0/src/apsw.c --- old/apsw-3.45.2.0/src/apsw.c 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/src/apsw.c 2024-04-16 17:00:14.000000000 +0200 @@ -982,7 +982,6 @@ apsw_fini(PyObject *Py_UNUSED(self)) { Py_XDECREF(tls_errmsg); - statementcache_fini(); fini_apsw_strings(); Py_RETURN_NONE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/src/apswversion.h new/apsw-3.45.3.0/src/apswversion.h --- old/apsw-3.45.2.0/src/apswversion.h 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/src/apswversion.h 2024-04-16 17:00:14.000000000 +0200 @@ -1 +1 @@ -#define APSW_VERSION "3.45.2.0" +#define APSW_VERSION "3.45.3.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/src/statementcache.c new/apsw-3.45.3.0/src/statementcache.c --- old/apsw-3.45.2.0/src/statementcache.c 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/src/statementcache.c 2024-04-16 17:00:14.000000000 +0200 @@ -53,11 +53,19 @@ unsigned uses; /* how many times the prepared statement has been (re)used */ } APSWStatement; +/* recycle bin for APSWStatements to avoid repeated malloc/free calls */ +#define SC_STATEMENT_RECYCLE_BIN_ENTRIES 4 + typedef struct StatementCache { Py_hash_t *hashes; /* array of hash values */ APSWStatement **caches; /* corresponding statements */ sqlite3 *db; /* db to work against */ +#if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 + APSWStatement *recycle_bin[SC_STATEMENT_RECYCLE_BIN_ENTRIES]; + unsigned recycle_bin_next; +#endif + unsigned highest_used; /* largest entry we have used - no point scanning beyond */ unsigned maxentries; /* maximum number of entries */ unsigned next_eviction; /* which entry is evicted next */ @@ -76,14 +84,6 @@ /* the hash value we use for unoccupied */ #define SC_SENTINEL_HASH (-1) -/* recycle bin for APSWStatements to avoid repeated malloc/free calls */ -#define SC_STATEMENT_RECYCLE_BIN_ENTRIES 32 - -#if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 -static APSWStatement *apsw_sc_recycle_bin[SC_STATEMENT_RECYCLE_BIN_ENTRIES]; -static unsigned apsw_sc_recycle_bin_next = 0; -#endif - static int statementcache_free_statement(StatementCache *sc, APSWStatement *s) { @@ -94,12 +94,15 @@ PYSQLITE_SC_CALL(res = sqlite3_finalize(s->vdbestatement)); #if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 - if (apsw_sc_recycle_bin_next + 1 < SC_STATEMENT_RECYCLE_BIN_ENTRIES) - apsw_sc_recycle_bin[apsw_sc_recycle_bin_next++] = s; + if (sc->recycle_bin_next + 1 < SC_STATEMENT_RECYCLE_BIN_ENTRIES) + { + sc->recycle_bin[sc->recycle_bin_next++] = s; + } else #endif - + { PyMem_Free(s); + } return res; } @@ -160,6 +163,28 @@ return res; } +static Py_hash_t +apsw_hash_bytes(void *data, Py_ssize_t nbytes) +{ + /* This is the same algorithm as fts3StrHash from the SQLite source + so it is battle tested. There is also strhash in SQLite showing + an algorithm from Knuth but that one has the problem of being + 32 bit specific and we do 64 bit mostly. */ + + const unsigned char *cdata = (const unsigned char *)data; + + /* unsigned must be used because signed overflow is undefined behaviour*/ + Py_uhash_t hash = 0; + + while (nbytes > 0) + { + hash = (hash << 3) ^ hash ^ *cdata; + cdata++; + nbytes--; + } + return (Py_hash_t)hash; +} + static int statementcache_prepare_internal(StatementCache *sc, const char *utf8, Py_ssize_t utf8size, PyObject *query, APSWStatement **statement_out, APSWStatementOptions *options) { @@ -174,11 +199,8 @@ if (sc->maxentries && utf8size < SC_MAX_ITEM_SIZE && options->can_cache) { unsigned i; -#ifdef PYPY_VERSION - hash = utf8size; -#else - hash = _Py_HashBytes(utf8, utf8size); -#endif + hash = apsw_hash_bytes((void*)utf8, utf8size); + for (i = 0; i <= sc->highest_used; i++) { if (sc->hashes[i] == hash && sc->caches[i]->utf8_size == utf8size && 0 == memcmp(utf8, sc->caches[i]->utf8, utf8size) && 0 == memcmp(&sc->caches[i]->options, options, sizeof(APSWStatementOptions))) @@ -255,8 +277,8 @@ } #if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 - if (apsw_sc_recycle_bin_next) - statement = apsw_sc_recycle_bin[--apsw_sc_recycle_bin_next]; + if (sc->recycle_bin_next) + statement = sc->recycle_bin[--sc->recycle_bin_next]; else #endif { @@ -371,6 +393,15 @@ } } PyMem_Free(sc->caches); +#if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 + while(sc->recycle_bin_next > 0) + { + /* PyMem_Free evaluates its arguments multiple times at the preprocessor level + which leads to bizarre errors when these two lines are combined */ + PyMem_Free(sc->recycle_bin[sc->recycle_bin_next - 1]); + sc->recycle_bin_next--; + } +#endif PyMem_Free(sc); } } @@ -458,15 +489,4 @@ Py_XDECREF(res); Py_XDECREF(entry); return NULL; -} - -#ifdef APSW_TESTFIXTURES -static void -statementcache_fini(void) -{ -#if SC_STATEMENT_RECYCLE_BIN_ENTRIES > 0 - while (apsw_sc_recycle_bin_next) - PyMem_Free(apsw_sc_recycle_bin[apsw_sc_recycle_bin_next--]); -#endif -} -#endif \ No newline at end of file +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/tools/checksums.py new/apsw-3.45.3.0/tools/checksums.py --- old/apsw-3.45.2.0/tools/checksums.py 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/tools/checksums.py 2024-04-16 17:00:14.000000000 +0200 @@ -11,6 +11,7 @@ import setup sqlitevers = ( + '3450300', '3450200', '3450100', '3450000', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/apsw-3.45.2.0/tools/megatest.py new/apsw-3.45.3.0/tools/megatest.py --- old/apsw-3.45.2.0/tools/megatest.py 2024-03-12 17:38:50.000000000 +0100 +++ new/apsw-3.45.3.0/tools/megatest.py 2024-04-16 17:00:14.000000000 +0200 @@ -205,16 +205,16 @@ # Default versions we support PYVERS = ( - '3.13.0a4', - '3.12.2', - '3.11.8', + '3.13.0a6', + '3.12.3', + '3.11.9', '3.10.13', '3.9.18', '3.8.18', 'system', ) -SQLITEVERS = ('3.44.0', '3.44.1', '3.44.2', '3.45.0', '3.45.1', '3.45.2') +SQLITEVERS = ('3.44.0', '3.44.1', '3.44.2', '3.45.0', '3.45.1', '3.45.2', '3.45.2') BITS = (64, 32)