Description: in LibreOffice python-core-3.5.9 is missing dbm module, so shelve.py don't work. It is simple to fix. Steps to Reproduce: 1.import shelve 2.shelf = shelve.open('MyFile') 3. Actual Results: don't work Expected Results: exit def Reproducible: Always User Profile Reset: No Additional Info: add dbm module to C:\Program Files\LibreOffice\program\python-core-3.5.9\lib
Michael: thought you might be interested in this one. It reminds me tdf#130404 but not sure it's the same pb (and so the same kind of patch).
yes, the problem is similar, in this case that module "dbm" is missing from the python version python-core-3.5.9 files that are embedded in the Windows LibreOffice 6.3.5.2 distribution, it is import from shelve.py and so it don't work.
comment in ExternalPackage_python3.mk: # packages not shipped: # dbm, sqlite3 - need some database stuff # curses - need curses to build the C module # idlelib, tkinter, turtledemo - need Tk to build the C module # test - probably unnecessary? was explicitly removed #i116738# # venv - why would we need virtual environments this indicates that dbm is deliberately disabled because it has runtime dependencies that we don't want to spend the effort to bundle with LO. hence i think this is WONTFIX.
(In reply to Michael Stahl (CIB) from comment #3) > comment in ExternalPackage_python3.mk: > > # packages not shipped: > # dbm, sqlite3 - need some database stuff > # curses - need curses to build the C module > # idlelib, tkinter, turtledemo - need Tk to build the C module > # test - probably unnecessary? was explicitly removed #i116738# > # venv - why would we need virtual environments > > this indicates that dbm is deliberately disabled because it has runtime > dependencies that we don't want to spend the effort to bundle with LO. > > hence i think this is WONTFIX. Dumb me! I hadn't thought about checking "dbm" in the file. Sorry for the noise Michael!
Thank you, now it is clear. May should be better don't have shelve in LibreOffice distribution, remove shelve from distribution so a user know that can't use it. By
(In reply to edil from comment #5) > Thank you, now it is clear. > May should be better don't have shelve in LibreOffice distribution, remove > shelve from distribution so a user know that can't use it. possibly ... it looks like there's a class BsdDbShelf(Shelf) and a class DbfilenameShelf(Shelf) and only the latter imports dbm so the module looks useful (with reduced functionality) without dbm.
Reopening this one. I just submitted a patch for bug 168512 where sqlite3 is bundled with the internal python. This one can be bundled as well. Taking
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3d57e6a9b5cdfa5b8912828de2caef0026fa912a tdf#132074: python3: bundle dbm It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.