From 61304f397356eb69c41cc980681a3cab5d00b68377602481d43456aab0c24dee Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 19 Mar 2025 23:35:52 +0000 Subject: [PATCH] - Update to 1.8.1: * Fixed crash on Python 3.12+ in speedups extension module. - Drop patch use-pydict-size.patch, included upstream. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Logbook?expand=0&rev=35 --- logbook-1.8.0.tar.gz | 3 --- logbook-1.8.1.tar.gz | 3 +++ python-Logbook.changes | 7 +++++++ python-Logbook.spec | 4 +--- use-pydict-size.patch | 36 ------------------------------------ 5 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 logbook-1.8.0.tar.gz create mode 100644 logbook-1.8.1.tar.gz delete mode 100644 use-pydict-size.patch diff --git a/logbook-1.8.0.tar.gz b/logbook-1.8.0.tar.gz deleted file mode 100644 index 6be1767..0000000 --- a/logbook-1.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:487fa41539787bfa21a51fabd7f3ae8ae7f9e6679bb3e241d0f5f18a2fc37e9c -size 368000 diff --git a/logbook-1.8.1.tar.gz b/logbook-1.8.1.tar.gz new file mode 100644 index 0000000..0d23e07 --- /dev/null +++ b/logbook-1.8.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:221e6f884f035fffd77935802ab47dc0a3aa7c833010cd7b51354649a7eb462d +size 368031 diff --git a/python-Logbook.changes b/python-Logbook.changes index cf6b921..9322935 100644 --- a/python-Logbook.changes +++ b/python-Logbook.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 19 23:35:22 UTC 2025 - Steve Kowalik + +- Update to 1.8.1: + * Fixed crash on Python 3.12+ in speedups extension module. +- Drop patch use-pydict-size.patch, included upstream. + ------------------------------------------------------------------- Thu Mar 6 04:05:59 UTC 2025 - Steve Kowalik diff --git a/python-Logbook.spec b/python-Logbook.spec index f7e4971..684b844 100644 --- a/python-Logbook.spec +++ b/python-Logbook.spec @@ -17,14 +17,12 @@ Name: python-Logbook -Version: 1.8.0 +Version: 1.8.1 Release: 0 Summary: A logging replacement for Python License: BSD-3-Clause URL: https://github.com/getlogbook/logbook Source: https://files.pythonhosted.org/packages/source/l/logbook/logbook-%{version}.tar.gz -# PATCH-FIX-UPSTREAM gh#getlogbook/logbook#413 -Patch0: use-pydict-size.patch BuildRequires: %{python_module Brotli} BuildRequires: %{python_module Cython} BuildRequires: %{python_module Jinja2} diff --git a/use-pydict-size.patch b/use-pydict-size.patch deleted file mode 100644 index 49ea758..0000000 --- a/use-pydict-size.patch +++ /dev/null @@ -1,36 +0,0 @@ -From db82f93b90b15794fdc720c98eda07bdd273c260 Mon Sep 17 00:00:00 2001 -From: Steve Kowalik -Date: Thu, 6 Mar 2025 14:56:42 +1100 -Subject: [PATCH] Use PyDict methods in ContextStackManager - -With Python 3.12+, calling PyList_GET_SIZE on a dict object results in an -assertion error followed by an abort. Correct this by using PyDict_Size -on the cache object. ---- - src/cython/speedups.pyx | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/cython/speedups.pyx b/src/cython/speedups.pyx -index a4bb55a..3741403 100644 ---- a/src/cython/speedups.pyx -+++ b/src/cython/speedups.pyx -@@ -21,8 +21,8 @@ from logbook.concurrency import ( - thread_local, - ) - --from cpython.dict cimport PyDict_Clear, PyDict_SetItem --from cpython.list cimport PyList_Append, PyList_GET_SIZE, PyList_Sort -+from cpython.dict cimport PyDict_Clear, PyDict_SetItem, PyDict_Size -+from cpython.list cimport PyList_Append, PyList_Sort - from cpython.pythread cimport ( - WAIT_LOCK, - PyThread_acquire_lock, -@@ -218,7 +218,7 @@ cdef class ContextStackManager: - - objects = self._cache.get(tid) - if objects is None: -- if PyList_GET_SIZE(self._cache) > _MAX_CONTEXT_OBJECT_CACHE: -+ if PyDict_Size(self._cache) > _MAX_CONTEXT_OBJECT_CACHE: - PyDict_Clear(self._cache) - objects = self._global[:] - objects.extend(getattr(self._thread_context, 'stack', ()))