1
0

- Add patch logutils-intersphinx.patch to fix compatibility

with recent Sphinx

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-logutils?expand=0&rev=15
This commit is contained in:
Markéta Machová 2024-09-06 09:42:09 +00:00 committed by Git OBS Bridge
commit 490b821029
8 changed files with 269 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
logutils-0.3.5.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc058a25d5c209461f134e1f03cab637d66a7a5ccc12e593db56fbb279899a82
size 27703

View File

@ -0,0 +1,20 @@
From 28565675eea39b1b1def8cd6706b0a9556f7e505 Mon Sep 17 00:00:00 2001
From: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Date: Thu, 15 Jun 2023 16:13:41 +0100
Subject: [PATCH] Add Read The Docs configuration.
---
diff --git a/doc/conf.py b/doc/conf.py
index afdd641..04e02eb 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -194,6 +194,4 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {
- 'http://docs.python.org/dev': None,
-}
+intersphinx_mapping = {'python': ('http://docs.python.org/', None)}
--
2.46.0

View 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

54
python-logutils.changes Normal file
View File

@ -0,0 +1,54 @@
-------------------------------------------------------------------
Thu Sep 5 18:08:30 UTC 2024 - Christoph G <foss@grueninger.de>
- Add patch logutils-intersphinx.patch to fix compatibility
with recent Sphinx
-------------------------------------------------------------------
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>
- update path for SLE15
-------------------------------------------------------------------
Wed Sep 1 12:28:43 UTC 2021 - pgajdos@suse.com
- %check: use %pyunittest rpm macro
-------------------------------------------------------------------
Sat Jun 5 19:05:36 UTC 2021 - Dirk Müller <dmueller@suse.com>
- add sphinx4.patch to enable build with Sphinx 4.x
-------------------------------------------------------------------
Tue Dec 4 12:50:10 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Thu Jun 29 16:53:49 UTC 2017 - tbechtold@suse.com
- update to 0.3.5:
- Bring QueueListener implementation in line with the version in the stdlib.
- Fixed a bug in ColorizingStreamHandler relating to encoding.
- Return non-zero error code from "setup.py test" when a test fails.
- Make the dictConfig tests work with both Python 2.x and 3.x.
- convert to singlespec
- fix Source url
- split -doc package
- update Url
-------------------------------------------------------------------
Thu Jul 18 09:02:19 UTC 2013 - speilicke@suse.com
- Initial version

97
python-logutils.spec Normal file
View File

@ -0,0 +1,97 @@
#
# spec file for package python-logutils
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-logutils
Version: 0.3.5
Release: 0
Summary: Logging utilities
License: BSD-3-Clause
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
# PATCH-FIX-UPSTREA logutils-intersphinx.patch
Patch2: logutils-intersphinx.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
BuildArch: noarch
%python_subpackages
%description
The logutils package provides a set of handlers for the Python standard
library's logging package.
Some of these handlers are out-of-scope for the standard library, and
so they are packaged here. Others are updated versions which have
appeared in recent Python releases, but are usable with older versions
of Python and so are packaged here.
%package -n python-logutils-doc
Summary: Documentation for %{name}
Group: Documentation/Other
Provides: %{python_module logutils-doc = %{version}}
%description -n python-logutils-doc
The logutils package provides a set of handlers for the Python standard
library's logging package.
Some of these handlers are out-of-scope for the standard library, and
so they are packaged here. Others are updated versions which have
appeared in recent Python releases, but are usable with older versions
of Python and so are packaged here.
This package contains the documentation.
%prep
%setup -q -n logutils-%{version}
%autopatch -p1
%build
%pyproject_wheel
pushd doc
make html
rm _build/html/.buildinfo
popd
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export PATH="$PATH:/sbin:/usr/sbin"
%pyunittest discover -v tests
%files %{python_files}
%license LICENSE.txt
%doc NEWS.txt README.rst
%{python_sitelib}/logutils
%{python_sitelib}/logutils-%{version}.dist-info
%files -n python-logutils-doc
%license LICENSE.txt
%doc doc/_build/html
%changelog

15
sphinx4.patch Normal file
View File

@ -0,0 +1,15 @@
Index: logutils-0.3.5/doc/conf.py
===================================================================
--- logutils-0.3.5.orig/doc/conf.py
+++ logutils-0.3.5/doc/conf.py
@@ -171,8 +171,8 @@ htmlhelp_basename = 'Logutilsdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', 'Logutils.tex', ur'Logutils Documentation',
- ur'Vinay Sajip', 'manual'),
+ ('index', 'Logutils.tex', 'Logutils Documentation',
+ 'Vinay Sajip', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of