1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

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>
This commit is contained in:
Ruslan Makhmatkhanov 2021-12-13 11:11:24 +03:00
parent abace92531
commit 7f72e5b71a
2 changed files with 30 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= deluge
DISTVERSION= 2.0.3
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= net-p2p python
MASTER_SITES= CHEESESHOP
PKGNAMESUFFIX= -cli

View File

@ -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