Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-loguru for openSUSE:Factory 
checked in at 2023-01-28 18:46:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-loguru (Old)
 and      /work/SRC/openSUSE:Factory/.python-loguru.new.32243 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-loguru"

Sat Jan 28 18:46:12 2023 rev:9 rq:1061762 version:0.6.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-loguru/python-loguru.changes      
2022-08-10 17:12:24.357567978 +0200
+++ /work/SRC/openSUSE:Factory/.python-loguru.new.32243/python-loguru.changes   
2023-01-28 19:01:45.076195870 +0100
@@ -1,0 +2,5 @@
+Sat Jan 28 16:10:06 UTC 2023 - Dirk Müller <[email protected]>
+
+- add python311.patch to fix build with python 3.11
+
+-------------------------------------------------------------------

New:
----
  python311.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-loguru.spec ++++++
--- /var/tmp/diff_new_pack.zJ8eo4/_old  2023-01-28 19:01:45.556198517 +0100
+++ /var/tmp/diff_new_pack.zJ8eo4/_new  2023-01-28 19:01:45.564198561 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-loguru
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,6 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
+%define skip_python36 1
 Name:           python-loguru
 Version:        0.6.0
 Release:        0
@@ -28,15 +29,13 @@
 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}
+# PATCH-FIX-UPSTREAM 
https://github.com/Delgan/loguru/commit/5b77724ca75aa8f4b1c8866e0b786c3cbe30ca99
+Patch2:         python311.patch
 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
 

++++++ python311.patch ++++++
>From 5b77724ca75aa8f4b1c8866e0b786c3cbe30ca99 Mon Sep 17 00:00:00 2001
From: Delgan <[email protected]>
Date: Sat, 28 May 2022 16:09:23 +0200
Subject: [PATCH] Fix failing tests on Python 3.11 (#654)

---
 .github/workflows/tests.yml     |  1 +
 CHANGELOG.rst                   |  1 +
 README.rst                      |  6 +++---
 tests/test_filesink_rotation.py |  4 ++--
 tests/test_interception.py      | 11 ++++++-----
 5 files changed, 13 insertions(+), 10 deletions(-)

Index: loguru-0.6.0/tests/test_filesink_rotation.py
===================================================================
--- loguru-0.6.0.orig/tests/test_filesink_rotation.py
+++ loguru-0.6.0/tests/test_filesink_rotation.py
@@ -49,8 +49,8 @@ def monkeypatch_filesystem(monkeypatch):
                     return self._timestamp
                 return getattr(self._wrapped, name)
 
-        def patched_stat(filepath):
-            stat = __stat__(filepath)
+        def patched_stat(filepath, *args, **kwargs):
+            stat = __stat__(filepath, *args, **kwargs)
             wrapped = StatWrapper(stat, 
filesystem.get(os.path.abspath(filepath)))
             return wrapped
 
Index: loguru-0.6.0/tests/test_interception.py
===================================================================
--- loguru-0.6.0.orig/tests/test_interception.py
+++ loguru-0.6.0/tests/test_interception.py
@@ -1,4 +1,5 @@
 import logging
+import sys
 
 from loguru import logger
 
@@ -14,7 +15,7 @@ class InterceptHandler(logging.Handler):
             level = record.levelno
 
         # Find caller from where originated the logged message
-        frame, depth = logging.currentframe(), 2
+        frame, depth = sys._getframe(6), 6
         while frame.f_code.co_filename == logging.__file__:
             frame = frame.f_back
             depth += 1
@@ -30,7 +31,7 @@ def test_formatting(writer):
 
     expected = (
         "tests.test_interception - test_interception.py - test_formatting - 
DEBUG - "
-        "10 - 38 - test_interception - This is the message\n"
+        "10 - 39 - test_interception - This is the message\n"
     )
 
     with make_logging_logger("tests", InterceptHandler()) as logging_logger:
@@ -157,4 +158,4 @@ def test_using_logging_function(writer):
         logging.warning("ABC")
 
     result = writer.read()
-    assert result == "test_using_logging_function 157 test_interception 
test_interception.py ABC\n"
+    assert result == "test_using_logging_function 158 test_interception 
test_interception.py ABC\n"

Reply via email to