New submission from Dong-hee Na <donghee...@python.org>:

I have a chance to exchange mail with gdbm module maintainer Sergey Poznyakoff 
to supporting the crash tolerance feature.
(See bpo-45452) 

Other dbm modules also might have the same issue what the maintainer pointed 
out.

I copy and paste the content that gdbm maintainer's pointed out.

I would like to listen to other core dev's opinions about the gdbm moudle and 
also other dbm module interface improvements.
I add the core devs who might have an interest in this issue.

Personally, I have interests in Error handling and items() and values() methods 
issues.


1. Error handling

The most problematic place.  Most methods throw an error in case of
failure, which is quite OK.  However, to do so they use PyErr_SetString
and PyErr_SetFromErrno family functions, passing the gdbm_errno value
as their argument.  This is plain wrong.  These functions treat the
errno argument as a value of C "errno" variable.  Obviously, gdbm_errno
codes have diffeent meanings, so the resulting diagnostics is misleading
if not downright unusable.

2. Lack of interfaces for database export/import (gdbm_dump and
gdbm_load functions).  This is quite an important aspect, in particular
for handling database backups.

3. Lack of interface for database recovery (gdbm_recover function).

4. The items() and values() methods are not supported.  These should be
easy to implement using gdbm_firstkey/gdbm_nextkey.

----------
messages: 404136
nosy: corona10, methane, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Several improvement point of gdbm module

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45503>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to