bbb26e4
From d6c96d629183e8bab2167ef56457f994017e7c85 Mon Sep 17 00:00:00 2001
bbb26e4
From: neeshy <neeshy@tfwno.gf>
bbb26e4
Date: Sat, 18 Apr 2020 23:23:51 -0400
bbb26e4
Subject: Fix warning related to gettext
bbb26e4
bbb26e4
---
bbb26e4
 deluge/i18n/util.py | 2 +-
bbb26e4
 1 file changed, 1 insertion(+), 1 deletion(-)
bbb26e4
bbb26e4
diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py
bbb26e4
index bd002f7..90568fc 100644
bbb26e4
--- a/deluge/i18n/util.py
bbb26e4
+++ b/deluge/i18n/util.py
bbb26e4
@@ -114,7 +114,7 @@ def setup_translation():
bbb26e4
         # Workaround for Python 2 unicode gettext (keyword removed in Py3).
bbb26e4
         kwargs = {} if not deluge.common.PY2 else {'unicode': True}
bbb26e4
 
bbb26e4
-        gettext.install(I18N_DOMAIN, translations_path, names='ngettext', **kwargs)
bbb26e4
+        gettext.install(I18N_DOMAIN, translations_path, names=['ngettext'], **kwargs)
bbb26e4
         builtins.__dict__['_n'] = builtins.__dict__['ngettext']
bbb26e4
 
bbb26e4
         libintl = None
bbb26e4
-- 
bbb26e4
cgit v1.1
bbb26e4
312ab47
From 351664ec071daa04161577c6a1c949ed0f2c3206 Mon Sep 17 00:00:00 2001
312ab47
From: minus <minus@mnus.de>
312ab47
Date: Sun, 17 Nov 2019 09:36:23 +0100
312ab47
Subject: [Logging] Fix Python 3.8 compatibility
312ab47
312ab47
Deluge's logger class extends Python's `logging.Logger`. Since Python
312ab47
3.8, it takes an additional argument `stacklevel`.
312ab47
The implementation in Deluge does not support that. Work around the
312ab47
problem by ignoring additional arguments.
312ab47
---
312ab47
 deluge/log.py | 2 +-
312ab47
 1 file changed, 1 insertion(+), 1 deletion(-)
312ab47
312ab47
diff --git a/deluge/log.py b/deluge/log.py
312ab47
index 75e8308..0f9877f 100644
312ab47
--- a/deluge/log.py
312ab47
+++ b/deluge/log.py
312ab47
@@ -86,7 +86,7 @@ class Logging(LoggingLoggerClass):
312ab47
     def exception(self, msg, *args, **kwargs):
312ab47
         yield LoggingLoggerClass.exception(self, msg, *args, **kwargs)
312ab47
 
312ab47
-    def findCaller(self, stack_info=False):  # NOQA: N802
312ab47
+    def findCaller(self, *args, **kwargs):  # NOQA: N802
312ab47
         f = logging.currentframe().f_back
312ab47
         rv = '(unknown file)', 0, '(unknown function)'
312ab47
         while hasattr(f, 'f_code'):
312ab47
-- 
312ab47
cgit v1.1
312ab47