[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2014-10-03 Thread R. David Murray
R. David Murray added the comment: Given that this has some backward compatibility implications (files getting overwritten that previously wouldn't have been), I think we should just leave 2.7 alone, so I'm closing this. -- nosy: +r.david.murray resolution: -> fixed stage: commit revi

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Brian Curtin
Brian Curtin added the comment: The 3.x side of things is taken care of. Still need to see if there is any issue on 2.7 where things are organized differently and dbm is in C. -- assignee: -> brian.curtin stage: -> commit review ___ Python tracker

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec8d64396be9 by briancurtin in branch '3.2': Fix #11491. When dbm.open was called with a file which already exists and http://hg.python.org/cpython/rev/ec8d64396be9 New changeset 0515206e36ed by briancurtin in branch 'default': Fix #11491. When dbm

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8d603a2a0af by briancurtin in branch '3.1': Fix #11491. When dbm.open was called with a file which already exists and http://hg.python.org/cpython/rev/f8d603a2a0af -- nosy: +python-dev ___ Python tracke

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Éric Araujo
Éric Araujo added the comment: Fortunately, addCleanup exists in 2.7 and 3.1. -- nosy: +eric.araujo ___ Python tracker ___ ___ Python

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Denver Coneybeare
Denver Coneybeare added the comment: Looks good to me. I thought the same thing about the file not being closed on error, but all of the other tests in the file also suffer from that problem, so I just followed the convention set out by the other tests. Maybe if you eventually commit this c

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Brian Curtin
Brian Curtin added the comment: Attached is a slightly updated version of the patch. If the assertEqual for any reason were to fail, the file wouldn't be closed, leading to a ResourceWarning. That'll work on 3.2+, but if this is backported consideration will have to be made there (try/finally

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-14 Thread Denver Coneybeare
Changes by Denver Coneybeare : -- nosy: +brian.curtin versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___ Python-

[issue11491] dbm.open(..., flag="n") raises dbm.error if file exists and is rejected by whichdb

2011-03-13 Thread Denver Coneybeare
New submission from Denver Coneybeare : dbm.open() with flag="n" raises dbm.error if the given file exists but whichdb doesn't recognize it. In the documentation for dbm.open() the "n" flag is documented to "Always create a new, empty database, open for reading and writing". To me, this impl