[pitivi] utils: Update collections import



commit 4391235c1c1705504dfacfa2585c90e130f9e98c
Author: Gwyn Ciesla <gwync protonmail com>
Date:   Mon Sep 6 06:32:00 2021 +0000

    utils: Update collections import
    
    Fixes #2571

 pitivi/utils/loggable.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/utils/loggable.py b/pitivi/utils/loggable.py
index b002665ea..20048d241 100644
--- a/pitivi/utils/loggable.py
+++ b/pitivi/utils/loggable.py
@@ -14,7 +14,7 @@
 #
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
-import collections
+import collections.abc
 import errno
 import fnmatch
 import os
@@ -714,7 +714,7 @@ def add_log_handler(func):
     Raises:
         TypeError: When func is not a callable.
     """
-    if not isinstance(func, collections.Callable):
+    if not isinstance(func, collections.abc.Callable):
         raise TypeError("func must be callable")
 
     if func not in _log_handlers:
@@ -736,7 +736,7 @@ def add_limited_log_handler(func):
     Raises:
         TypeError: When func is not a callable.
     """
-    if not isinstance(func, collections.Callable):
+    if not isinstance(func, collections.abc.Callable):
         raise TypeError("func must be callable")
 
     if func not in _log_handlers_limited:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]