[issue21729] Use `with` statement in dbm.dumb

2014-06-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, month ago I wrote large patch which use 'with' in various places in stdlib 
for opening and closing files. But then I dropped it because afraid that it can 
be considered as code churn.

--
stage: patch review - commit review
versions: +Python 2.7, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21729] Use `with` statement in dbm.dumb

2014-06-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fdbcb11e0323 by Serhiy Storchaka in branch '3.4':
Issue #21729: Used the with statement in the dbm.dumb module to ensure
http://hg.python.org/cpython/rev/fdbcb11e0323

New changeset e41b4e8c0c1d by Serhiy Storchaka in branch 'default':
Issue #21729: Used the with statement in the dbm.dumb module to ensure
http://hg.python.org/cpython/rev/e41b4e8c0c1d

New changeset 893e79196fb3 by Serhiy Storchaka in branch '2.7':
Issue #21729: Used the with statement in the dbm.dumb module to ensure
http://hg.python.org/cpython/rev/893e79196fb3

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21729] Use `with` statement in dbm.dumb

2014-06-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Claudiu.

Committed with yet one with.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21729] Use `with` statement in dbm.dumb

2014-06-12 Thread Claudiu.Popa

New submission from Claudiu.Popa:

Hello.

Here's a short patch for dbm.dumb, which uses in various places the `with` 
statement for opening and closing files. Thanks.

--
components: Library (Lib)
files: dbm_with_open.patch
keywords: patch
messages: 220335
nosy: Claudiu.Popa, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use `with` statement in dbm.dumb
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35588/dbm_with_open.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21729] Use `with` statement in dbm.dumb

2014-06-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
priority: normal - low
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21729] Use `with` statement in dbm.dumb

2014-06-12 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, after reviewing this, consider backporting it.

The original code doesn't have a try/finally around the close() call and that 
could be considered a bug.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21729
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com