From 0823fd8fdb15a728be1bba44980fb4d1a3efb90f Mon Sep 17 00:00:00 2001
From: Poruri Sai Rahul <rporuri@enthought.com>
Date: Mon, 10 May 2021 05:00:46 +0000
Subject: [PATCH] FIX : Update use of Callable from collections std lib package
(#1022)
importing it from collections was deprecated and the import was removed
in python 3.10.
it needs to be imported from collections.abc now
modified: tvtk/vtk_parser.py
---
tvtk/vtk_parser.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tvtk/vtk_parser.py b/tvtk/vtk_parser.py
index 447dfeff..484ffa20 100644
--- a/tvtk/vtk_parser.py
+++ b/tvtk/vtk_parser.py
@@ -8,7 +8,7 @@
from __future__ import print_function
-import collections
+import collections.abc
import re
import types
@@ -475,7 +475,7 @@ def _organize_methods(self, klass, methods):
meths = self._find_get_methods(klass, meths)
self.other_meths = [
x for x in meths \
- if isinstance(getattr(klass, x), collections.Callable)
+ if isinstance(getattr(klass, x), collections.abc.Callable)
]
def _remove_method(self, meths, method):