[issue33074] dbm corrupts index on macOS (_dbm module)

2020-11-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is a duplicate of #30388 -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ndbm can't iterate through values on OS X ___ Python tracker

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-10-29 Thread Robert Xiao
Robert Xiao added the comment: I just started a new project, thoughtlessly decided to use `shelve` to store data, and lost it all again thanks to this bug. To reiterate: Although `gdbm` might fix this issue, it's not installed by default. But the issue is with `dbm`: Python is allowing me to

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Ned Deily
Change by Ned Deily : -- Removed message: https://bugs.python.org/msg314673 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Ned Deily
Ned Deily added the comment: Addressing your point (5): > (5) dbm.gnu is not a default, and I can't even work out how to get it enabled > with the stock Python installation (i.e. without building my own Python > against e.g. Macports gdbm) If you are using MacPorts, the easiest way is to use

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Ned Deily
Ned Deily added the comment: Addressing your point (5): > (5) dbm.gnu is not a default, and I can't even work out how to get it enabled > with the stock Python installation (i.e. without building my own Python > against e.g. Macports gdbm) If you are using MacPorts, the easiest way is to use

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Robert Xiao
Robert Xiao added the comment: So we have some other problems then: (1) It should be documented in dbm, and ideally in shelve, that keys/values over a certain limit might not work. Presently there is no hint that such a limit exists, and until you mentioned it I was unaware that POSIX only re

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-29 Thread Xiang Zhang
Xiang Zhang added the comment: I highly suspect you don't have gdbm installed in your environment and `import dbm.gnu` will fail. When simply using `dbm.open`, it searches through [dbm.gnu, dbm.ndbm, dbm.dumb]. In my environment, macOS 10.13.3, dbm.gnu works correctly(so dbm works correctly)

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-13 Thread Ned Deily
Change by Ned Deily : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-13 Thread Robert Xiao
Robert Xiao added the comment: (Note: the contextlib stuff is just for Python 2 compatibility, it's not necessary on Python 3). -- ___ Python tracker ___ _

[issue33074] dbm corrupts index on macOS (_dbm module)

2018-03-13 Thread Robert Xiao
New submission from Robert Xiao : Environment: Python 3.6.4, macOS 10.12.6 Python 3's dbm appears to corrupt the key index on macOS if objects >4KB are inserted. Code: <<< import dbm import contextlib with contextlib.closing(dbm.open('test', 'n')) as db: for k in range(128):