[issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

2017-08-06 Thread R. David Murray
R. David Murray added the comment: By the way, if you want to open a doc issue with a suggestion of how to clarify this in the docs, that would be welcome. -- ___ Python tracker

[issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

2017-08-06 Thread R. David Murray
R. David Murray added the comment: No, it should not. A DBM is not necessarily a single file. What you should be doing is creating a temporary *directory*, and opening your DB inside that. -- components: +Library (Lib) -IO nosy: +r.david.murray resolution: -> rejected stage: ->

[issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined"

2017-08-05 Thread Stephen Larroque
New submission from Stephen Larroque: This is a followup of issue 23174. When using `shelve.open(tempfile.mkstemp()[1])`, the shelve (or anydbm or dumbdbm) fail with "anydbm.error: db type could not be determined". Instead, the module could detect the file is empty and use it as if it were