← 输入框|bugs.python.org|刷新

➜

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
标题: FD leaks in aifc module
类型: resource usage Stage: resolved
Components: Library (Lib) Versions: Python 3.2, Python 3.3, Python 3.4, Python 2.7
process
状态: closed Resolution: fixed
Dependencies: 后续:
分配给: serhiy.storchaka 抄送列表: ezio.melotti, georg.brandl, jcea, python-dev, r.david.murray, serhiy.storchaka
优先级: normal 关键字: patch

Created on 2012-11-16 12:49 by serhiy.storchaka, last changed 2022-04-11 14:57 by admin. This issue is now closed.

文件
文件名 上传时间 Description 编辑
aifc_close.patch serhiy.storchaka, 2012-11-16 13:35 Patch for 3.x review
aifc_close-2.7.patch serhiy.storchaka, 2012-11-16 13:35 Patch for 2.7 review
Messages (8)
msg175683 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 日期: 2012-11-16 12:49
Aifc_write.close() can raise exception and left the internal file object not closed.  The patch closes the file object even in case of error and reset _file to None even in case of the file object close() raises an exception, so that Aifc_write.close() can be called repeatedly.
msg175685 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) 日期: 2012-11-16 12:59
Adding "with" support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API.  Does this change (indirectly) add "with" support to any part of the public API?
msg175686 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 日期: 2012-11-16 13:35
Sorry, I miss that test_close() already exists. Merged.
msg175688 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 日期: 2012-11-16 13:43
> Adding "with" support to Aifc_write looks like a new feature, but Aifc_write doesn't seem to be part of the public API.  Does this change (indirectly) add "with" support to any part of the public API?

Don't pay attention, it was a wrong patch.  For "with" support see issue16486.
msg178325 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 日期: 2012-12-27 20:44
If no one objects I will commit this next year.
msg178366 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) 日期: 2012-12-28 07:20
Looks good to me, except:
the patch contains unrelated whitespace changes.  Please don't commit them along the fix.  If you think they are really necessary, they should go in a separate commit.
msg178388 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) 日期: 2012-12-28 16:29
Of course. Thanks for point. It's my editor made wrong whitespace changes after block indent/unindent. "hg diff" shows this changes and I shouldn't miss this. I will review every patch before commit one more time.
msg178533 - (view) Author: Roundup Robot (python-dev) (Python triager) 日期: 2012-12-29 20:46
New changeset cf8d692cc847 by Serhiy Storchaka in branch '2.7':
Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file.
http://hg.python.org/cpython/rev/cf8d692cc847

New changeset e3c4e9f4ea0f by Serhiy Storchaka in branch '3.2':
Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file.
http://hg.python.org/cpython/rev/e3c4e9f4ea0f

New changeset 9a571c4a16d1 by Serhiy Storchaka in branch '3.3':
Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file.
http://hg.python.org/cpython/rev/9a571c4a16d1

New changeset 79a8f6e1dfb0 by Serhiy Storchaka in branch 'default':
Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file.
http://hg.python.org/cpython/rev/79a8f6e1dfb0
历史
日期 用户 动作 参数
2022-04-11 14:57:38admin修改github: 60689
2013-01-27 02:05:17jcea修改抄送: + jcea
2012-12-29 21:00:53serhiy.storchaka修改resolution: works for me -> fixed
2012-12-29 20:57:42serhiy.storchaka修改状态: open -> closed
stage: patch review -> resolved
resolution: works for me
versions: + Python 2.7
2012-12-29 20:46:32python-dev修改抄送: + python-dev
消息: + msg178533
2012-12-28 16:29:14serhiy.storchaka修改消息: + msg178388
2012-12-28 07:20:56georg.brandl修改抄送: + georg.brandl
消息: + msg178366
2012-12-27 20:47:30serhiy.storchaka修改assignee: serhiy.storchaka
2012-12-27 20:44:45serhiy.storchaka修改消息: + msg178325
2012-11-16 13:43:09serhiy.storchaka修改消息: + msg175688
2012-11-16 13:41:15serhiy.storchaka链接issue16486 dependencies
2012-11-16 13:35:16serhiy.storchaka修改文件: + aifc_close.patch, aifc_close-2.7.patch

消息: + msg175686
2012-11-16 13:32:54serhiy.storchaka修改文件: - aifc_close.patch
2012-11-16 13:32:50serhiy.storchaka修改文件: - aifc_close-2.7.patch
2012-11-16 12:59:31ezio.melotti修改抄送: + ezio.melotti

消息: + msg175685
stage: patch review
2012-11-16 12:54:33serhiy.storchaka修改文件: + aifc_close-2.7.patch
2012-11-16 12:54:02serhiy.storchaka修改文件: + aifc_close.patch
抄送: + r.david.murray
2012-11-16 12:53:26serhiy.storchaka修改文件: - aifc_close.patch
2012-11-16 12:49:33serhiy.storchaka创建