14
0

Accepting request 1095703 from devel:languages:python

- Add patch deal-with-missing-socket.patch
- Pin SQLAlchemy < 2, this requires 1.4
- Stop using greedy globs in %files
- Light spring cleaning of the spec file.
- Refresh patch from GitHub, the short shas gained one character.

OBS-URL: https://build.opensuse.org/request/show/1095703
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Logbook?expand=0&rev=9
This commit is contained in:
2023-06-28 19:33:13 +00:00
committed by Git OBS Bridge
4 changed files with 30 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
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

View File

@@ -8,7 +8,7 @@ Subject: [PATCH] replace removed SQLAlchemy Table.count() method
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/logbook/ticketing.py b/logbook/ticketing.py
index 7321fa3..4f94ab8 100644
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):

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jun 28 03:27:42 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch deal-with-missing-socket.patch
- Pin SQLAlchemy < 2, this requires 1.4
- Stop using greedy globs in %files
- Light spring cleaning of the spec file.
- Refresh patch from GitHub, the short shas gained one character.
-------------------------------------------------------------------
Fri May 7 18:20:13 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-Logbook
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,8 +16,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-Logbook
Version: 1.5.3
Release: 0
@@ -27,10 +25,11 @@ 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}
BuildRequires: %{python_module Jinja2}
BuildRequires: %{python_module SQLAlchemy}
BuildRequires: %{python_module SQLAlchemy < 2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module execnet >= 1.0.9}
BuildRequires: %{python_module gevent}
@@ -46,14 +45,11 @@ BuildRequires: python-rpm-macros
BuildRequires: redis
BuildRequires: util-linux
Recommends: python-Jinja2
Recommends: python-SQLAlchemy
Recommends: python-SQLAlchemy < 2
Recommends: python-execnet >= 1.0.9
Recommends: python-gevent
Recommends: python-pyzmq
Recommends: python-redis
%if %{with python2}
BuildRequires: python-mock
%endif
%python_subpackages
%description
@@ -84,6 +80,7 @@ kill %%1
%files %{python_files}
%license LICENSE
%doc CHANGES
%{python_sitearch}/*
%{python_sitearch}/logbook
%{python_sitearch}/Logbook-%{version}-*-info
%changelog