Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21729

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Use `with` statement in dbm.dumb
Type:enhancementStage:resolved
Components:Library (Lib)Versions:Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: Claudiu.Popa, python-dev, rhettinger, serhiy.storchaka
Priority:lowKeywords:patch

Created on2014-06-12 07:24 byClaudiu.Popa, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
dbm_with_open.patchClaudiu.Popa,2014-06-12 07:24review
Messages (5)
msg220335 -(view)Author: PCManticore (Claudiu.Popa)*(Python triager)Date: 2014-06-12 07:24
Hello.Here's a short patch for dbm.dumb, which uses in various places the `with` statement for opening and closing files. Thanks.
msg220379 -(view)Author: Raymond Hettinger (rhettinger)*(Python committer)Date: 2014-06-12 20:07
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.
msg221559 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-06-25 17:06
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.
msg221561 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-06-25 17:40
New changesetfdbcb11e0323 by Serhiy Storchaka in branch '3.4':Issue#21729: Used the "with" statement in the dbm.dumb module to ensurehttp://hg.python.org/cpython/rev/fdbcb11e0323New changesete41b4e8c0c1d by Serhiy Storchaka in branch 'default':Issue#21729: Used the "with" statement in the dbm.dumb module to ensurehttp://hg.python.org/cpython/rev/e41b4e8c0c1dNew changeset893e79196fb3 by Serhiy Storchaka in branch '2.7':Issue#21729: Used the "with" statement in the dbm.dumb module to ensurehttp://hg.python.org/cpython/rev/893e79196fb3
msg221563 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-06-25 17:49
Thanks Claudiu.Committed with yet one "with".
History
DateUserActionArgs
2022-04-11 14:58:04adminsetgithub: 65928
2014-06-25 17:49:51serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: +msg221563

stage: commit review -> resolved
2014-06-25 17:40:12python-devsetnosy: +python-dev
messages: +msg221561
2014-06-25 17:06:10serhiy.storchakasetstage: patch review -> commit review
messages: +msg221559
versions: + Python 2.7, Python 3.4
2014-06-12 20:07:33rhettingersetnosy: +rhettinger
messages: +msg220379
2014-06-12 08:11:25serhiy.storchakasetpriority: normal -> low
assignee:serhiy.storchaka
stage: patch review
2014-06-12 07:24:41Claudiu.Popacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp