Bug 2074534 - lazygal fails to build with Python 3.11: re.error: global flags not at the start of the expression at position 994
Summary: lazygal fails to build with Python 3.11: re.error: global flags not at the st...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-genshi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Felix Schwarz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.11
TreeView+ depends on / blocked
 
Reported: 2022-04-12 12:32 UTC by Tomáš Hrnčiar
Modified: 2022-06-10 16:26 UTC (History)
5 users (show)

Fixed In Version: python-genshi-0.7.7-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-10 16:26:21 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2022-04-12 12:32:53 UTC
lazygal fails to build with Python 3.11.0a6.


Traceback (most recent call last):
  File "/builddir/build/BUILD/lazygal-0.10.5/setup.py", line 201, in <module>
    setuptools.setup(
    ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
    ^^^^^^^^^^^^^
  File "/builddir/build/BUILD/lazygal-0.10.5/setup.py", line 63, in run
    import lazygaltest
    ^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/lazygal-0.10.5/lazygaltest/__init__.py", line 26, in <module>
    from lazygal.generators import Album
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/lazygal-0.10.5/lazygal/generators.py", line 37, in <module>
    from . import tpl
    ^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/lazygal-0.10.5/lazygal/tpl.py", line 23, in <module>
    from genshi.template import TemplateLoader, MarkupTemplate, NewTextTemplate
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/genshi/template/__init__.py", line 20, in <module>
    from genshi.template.markup import MarkupTemplate
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/genshi/template/markup.py", line 25, in <module>
    from genshi.template.interpolation import interpolate
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/genshi/template/interpolation.py", line 33, in <module>
    token_re = re.compile('%s|%s(?s)' % (
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 279, in _compile
    p = _compiler.compile(pattern, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/_compiler.py", line 798, in compile
    p = _parser.parse(p, flags)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/_parser.py", line 963, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/_parser.py", line 447, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/re/_parser.py", line 822, in _parse
    raise source.error('global flags not at the start '
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
re.error: global flags not at the start of the expression at position 994

Global inline flags (e.g. (?i)) can now only be used at the start of the regular expressions. Using them not at the start of expression was deprecated since Python 3.6. (Contributed by Serhiy Storchaka in bpo-47066.)

https://bugs.python.org/issue?@action=redirect&bpo=47066
https://docs.python.org/3.11/whatsnew/3.11.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.11/fedora-rawhide-x86_64/04174002-lazygal/

For all our attempts to build lazygal with Python 3.11, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/package/lazygal/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.11:
https://copr.fedorainfracloud.org/coprs/g/python/python3.11/

Let us know here if you have any questions.

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Dominik 'Rathann' Mierzejewski 2022-06-10 16:18:18 UTC
The above error was in python-genshi internal code, nothing to do with lazygal. It seems to have been fixed about a month ago.


Note You need to log in before you can comment on or make changes to this bug.