diff --git a/Logbook-1.5.3.tar.gz b/Logbook-1.5.3.tar.gz deleted file mode 100644 index f63687e..0000000 --- a/Logbook-1.5.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:66f454ada0f56eae43066f604a222b09893f98c1adc18df169710761b8f32fe8 -size 85783 diff --git a/Logbook-1.6.0.tar.gz b/Logbook-1.6.0.tar.gz new file mode 100644 index 0000000..618be92 --- /dev/null +++ b/Logbook-1.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a50a0cb1fdd0f58c8cc0ac252bb1683e63caa49872b77c3812cde5d3db73d97f +size 367395 diff --git a/deal-with-missing-socket.patch b/deal-with-missing-socket.patch deleted file mode 100644 index 29de111..0000000 --- a/deal-with-missing-socket.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: Logbook-1.5.3/logbook/queues.py -=================================================================== ---- Logbook-1.5.3.orig/logbook/queues.py -+++ Logbook-1.5.3/logbook/queues.py -@@ -229,7 +229,8 @@ class ZeroMQHandler(Handler): - self.export_record(record)).encode("utf-8")) - - def close(self, linger=-1): -- self.socket.close(linger) -+ if hasattr(self, 'socket'): -+ self.socket.close(linger) - - def __del__(self): - # When the Handler is deleted we must close our socket in a diff --git a/logbook-pr316-sqlalchemy-count.patch b/logbook-pr316-sqlalchemy-count.patch deleted file mode 100644 index 30e5df5..0000000 --- a/logbook-pr316-sqlalchemy-count.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d7ab99aaf12169dfa8092502a155273cfe483738 Mon Sep 17 00:00:00 2001 -From: Ben Greiner -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 7321fa32..4f94ab8e 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): diff --git a/python-Logbook.changes b/python-Logbook.changes index fee07e9..0b7a4d2 100644 --- a/python-Logbook.changes +++ b/python-Logbook.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Sep 29 12:54:51 UTC 2023 - Ondřej Súkup + +- update to 1.6.0 + * Supports SQLAlchemy 1.4 and 2.0. + * Fix various deprecation warnings. + * exc_info arg may be a BaseException instance + * FileHandler supports path-like objects. + * Fixed bug which prevented compilation on Cython 3 + * Wheels are generated for more platforms and architectures + ------------------------------------------------------------------- Sun Aug 13 21:19:10 UTC 2023 - Dirk Müller diff --git a/python-Logbook.spec b/python-Logbook.spec index 4b7f37e..b21367f 100644 --- a/python-Logbook.spec +++ b/python-Logbook.spec @@ -17,35 +17,33 @@ Name: python-Logbook -Version: 1.5.3 +Version: 1.6.0 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 logbook-pr316-sqlalchemy-count.patch -- gh#getlogbook/logbook#316 -Patch1: https://github.com/getlogbook/logbook/pull/316.patch#/logbook-pr316-sqlalchemy-count.patch -Patch2: deal-with-missing-socket.patch BuildRequires: %{python_module Brotli} -BuildRequires: %{python_module Cython with %python-Cython < 3} +BuildRequires: %{python_module Cython} BuildRequires: %{python_module Jinja2} -BuildRequires: %{python_module SQLAlchemy < 2} +BuildRequires: %{python_module SQLAlchemy} BuildRequires: %{python_module devel} BuildRequires: %{python_module execnet >= 1.0.9} BuildRequires: %{python_module gevent} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pytest >= 4.0} +BuildRequires: %{python_module pytest >= 6.0} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pyzmq} BuildRequires: %{python_module redis} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: dos2unix BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: redis BuildRequires: util-linux Recommends: python-Jinja2 -Recommends: python-SQLAlchemy < 2 +Recommends: python-SQLAlchemy Recommends: python-execnet >= 1.0.9 Recommends: python-gevent Recommends: python-pyzmq @@ -61,26 +59,23 @@ dos2unix LICENSE %build export CFLAGS="%{optflags} -fno-strict-aliasing" -%{python_expand cython-%{$python_version} logbook/_speedups.pyx -%{$python_build} -rm logbook/_speedups.c -} +%pyproject_wheel %install -%python_install %python_expand %fdupes %{buildroot}%{$python_sitearch} +%pyproject_install %check export CFLAGS="%{optflags}" %{_sbindir}/redis-server & # test_asyncio_context_management seems to fail in OBS -%pytest -k 'not test_asyncio_context_management' +%pytest_arch -k 'not test_asyncio_context_management' kill %%1 %files %{python_files} %license LICENSE %doc CHANGES %{python_sitearch}/logbook -%{python_sitearch}/Logbook-%{version}-*-info +%{python_sitearch}/Logbook-%{version}*-info %changelog