[Libreoffice-bugs] [Bug 131105] New: Unable to run unit tests under Python 3.7 embedded in LibreOffice 6.4

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Mar 3 21:06:06 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=131105

            Bug ID: 131105
           Summary: Unable to run unit tests under Python 3.7 embedded in
                    LibreOffice 6.4
           Product: LibreOffice
           Version: 6.4.0.3 release
          Hardware: All
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: peter.88213 at t-online.de

Description:
Unit tests previously working on LibreOffice 6.3 embedded Python fail on
LibreOffice 6.4 embedded Python. Upon trying to import "_queue", an ImportError
exception is thrown.

A comparison of the code of queue.py with the corresponding code of the current
Python 3.8 installation shows a difference which obviously causes the problem. 






Steps to Reproduce:
1. Register LibreOffice 6.4 embedded Python 3.7 as Python interpreter in
Eclipse PyDev.
2. Execute a formerly working Python unit test.


Actual Results:
The unit test terminates on ImportError exception (Module "_queue" not found).

Expected Results:
The test ends without errors, as under LibreOffice 6.3 embedded Python 3.5.


Reproducible: Always


User Profile Reset: No



Additional Info:
After changing line 17 of 
c:\Program Files\LibreOffice\program\python-core-3.7.6\lib\queue.py, 
everything seems to work. 

Original code as from line 15:

try:
    from _queue import Empty
except AttributeError:
    class Empty(Exception):
        'Exception raised by Queue.get(block=0)/get_nowait().'
        pass

Corrected code that matches my current Python 3.8 installation: 

try:
    from _queue import Empty
except ImportError:
    class Empty(Exception):
        'Exception raised by Queue.get(block=0)/get_nowait().'
        pass

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200303/a46bb0cc/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list