Sync from SUSE:SLFO:Main python-coloredlogs revision dc9499fa4e95a3b90e74b356e1f77b5a
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
|
BIN
coloredlogs-15.0.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
coloredlogs-15.0.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
142
python-coloredlogs.changes
Normal file
142
python-coloredlogs.changes
Normal file
@@ -0,0 +1,142 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 30 02:59:26 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-python-313.patch:
|
||||
* No longer use now-removed pipes module.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:23:28 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 14 12:01:30 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Switch to single spec version build for PSP
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 9 09:26:40 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- python-mock is actually not needed for build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 27 11:16:51 UTC 2021 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Fix build error for Leap.
|
||||
- Set right versions to BuildRequires and Requires.
|
||||
- Disable python2 and python36 because End of support.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 16 13:00:38 UTC 2021 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to 15.0.1
|
||||
- Bug fix: Restore :class:`.StandardErrorHandler` functionality
|
||||
- The :class:`.StandardErrorHandler` class is responsible for dynamically
|
||||
resolving (looking up the value of) sys.stderr for each logged message instead
|
||||
of once when :func:`coloredlogs.install()` is called.
|
||||
- This was unintentionally broken by changes in `release 14.1`_.
|
||||
- _Release 15.0.1: https://github.com/xolox/python-coloredlogs/compare/15.0...15.0.1
|
||||
- Update to 15.0
|
||||
- Don't enable system logging on MacOS and Windows anymore.
|
||||
- This is backwards incompatible (which is why I'm bumping the major version
|
||||
number) however the old behavior has been reported to be rather problematic
|
||||
(see :func:`~coloredlogs.syslog.is_syslog_supported()` for details) so this
|
||||
seems like the best choice.
|
||||
- _Release 15.0: https://github.com/xolox/python-coloredlogs/compare/14.2...15.0
|
||||
- Update to 14.3
|
||||
* Merged pull request `#89`_ which enhances :func:`coloredlogs.install()` to
|
||||
preserve the filters on handlers that are replaced by :pypi:`coloredlogs`.
|
||||
* _Release 14.3: https://github.com/xolox/python-coloredlogs/compare/14.2...14.3
|
||||
* _#89: https://github.com/xolox/python-coloredlogs/pull/89
|
||||
- Update to 14.2
|
||||
* Honor the ``$NO_COLOR`` environment variable as suggested in issue `#88`_.
|
||||
* _Release 14.2: https://github.com/xolox/python-coloredlogs/compare/14.1...14.2
|
||||
* _#88: https://github.com/xolox/python-coloredlogs/issues/88
|
||||
- Update to 14.1
|
||||
**Bug fixes:**
|
||||
- Don't allow interactive terminal detection to disable colored text when
|
||||
colored text is being forced by the caller (reported in issue `#84`_).
|
||||
- Automatically disable colored text when logging output is being redirected to
|
||||
a file in such a way that it actually works 😬 (reported in issue `#100`_).
|
||||
**Other changes:**
|
||||
- Start testing on PyPy 3 (because why not?)
|
||||
- _Release 14.1: https://github.com/xolox/python-coloredlogs/compare/14.0...14.1
|
||||
- _#84: https://github.com/xolox/python-coloredlogs/issues/84
|
||||
- _#100: https://github.com/xolox/python-coloredlogs/issues/100
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 1 07:23:57 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Fix minimum dependency version of python-humanfriendly
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 1 11:52:27 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Update to 14.0
|
||||
* Merged pull request `#80`_ that drops support for Python 3.4 which
|
||||
has gone end-of-life and now represents less than 1% of PyPI downloads.
|
||||
* Improved compatibility with the Python standard library by changing
|
||||
the order of positional arguments received by the initializer of the
|
||||
:class:`~coloredlogs.ColoredFormatter` class (as suggested in `#64`_
|
||||
and `#75`_).
|
||||
* Add support for the ``%(username)s`` field (requested in `#76`_) and properly
|
||||
document supported custom fields.
|
||||
* Consistently use ``console`` highlighting in documentation.
|
||||
* Fix a broken link in the readme.
|
||||
* Merge pull request `#79`_ which adds support for Python 3.8.
|
||||
* Fix support for custom log record factories and add a test to avoid
|
||||
regressions (`#47`_, `#59`_).
|
||||
* Change ``make screenshots`` to be Python 3 compatible and document
|
||||
additional requirements (`#65`_).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 15 08:30:15 CET 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Update to 11.0:
|
||||
- This is a maintenance release that drops Python 2.6 support,
|
||||
adds Python 3.7 support and merges quite a few minor pull
|
||||
requests. The major version number was bumped because of the
|
||||
compatibility changes.
|
||||
Complete list of (really small) changes is on
|
||||
https://github.com/xolox/python-coloredlogs/blob/master/CHANGELOG.rst#release-11-0-2020-02-14
|
||||
- Update test_cli_conversion_test.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 3 14:04:05 UTC 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add test_cli_conversion_test.patch, because we don't have versionless
|
||||
coloredlogs in time of %check.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 14 15:16:19 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Disable one flaky test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 4 12:46:45 UTC 2018 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Remove superfluous devel dependency for noarch package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 21 08:34:11 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Version update to 10.0:
|
||||
* Many upstream changes to enumerate, see CHANGELOG.rst
|
||||
- Enable testsuite
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 3 14:07:08 UTC 2018 - toddrme2178@gmail.com
|
||||
|
||||
- Use %license tag
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 6 18:00:41 UTC 2017 - toddrme2178@gmail.com
|
||||
|
||||
- Update to version 7.3
|
||||
* No changelog
|
||||
- Implement single-spec version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 10 20:41:08 UTC 2016 - mardnh@gmx.de
|
||||
|
||||
- initial package, version 5.1.1
|
89
python-coloredlogs.spec
Normal file
89
python-coloredlogs.spec
Normal file
@@ -0,0 +1,89 @@
|
||||
#
|
||||
# spec file for package python-coloredlogs
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-coloredlogs
|
||||
Version: 15.0.1
|
||||
Release: 0
|
||||
Summary: Colored terminal output for Python's logging module
|
||||
License: MIT
|
||||
URL: https://github.com/xolox/python-coloredlogs
|
||||
Source: https://files.pythonhosted.org/packages/source/c/coloredlogs/coloredlogs-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE test_cli_conversion_test.patch mcepl@suse.com
|
||||
# With using alternatives, we don't have versionless command in time of %%check
|
||||
Patch0: test_cli_conversion_test.patch
|
||||
# PATCH-FIX-UPSTREAM gh#xolox/python-coloredlogs#120
|
||||
Patch1: support-python-313.patch
|
||||
BuildRequires: %{python_module capturer >= 2.4}
|
||||
BuildRequires: %{python_module humanfriendly >= 9.1}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest >= 3.0.3}
|
||||
BuildRequires: %{python_module pytest-cov >= 2.3.1}
|
||||
BuildRequires: %{python_module verboselogs >= 1.7}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-capturer >= 2.4
|
||||
Requires: python-humanfriendly >= 9.1
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Recommends: python-verboselogs >= 1.7
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
The `coloredlogs` package enables colored terminal output for Python's logging_
|
||||
module. The ColoredFormatter_ class inherits from `logging.Formatter`_ and uses
|
||||
`ANSI escape sequences`_ to render your logging messages in color. It uses only
|
||||
standard colors so it should work on any UNIX terminal. It's currently tested
|
||||
on Python 2.6, 2.7, 3.4, 3.5 and PyPy. On Windows `coloredlogs` automatically
|
||||
pulls in Colorama_ as a dependency and enables ANSI escape sequence translation
|
||||
using Colorama.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n coloredlogs-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/coloredlogs
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%post
|
||||
%python_install_alternative coloredlogs
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative coloredlogs
|
||||
|
||||
%check
|
||||
# test_auto_install - requires the install to the system to be actually complete
|
||||
export PATH=%{buildroot}%{_bindir}:$PATH
|
||||
%pytest coloredlogs/tests.py -k 'not test_auto_install'
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst CHANGELOG.rst
|
||||
%license LICENSE.txt
|
||||
%python_alternative %{_bindir}/coloredlogs
|
||||
%{python_sitelib}/coloredlogs/
|
||||
%{python_sitelib}/coloredlogs.pth
|
||||
%{python_sitelib}/coloredlogs-%{version}.dist-info
|
||||
|
||||
%changelog
|
43
support-python-313.patch
Normal file
43
support-python-313.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 9d4f4020897fcf48d381de8e099dc29b53fc9531 Mon Sep 17 00:00:00 2001
|
||||
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||
Date: Wed, 12 Jun 2024 14:00:28 -0400
|
||||
Subject: [PATCH] Replace pipes.quote with shlex.quote on Python 3
|
||||
|
||||
The shlex.quote() API is available from Python 3.3 on; pipes.quote() was
|
||||
never documented, and is removed in Python 3.13.
|
||||
|
||||
Fixes #119.
|
||||
---
|
||||
coloredlogs/converter/__init__.py | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/coloredlogs/converter/__init__.py b/coloredlogs/converter/__init__.py
|
||||
index a424469..96817a0 100644
|
||||
--- a/coloredlogs/converter/__init__.py
|
||||
+++ b/coloredlogs/converter/__init__.py
|
||||
@@ -9,11 +9,15 @@
|
||||
# Standard library modules.
|
||||
import codecs
|
||||
import os
|
||||
-import pipes
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
+try:
|
||||
+ from shlex import quote # Python 3
|
||||
+except ImportError:
|
||||
+ from pipes import quote # Python 2 (removed in 3.13)
|
||||
+
|
||||
# External dependencies.
|
||||
from humanfriendly.terminal import (
|
||||
ANSI_CSI,
|
||||
@@ -75,7 +79,7 @@ def capture(command, encoding='UTF-8'):
|
||||
#
|
||||
# [1] http://man7.org/linux/man-pages/man1/script.1.html
|
||||
# [2] https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/script.1.html
|
||||
- command_line = ['script', '-qc', ' '.join(map(pipes.quote, command)), '/dev/null']
|
||||
+ command_line = ['script', '-qc', ' '.join(map(quote, command)), '/dev/null']
|
||||
script = subprocess.Popen(command_line, stdout=subprocess.PIPE, stderr=dev_null)
|
||||
stdout, stderr = script.communicate()
|
||||
if script.returncode == 0:
|
25
test_cli_conversion_test.patch
Normal file
25
test_cli_conversion_test.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
--- a/coloredlogs/tests.py
|
||||
+++ b/coloredlogs/tests.py
|
||||
@@ -82,6 +82,7 @@ PATTERN_INCLUDING_MILLISECONDS = re.comp
|
||||
\s (?P<message> .* )
|
||||
''', re.VERBOSE)
|
||||
|
||||
+pyver = '.'.join(str(x) for x in sys.version_info[:2])
|
||||
|
||||
def setUpModule():
|
||||
"""Speed up the tests by disabling the demo's artificial delay."""
|
||||
@@ -505,7 +506,8 @@ class ColoredLogsTestCase(TestCase):
|
||||
|
||||
def test_cli_conversion(self):
|
||||
"""Test the command line HTML conversion."""
|
||||
- output = main('coloredlogs', '--convert', 'coloredlogs', '--demo', capture=True)
|
||||
+ output = main('coloredlogs-{}'.format(pyver), '--convert',
|
||||
+ 'coloredlogs-{}'.format(pyver), '--demo', capture=True)
|
||||
# Make sure the output is encoded as HTML.
|
||||
assert '<span' in output
|
||||
|
||||
@@ -588,3 +590,4 @@ def cleanup_handlers():
|
||||
handler, logger = find_handler(logging.getLogger(), match_func)
|
||||
if handler and logger:
|
||||
logger.removeHandler(handler)
|
||||
+
|
Reference in New Issue
Block a user