With Python3.11, pygments fails with the following message:
>>> from pygments import highlight
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kbandla/github/diaphora/pygments/__init__.py", line 37, in <module>
from pygments.util import StringIO, BytesIO
File "/home/kbandla/github/diaphora/pygments/util.py", line 27, in <module>
tag_re = re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>(?uism)')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/lib/python3.11/re/__init__.py", line 227, in compile
return _compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/lib/python3.11/re/__init__.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/lib/python3.11/re/_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/lib/python3.11/re/_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/lib/python3.11/re/_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kbandla/python/3.11/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 24
Python versions 3.7 and later showed a DeprecationWarning:
Flags not at the start of the expression '<(.+?)(\\s.*?)?>.*?</' (truncated)re.compile(r'<(.+?)(\s.*?)?>.*?</.+?>(?uism)')
With Python3.11, pygments fails with the following message:
Python versions 3.7 and later showed a DeprecationWarning: