git: 7f72e5b71a62 - main - net-p2p/deluge: fix runtime with python3.8

From: Ruslan Makhmatkhanov <rm_at_FreeBSD.org>
Date: Mon, 13 Dec 2021 08:13:42 UTC
The branch main has been updated by rm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f72e5b71a62e7ee4ae317067f8a4a5e889539e0

commit 7f72e5b71a62e7ee4ae317067f8a4a5e889539e0
Author:     Ruslan Makhmatkhanov <rm@FreeBSD.org>
AuthorDate: 2021-12-13 08:11:24 +0000
Commit:     Ruslan Makhmatkhanov <rm@FreeBSD.org>
CommitDate: 2021-12-13 08:11:24 +0000

    net-p2p/deluge: fix runtime with python3.8
    
    Add upstream patch, that's fixing run with python3.8
    
    Reported by:    Daniel O'Connor <doconnor@gsoft.com.au>
---
 net-p2p/deluge-cli/Makefile                  |  2 +-
 net-p2p/deluge-cli/files/patch-deluge_log.py | 29 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/net-p2p/deluge-cli/Makefile b/net-p2p/deluge-cli/Makefile
index 173bbc310188..841069334df5 100644
--- a/net-p2p/deluge-cli/Makefile
+++ b/net-p2p/deluge-cli/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	deluge
 DISTVERSION=	2.0.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	net-p2p python
 MASTER_SITES=	CHEESESHOP
 PKGNAMESUFFIX=	-cli
diff --git a/net-p2p/deluge-cli/files/patch-deluge_log.py b/net-p2p/deluge-cli/files/patch-deluge_log.py
new file mode 100644
index 000000000000..c908439441da
--- /dev/null
+++ b/net-p2p/deluge-cli/files/patch-deluge_log.py
@@ -0,0 +1,29 @@
+From 351664ec071daa04161577c6a1c949ed0f2c3206 Mon Sep 17 00:00:00 2001
+From: minus <minus@mnus.de>
+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
+--- deluge/log.py
++++ 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
+