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.

Title: aifc: close() does not close the underlying file
Type: behavior Stage: resolved
Components: Library (Lib) Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: r.david.murray Nosy List: amaury.forgeotdarc, benjamin.peterson, r.david.murray
Priority: normal Keywords:

Created on 2009-05-07 10:02 by amaury.forgeotdarc, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg87365 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-05-07 10:02
Seen on Windows buildbot:
'test_aifc' left behind file '@test' and it couldn't be removed: [Error
32] The process cannot access the file because it is being used by
another process: '@test'

This is because Aifc_read.close() does not close the underlying file.
msg87369 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-05-07 11:45
Fixed in r72422.
msg87370 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-05-07 12:05
Sorry, but the problem still exists.
self._file is a chunk.Chunk object, and its close() method does nothing.

Adding "self.file = None" at the end of chunk.Chunk.close() helps, even
if this relies on reference counting to close the file.
msg87376 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2009-05-07 16:58
Fixed in r72425.
Date User Action Args
2022-04-11 14:56:48adminsetgithub: 50205
2009-05-08 12:14:58georg.brandlsetstatus: open -> closed
2009-05-07 16:58:56r.david.murraysetpriority: normal

components: + Library (Lib)
type: behavior
nosy: amaury.forgeotdarc, benjamin.peterson, r.david.murray
messages: + msg87376
resolution: fixed
stage: resolved
2009-05-07 12:05:06amaury.forgeotdarcsetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg87370
2009-05-07 11:45:52benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg87369
2009-05-07 10:02:35amaury.forgeotdarccreate