New submission from Serhiy Storchaka:

Unlike to other dbm implementations, a dumpdbm database is always opened for 
update, and will be created if it does not exist.  We can fix this discrepancy 
and implement common behavior for 'r' and 'w' modes, but this will change 
current behavior and some deprecation period is needed.

Here is a patch (based on patch by Claudiu Popa, submitted in issue18039), 
which adds deprecation warnings for cases when current behavior differs from 
desired: invalid values for the flag parameter (will raise ValueError in 
future), opening non-existing database in 'r' or 'w' mode (will raise 
dbm.dumb.error), modifying a database opened for reading only (will raise 
dbm.dumb.error).

This patch needs approving by other core developer.

----------
assignee: serhiy.storchaka
files: dbm_dumb_deprecations.patch
keywords: patch
messages: 220185
nosy: Claudiu.Popa, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Deprecate nonstandard behavior of a dumbdbm database
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35558/dbm_dumb_deprecations.patch

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

Reply via email to