Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ametzler opened this issue Jan 20, 2023 · 3 comments
Labels

Comments

@ametzler
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

hmaarrfk commented Oct 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants