gst-devtools: Python3.11re.error: global flags not at the start of the expression at position 9
Trying to use gst-devtools on Fedora 37 (Python 3.11) throws a weird exception and exits:
File "gstreamer/subprojects/gst-devtools/validate/launcher/baseclasses.py", line 1565, in _add_blacklist
self.blacklisted_tests_patterns.append(re.compile(pattern))
^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/re/_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/re/_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/re/_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/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 9
This comes from
re.compile('validate.(?i)*playback.reverse_playback.*(?:_|.)(?:|m)ts$')
but is fixed by moving the (?i)
flags to the start of the regex pattern