Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Logbook for openSUSE:Factory 
checked in at 2021-05-12 19:31:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Logbook (Old)
 and      /work/SRC/openSUSE:Factory/.python-Logbook.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Logbook"

Wed May 12 19:31:15 2021 rev:8 rq:891394 version:1.5.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Logbook/python-Logbook.changes    
2020-03-27 00:23:44.376209458 +0100
+++ /work/SRC/openSUSE:Factory/.python-Logbook.new.2988/python-Logbook.changes  
2021-05-12 19:31:20.071260084 +0200
@@ -1,0 +2,6 @@
+Fri May  7 18:20:13 UTC 2021 - Ben Greiner <[email protected]>
+
+- Add logbook-pr316-sqlalchemy-count.patch for compatibility with
+  SQLAlchemy 1.4 -- gh#getlogbook/logbook#316
+
+-------------------------------------------------------------------

New:
----
  logbook-pr316-sqlalchemy-count.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Logbook.spec ++++++
--- /var/tmp/diff_new_pack.o0CTXM/_old  2021-05-12 19:31:20.631257596 +0200
+++ /var/tmp/diff_new_pack.o0CTXM/_new  2021-05-12 19:31:20.635257579 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Logbook
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@
 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 logbook-pr316-sqlalchemy-count.patch -- 
gh#getlogbook/logbook#316
+Patch1:         
https://github.com/getlogbook/logbook/pull/316.patch#/logbook-pr316-sqlalchemy-count.patch
 BuildRequires:  %{python_module Brotli}
 BuildRequires:  %{python_module Cython}
 BuildRequires:  %{python_module Jinja2}
@@ -58,7 +60,7 @@
 An alternative logging implementation for python.
 
 %prep
-%setup -q -n Logbook-%{version}
+%autosetup -p1 -n Logbook-%{version}
 dos2unix LICENSE
 
 %build

++++++ logbook-pr316-sqlalchemy-count.patch ++++++
>From d7ab99aaf12169dfa8092502a155273cfe483738 Mon Sep 17 00:00:00 2001
From: Ben Greiner <[email protected]>
Date: Fri, 7 May 2021 20:16:45 +0200
Subject: [PATCH] replace removed SQLAlchemy Table.count() method

---
 logbook/ticketing.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/logbook/ticketing.py b/logbook/ticketing.py
index 7321fa3..4f94ab8 100644
--- a/logbook/ticketing.py
+++ b/logbook/ticketing.py
@@ -243,7 +243,10 @@ def record_ticket(self, record, data, hash, app_id):
 
     def count_tickets(self):
         """Returns the number of tickets."""
-        return self.engine.execute(self.tickets.count()).fetchone()[0]
+        from sqlalchemy import select, func
+
+        count_stmt = select([func.count()]).select_from(self.tickets)
+        return self.engine.execute(count_stmt).fetchone()[0]
 
     def get_tickets(self, order_by='-last_occurrence_time', limit=50,
                     offset=0):

Reply via email to