This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Several improvement point of gdbm module
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.11
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: corona10, methane, serhiy.storchaka
Priority: normal Keywords:

Created on 2021-10-17 11:35 by corona10, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg404136 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2021-10-17 11:35
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.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89666
2021-10-17 11:35:45corona10settype: enhancement
components: + Library (Lib)
versions: + Python 3.11
2021-10-17 11:35:30corona10create