Bug 131105 - Unable to run unit tests under Python 3.7 embedded in LibreOffice 6.4
Summary: Unable to run unit tests under Python 3.7 embedded in LibreOffice 6.4
Status: RESOLVED DUPLICATE of bug 130404
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-03 21:06 UTC by peter.88213
Modified: 2020-03-03 21:11 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 peter.88213 2020-03-03 21:06:06 UTC
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
Comment 1 Julien Nabet 2020-03-03 21:11:27 UTC
Fixed in 6.4.1

*** This bug has been marked as a duplicate of bug 130404 ***