Accepting request 1139803 from home:bnavigator:branches:devel:languages:python
- 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 OBS-URL: https://build.opensuse.org/request/show/1139803 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-logutils?expand=0&rev=13
This commit is contained in:
parent
1e34c23c77
commit
9242be7748
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>
|
Fri Feb 17 12:31:27 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-logutils
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-logutils
|
Name: python-logutils
|
||||||
Version: 0.3.5
|
Version: 0.3.5
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -26,8 +25,13 @@ Group: Development/Languages/Python
|
|||||||
URL: https://logutils.readthedocs.io/
|
URL: https://logutils.readthedocs.io/
|
||||||
Source: https://files.pythonhosted.org/packages/source/l/logutils/logutils-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/l/logutils/logutils-%{version}.tar.gz
|
||||||
Patch0: sphinx4.patch
|
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 redis}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
BuildRequires: redis
|
BuildRequires: redis
|
||||||
@ -64,11 +68,15 @@ This package contains the documentation.
|
|||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
cd doc && make html
|
pushd doc
|
||||||
|
make html
|
||||||
|
rm _build/html/.buildinfo
|
||||||
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export PATH="$PATH:/sbin:/usr/sbin"
|
export PATH="$PATH:/sbin:/usr/sbin"
|
||||||
@ -77,7 +85,8 @@ export PATH="$PATH:/sbin:/usr/sbin"
|
|||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc NEWS.txt README.rst
|
%doc NEWS.txt README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/logutils
|
||||||
|
%{python_sitelib}/logutils-%{version}.dist-info
|
||||||
|
|
||||||
%files -n python-logutils-doc
|
%files -n python-logutils-doc
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user