Accepting request 1139872 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1139872 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-logutils?expand=0&rev=9
This commit is contained in:
commit
cde81978fa
56
logutils-pr1-fix-testasserts-py3.12.patch
Normal file
56
logutils-pr1-fix-testasserts-py3.12.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 0a3af211128567c437e68261a02591ffe2682d95 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
||||
Date: Thu, 6 Jan 2022 15:35:16 +0200
|
||||
Subject: [PATCH] Fix tests for Python 3.11 using teyit
|
||||
|
||||
---
|
||||
tests/test_colorize.py | 2 +-
|
||||
tests/test_dictconfig.py | 12 ++++++++----
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/test_colorize.py b/tests/test_colorize.py
|
||||
index b4f9fa6..b1a34b6 100644
|
||||
--- a/tests/test_colorize.py
|
||||
+++ b/tests/test_colorize.py
|
||||
@@ -33,7 +33,7 @@ class ColorizeTest(unittest.TestCase):
|
||||
try:
|
||||
logger.warning(u('Some unicode string'))
|
||||
logfile_handle.seek(0)
|
||||
- self.assertTrue('Some unicode string' in logfile_handle.read())
|
||||
+ self.assertIn('Some unicode string', logfile_handle.read())
|
||||
finally:
|
||||
logger.removeHandler(handler)
|
||||
handler.close()
|
||||
diff --git a/tests/test_dictconfig.py b/tests/test_dictconfig.py
|
||||
index 3aee984..0cf4806 100644
|
||||
--- a/tests/test_dictconfig.py
|
||||
+++ b/tests/test_dictconfig.py
|
||||
@@ -568,8 +568,10 @@ class ConfigDictTest(unittest.TestCase):
|
||||
raise RuntimeError()
|
||||
except RuntimeError:
|
||||
logging.exception("just testing")
|
||||
- self.assertEquals(h.formatted[0],
|
||||
- "ERROR:root:just testing\nGot a [RuntimeError]")
|
||||
+ self.assertEqual(
|
||||
+ h.formatted[0],
|
||||
+ 'ERROR:root:just testing\nGot a [RuntimeError]'
|
||||
+ )
|
||||
|
||||
def test_config4a_ok(self):
|
||||
# A config specifying a custom formatter class.
|
||||
@@ -580,8 +582,10 @@ class ConfigDictTest(unittest.TestCase):
|
||||
raise RuntimeError()
|
||||
except RuntimeError:
|
||||
logging.exception("just testing")
|
||||
- self.assertEquals(h.formatted[0],
|
||||
- "ERROR:root:just testing\nGot a [RuntimeError]")
|
||||
+ self.assertEqual(
|
||||
+ h.formatted[0],
|
||||
+ 'ERROR:root:just testing\nGot a [RuntimeError]'
|
||||
+ )
|
||||
|
||||
def test_config5_ok(self):
|
||||
self.test_config1_ok(config=self.config5)
|
||||
--
|
||||
2.42.0
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 18 19:39:04 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Add logutils-pr1-fix-testasserts-py3.12.patch
|
||||
* https://bitbucket.org/vinay.sajip/logutils/pull-requests/1
|
||||
* Fixes the test suite. This package is really old but still
|
||||
half-maintained
|
||||
- Switch to PEP517
|
||||
- Deduplicate files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 17 12:31:27 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-logutils
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-logutils
|
||||
Version: 0.3.5
|
||||
Release: 0
|
||||
@ -26,8 +25,13 @@ Group: Development/Languages/Python
|
||||
URL: https://logutils.readthedocs.io/
|
||||
Source: https://files.pythonhosted.org/packages/source/l/logutils/logutils-%{version}.tar.gz
|
||||
Patch0: sphinx4.patch
|
||||
# PATCH-FIX-UPSTREAM logutils-pr1-fix-testasserts-py3.12.patch https://bitbucket.org/vinay.sajip/logutils/pull-requests/1
|
||||
Patch1: https://bitbucket.org/hugovk/logutils/commits/0a3af211128567c437e68261a02591ffe2682d95/raw#/logutils-pr1-fix-testasserts-py3.12.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module redis}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: redis
|
||||
@ -64,11 +68,15 @@ This package contains the documentation.
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
cd doc && make html
|
||||
%pyproject_wheel
|
||||
pushd doc
|
||||
make html
|
||||
rm _build/html/.buildinfo
|
||||
popd
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
export PATH="$PATH:/sbin:/usr/sbin"
|
||||
@ -77,7 +85,8 @@ export PATH="$PATH:/sbin:/usr/sbin"
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%doc NEWS.txt README.rst
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/logutils
|
||||
%{python_sitelib}/logutils-%{version}.dist-info
|
||||
|
||||
%files -n python-logutils-doc
|
||||
%license LICENSE.txt
|
||||
|
Loading…
Reference in New Issue
Block a user