14
0
forked from pool/python-loguru
Files
python-loguru/python-loguru.spec
Matej Cepl aed181b600 Accepting request 993287 from home:bnavigator:branches:devel:languages:python
- Update to 0.6.0
  * Remove internal use of pickle.loads() considered as a security
    vulnerability referenced as CVE-2022-0329 (#563).
  * Modify coroutine sink to make it discard log messages when
    loop=None and no event loop is running (due to internally using
    asyncio.get_running_loop() in place of
    asyncio.get_event_loop()).
  * Remove the possibility to add a coroutine sink with
    enqueue=True if loop=None and no event loop is running.
  * Change default encoding of file sink to be utf8 instead of
    locale.getpreferredencoding() (#339).
  * Prevent non-ascii characters to be escaped while logging JSON
    message with serialize=True (#575, thanks @ponponon).
  * Fix flake8 errors and improve code readability (#353, thanks
    @AndrewYakimets).
- Drop merged patches:
  * loguru-exception-formatting-py39.patch
  * pytest-6.2-excepthooks.patch
- Add loguru-fix-repr-tests.patch
  * Fix "repr()" tests failing on Python 3.11 and Python 3.10.6
  * https://github.com/Delgan/loguru/commit/4fe21f66

OBS-URL: https://build.opensuse.org/request/show/993287
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-loguru?expand=0&rev=15
2022-08-05 13:19:57 +00:00

74 lines
2.3 KiB
RPMSpec

#
# spec file for package python-loguru
#
# Copyright (c) 2022 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-loguru
Version: 0.6.0
Release: 0
Summary: Python logging component with a simple interface
License: MIT
Group: Development/Languages/Python
URL: https://github.com/Delgan/loguru
Source: https://files.pythonhosted.org/packages/source/l/loguru/loguru-%{version}.tar.gz
# PATCH-FIX-UPSTREAM loguru-fix-repr-tests.patch https://github.com/Delgan/loguru/commit/4fe21f6 -- Fix "repr()" tests failing on Python 3.11 and Python 3.10.6
Patch1: loguru-fix-repr-tests.patch
BuildRequires: %{python_module aiocontextvars if %python-base < 3.7}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if 0%{?python_version_nodots} < 37
Requires: python-aiocontextvars
%endif
Recommends: python-colorama
BuildArch: noarch
%python_subpackages
%description
Python logging component providing a single object
which dispatches log messages to configured handlers.
%prep
%autosetup -p1 -n loguru-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
if [ $(getconf LONG_BIT) = 32 ]; then
# Threads have different references on 32-bit
donttest=" or (test_log_formatters and thread and not thread.name)"
fi
%pytest -k "not (donttestexprprefixdummy $donttest)"
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/loguru
%{python_sitelib}/loguru-%{version}*-info
%changelog