Description: Fix FTBFS with python 3.11
Author: Andreas Metzler <ametzler@debian.org>
Origin: vendor
Bug: https://github.com/ukoethe/vigra/issues/529
Forwarded: https://github.com/ukoethe/vigra/issues/529
Last-Update: 2023-01-21

--- a/docsrc/post.py
+++ b/docsrc/post.py
@@ -83,22 +83,22 @@ mainHeadingReplacement = '''\\1
 # tested with doxygen 1.7.5.1
 headingSummary = re.compile(r'''(<!-- Generated by Doxygen .+ -->
 </div>
 <div class="header">)
   <div class="summary">
-(?s).*?</div>''')
+.*?</div>''', flags=re.DOTALL)
 
 # tested with doxygen 1.8.2
 headingSummary2 = re.compile(r'''(<!-- Generated by Doxygen .+ -->
 </div><!-- top -->
 <div class="header">)
   <div class="summary">
-(?s).*?</div>''')
+.*?</div>''', flags=re.DOTALL)
 
 # tested with doxygen 1.7.5.1
 headingNavpath = re.compile(r'''(<!-- Generated by Doxygen .+ -->)
-  <div id="nav-path" class="navpath">(?s).*?</div>''')
+  <div id="nav-path" class="navpath">.*?</div>''', flags=re.DOTALL)
 
 # tested with doxygen 1.8.2
 headingNavpath2 = re.compile(r'''(<!-- Generated by Doxygen .+ -->)
 <div id="nav-path" class="navpath">
   <ul>
--- a/vigranumpy/docsrc/conf.py.cmake2.in
+++ b/vigranumpy/docsrc/conf.py.cmake2.in
@@ -13,27 +13,10 @@
 
 from __future__ import division, print_function
 
 import sys, os
 
-# silent lots of 'arg is not a Python function' warnings
-import inspect
-
-_original_getargspec = inspect.getargspec
-
-def _getargspec_workaround(*args, **kw):
-    try:
-        return _original_getargspec(*args, **kw)
-    except TypeError as e:
-        if str(e).startswith('arg is not a Python function'):
-            return inspect.ArgSpec([], None, None, None)
-        else:
-            raise
-
-inspect.getargspec = _getargspec_workaround
-_getargspec_workaround.__module__ = 'inspect'
-
 # set the PATH of the current build, so that we don't create
 # documentation for a possibly outdated installation
 vigranumpy_path=r'@VIGRANUMPY_TMP_PATH@'
 print("Working directory:", vigranumpy_path)
 sys.path.insert(0,vigranumpy_path)
--- a/vigranumpy/docsrc/conf.py.in
+++ b/vigranumpy/docsrc/conf.py.in
@@ -12,27 +12,10 @@
 # serve to show the default.
 
 from __future__ import division, print_function
 import sys, os, re
 
-# silent lots of 'arg is not a Python function' warnings
-import inspect
-
-_original_getargspec = inspect.getargspec
-
-def _getargspec_workaround(*args, **kw):
-    try:
-        return _original_getargspec(*args, **kw)
-    except TypeError as e:
-        if str(e).startswith('arg is not a Python function'):
-            return inspect.ArgSpec([], None, None, None)
-        else:
-            raise
-
-inspect.getargspec = _getargspec_workaround
-_getargspec_workaround.__module__ = 'inspect'
-
 # set the PATH of the current build, so that we don't create
 # documentation for a possibly outdated installation
 vigranumpy_path=r'@VIGRANUMPY_TMP_PATH@'
 print("Working directory:", vigranumpy_path)
 sys.path.insert(0,vigranumpy_path)
