forked from pool/python-Logbook
Accepting request 1114339 from home:mimi_vx:branches:devel:languages:python
- 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 OBS-URL: https://build.opensuse.org/request/show/1114339 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Logbook?expand=0&rev=26
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:66f454ada0f56eae43066f604a222b09893f98c1adc18df169710761b8f32fe8
|
||||
size 85783
|
3
Logbook-1.6.0.tar.gz
Normal file
3
Logbook-1.6.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a50a0cb1fdd0f58c8cc0ac252bb1683e63caa49872b77c3812cde5d3db73d97f
|
||||
size 367395
|
@@ -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
|
@@ -1,25 +0,0 @@
|
||||
From d7ab99aaf12169dfa8092502a155273cfe483738 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Greiner <code@bnavigator.de>
|
||||
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):
|
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 29 12:54:51 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user