Bug 132074 - python shelve don't work - missing dbm module
Summary: python shelve don't work - missing dbm module
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
6.3.5.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-12 19:20 UTC by edil
Modified: 2020-04-16 14:41 UTC (History)
3 users (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 edil 2020-04-12 19:20:37 UTC
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
Comment 1 Julien Nabet 2020-04-13 15:33:14 UTC
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).
Comment 2 edil 2020-04-13 17:53:42 UTC
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 3 Michael Stahl (allotropia) 2020-04-14 09:45:48 UTC
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.
Comment 4 Julien Nabet 2020-04-14 09:54:14 UTC
(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!
Comment 5 edil 2020-04-14 10:51:26 UTC
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
Comment 6 Michael Stahl (allotropia) 2020-04-16 14:41:39 UTC
(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.