Description: use collections.abc.Callable instead of collections.Callable This fixes failure to build from source with Python 3.10. The issue is already fixed upstream in ITKv5, the patch is for the unmaintained ITKv4. Author: Étienne Mollier Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008803 Forwarded: not-needed Last-Update: 2022-04-02 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py +++ Modules/ThirdParty/pygccxml/src/pygccxml/declarations/scopedef.py @@ -7,7 +7,7 @@ import time import warnings -import collections +import collections.abc from . import algorithm from . import templates from . import declaration @@ -332,7 +332,7 @@ @staticmethod def _build_operator_function(name, function): - if isinstance(name, collections.Callable): + if isinstance(name, collections.abc.Callable): return name else: return function @@ -345,7 +345,7 @@ return 'operator ' + sym else: return 'operator' + sym - if isinstance(name, collections.Callable) and None is function: + if isinstance(name, collections.abc.Callable) and None is function: name = None if name: if 'operator' not in name: @@ -368,7 +368,7 @@ @staticmethod def __normalize_args(**keywds): """implementation details""" - if isinstance(keywds['name'], collections.Callable) and \ + if isinstance(keywds['name'], collections.abc.Callable) and \ None is keywds['function']: keywds['function'] = keywds['name'] keywds['name'] = None