Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aifc: close() does not close the underlying file #50205

Closed
amauryfa opened this issue May 7, 2009 · 4 comments
Closed

aifc: close() does not close the underlying file #50205

amauryfa opened this issue May 7, 2009 · 4 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@amauryfa
Copy link
Member

amauryfa commented May 7, 2009

BPO 5955
Nosy @amauryfa, @benjaminp, @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/bitdancer'
closed_at = <Date 2009-05-08.12:14:58.303>
created_at = <Date 2009-05-07.10:02:35.872>
labels = ['type-bug', 'library']
title = 'aifc: close() does not close the underlying file'
updated_at = <Date 2009-05-08.12:14:58.302>
user = 'https://github.com/amauryfa'

bugs.python.org fields:

activity = <Date 2009-05-08.12:14:58.302>
actor = 'georg.brandl'
assignee = 'r.david.murray'
closed = True
closed_date = <Date 2009-05-08.12:14:58.303>
closer = 'georg.brandl'
components = ['Library (Lib)']
creation = <Date 2009-05-07.10:02:35.872>
creator = 'amaury.forgeotdarc'
dependencies = []
files = []
hgrepos = []
issue_num = 5955
keywords = []
message_count = 4.0
messages = ['87365', '87369', '87370', '87376']
nosy_count = 3.0
nosy_names = ['amaury.forgeotdarc', 'benjamin.peterson', 'r.david.murray']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue5955'
versions = []

@amauryfa
Copy link
Member Author

amauryfa commented May 7, 2009

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.

@benjaminp
Copy link
Contributor

Fixed in r72422.

@amauryfa
Copy link
Member Author

amauryfa commented May 7, 2009

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.

@amauryfa amauryfa reopened this May 7, 2009
@bitdancer
Copy link
Member

Fixed in r72425.

@bitdancer bitdancer added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 7, 2009
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants