Bug 153726 - lightproof fails to build (at least hu/ru) with python 3.11
Summary: lightproof fails to build (at least hu/ru) with python 3.11
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-19 09:11 UTC by Rene Engelhard
Modified: 2023-02-19 11:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Engelhard 2023-02-19 09:11:01 UTC
Description:
Similar as https://bugs.documentfoundation.org/show_bug.cgi?id=127315 but now for python 3.11. See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031606.

for cfg in `find src -name "*.cfg"`; do \
    python3 make.py $cfg; \
done
/home/rene/lightproof-1.6/make.py:39: DeprecationWarning: The 
SafeConfigParser class has been renamed to ConfigParser in Python 3.2. 
This alias will be removed in Python 3.12. Use ConfigParser directly 
instead.
  fArgs = cp.SafeConfigParser()
/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py:170: 
FutureWarning: Possible nested set at position 5
  compr = re.compile(sc)
Traceback (most recent call last):
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 170, in mysplit
    compr = re.compile(sc)
            ^^^^^^^^^^^^^^
  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 28

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rene/lightproof-1.6/make.py", line 43, in <module>
    dist(i[:-4], fArgs._sections['args'])
  File "/home/rene/lightproof-1.6/make.py", line 15, in dist
    code = pythonpath.lightproof_compile___implname__.c(f.read(), 
a['lang'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 270, in c
    item = mysplit(lines[i].strip(), i + 1, oldlinenums[lines[i]], debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 174, in mysplit
    raise Exception(str(e), oldline)
Exception: ('global flags not at the start of the expression at position 
28', 126)

missing config file or options: src/hu_HU/hu_HU.cfg
/home/rene/lightproof-1.6/make.py:39: DeprecationWarning: The 
SafeConfigParser class has been renamed to ConfigParser in Python 3.2. 
This alias will be removed in Python 3.12. Use ConfigParser directly 
instead.
  fArgs = cp.SafeConfigParser()
/usr/lib/python3.11/zipfile.py:1547: UserWarning: Duplicate name: 
'META-INF/manifest.xml'
  return self._open_to_write(zinfo, force_zip64=force_zip64)
/home/rene/lightproof-1.6/make.py:39: DeprecationWarning: The 
SafeConfigParser class has been renamed to ConfigParser in Python 3.2. 
This alias will be removed in Python 3.12. Use ConfigParser directly 
instead.
  fArgs = cp.SafeConfigParser()
Traceback (most recent call last):
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 170, in mysplit
    compr = re.compile(sc)
            ^^^^^^^^^^^^^^
  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 28

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rene/lightproof-1.6/make.py", line 43, in <module>
    dist(i[:-4], fArgs._sections['args'])
  File "/home/rene/lightproof-1.6/make.py", line 15, in dist
    code = pythonpath.lightproof_compile___implname__.c(f.read(), 
a['lang'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 270, in c
    item = mysplit(lines[i].strip(), i + 1, oldlinenums[lines[i]], debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/home/rene/lightproof-1.6/pythonpath/lightproof_compile___implname__.py", 
line 174, in mysplit
    raise Exception(str(e), oldline)
Exception: ('global flags not at the start of the expression at position 
28', 75)

missing config file or options: src/ru_RU/ru_RU.cfg
/home/rene/lightproof-1.6/make.py:39: DeprecationWarning: The 
SafeConfigParser class has been renamed to ConfigParser in Python 3.2. 
This alias will be removed in Python 3.12. Use ConfigParser directly 
instead.
  fArgs = cp.SafeConfigParser()

Steps to Reproduce:
1. run make.py (build lightproof) with python 3.11

Actual Results:
throws re Exceptions and fails to generate the needed files

Expected Results:
works


Reproducible: Always


User Profile Reset: No

Additional Info:
python 3.10 works
Comment 1 Rene Engelhard 2023-02-19 11:21:43 UTC
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1031606 has a patch now