From 312ab47db94f3aac0fdb5d8ae80aeba71f5df3bd Mon Sep 17 00:00:00 2001 From: Michael Cronenworth Date: Aug 18 2020 21:15:54 +0000 Subject: Update patch for Python 3.8 compatibility (RHBZ#1868902) --- diff --git a/deluge-2.0.3-python38.patch b/deluge-2.0.3-python38.patch index b8d8c1a..0decc8b 100644 --- a/deluge-2.0.3-python38.patch +++ b/deluge-2.0.3-python38.patch @@ -23,3 +23,32 @@ index bd002f7..90568fc 100644 -- cgit v1.1 +From 351664ec071daa04161577c6a1c949ed0f2c3206 Mon Sep 17 00:00:00 2001 +From: minus +Date: Sun, 17 Nov 2019 09:36:23 +0100 +Subject: [Logging] Fix Python 3.8 compatibility + +Deluge's logger class extends Python's `logging.Logger`. Since Python +3.8, it takes an additional argument `stacklevel`. +The implementation in Deluge does not support that. Work around the +problem by ignoring additional arguments. +--- + deluge/log.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deluge/log.py b/deluge/log.py +index 75e8308..0f9877f 100644 +--- a/deluge/log.py ++++ b/deluge/log.py +@@ -86,7 +86,7 @@ class Logging(LoggingLoggerClass): + def exception(self, msg, *args, **kwargs): + yield LoggingLoggerClass.exception(self, msg, *args, **kwargs) + +- def findCaller(self, stack_info=False): # NOQA: N802 ++ def findCaller(self, *args, **kwargs): # NOQA: N802 + f = logging.currentframe().f_back + rv = '(unknown file)', 0, '(unknown function)' + while hasattr(f, 'f_code'): +-- +cgit v1.1 + diff --git a/deluge.spec b/deluge.spec index b04cd12..87c2545 100644 --- a/deluge.spec +++ b/deluge.spec @@ -1,6 +1,6 @@ Name: deluge Version: 2.0.3 -Release: 10%{?dist} +Release: 11%{?dist} Summary: A GTK+ BitTorrent client with support for DHT, UPnP, and PEX License: GPLv3 with exceptions URL: http://deluge-torrent.org/ @@ -247,6 +247,9 @@ exit 0 %systemd_postun_with_restart deluge-web.service %changelog +* Tue Aug 18 2020 Michael Cronenworth - 2.0.3-11 +- Update patch for Python 3.8 compatibility (RHBZ#1868902) + * Sun Aug 09 2020 Michael Cronenworth - 2.0.3-10 - Add patch for minor Python 3.8+ compatibility (RHBZ#1867427)