ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
406 stars 191 forks source link

build-error against python 3.11 - re.error: global flags not at the start of the expression #529

Open ametzler opened 1 year ago

ametzler commented 1 year ago

Good morning,

building against python 3.11 fails with:

Postprocessing html files
cd /dev/shm/VIGRA/libvigraimpex-1.11.1/obj.x86_64-linux-gnu/docsrc && /usr/bin/python3 /dev/shm/VIGRA/libvigraimpex-1.11.1/docsrc/makeFunctionIndex.py /dev/shm/VIGRA/libvigraimpex-1.11.1/doc/vigra
cd /dev/shm/VIGRA/libvigraimpex-1.11.1/obj.x86_64-linux-gnu/docsrc && /usr/bin/python3 /dev/shm/VIGRA/libvigraimpex-1.11.1/docsrc/post.py /dev/shm/VIGRA/libvigraimpex-1.11.1/doc/vigra 1.11.1
Traceback (most recent call last):
  File "/dev/shm/VIGRA/libvigraimpex-1.11.1/docsrc/post.py", line 84, in <module>
    headingSummary = re.compile(r'''(<!-- Generated by Doxygen .+ -->
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/__init__.py", line 227, in compile
    return _compile(pattern, flags)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/__init__.py", line 294, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_compiler.py", line 743, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 980, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 455, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/re/_parser.py", line 841, in _parse
    raise source.error('global flags not at the start '
re.error: global flags not at the start of the expression at position 87 (line 5, column 1)
make[5]: *** [docsrc/CMakeFiles/doc_cpp.dir/build.make:82: doc_cpp] Error 1

cu Andreas

ametzler commented 1 year ago

There is another issue in vigranumpy/docsrc/conf.py.*, which uses inspect.getargspec. This was removed in python 3.11.

Monkey-quality hotfix (google + c'n'p) for both issues: python311.diff.txt

ametzler commented 1 year ago

There is another issue in vigranumpy/docsrc/conf.py.*, which uses inspect.getargspec. This was removed in python 3.11.

Monkey-quality hotfix (google + c'n'p) for both issues: python311.diff.txt

Actually the code using inspect.getargspec in vigranumpy/docsrc/conf.py.* seems to be unused and can simply be deleted.

hmaarrfk commented 9 months ago

sorry for the delay in responding. this project is really just in maintenance mode.

We recently got the CIs working again, and as such, I am not in a position to review parts of the codebase I am not entirely familiar with. Please feel free to make PRs to address the issue you find and we can gladly incorporate.