Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7169] zipfile leaves a file handle open if file is zero size

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Oct 19, 2009, 6:33 AM

Post #1 of 8 (352 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size

New submission from skelker <steve.kelker [at] dtn>:

I noticed today if I attempt to create a ZipFile object for read access,
and the zip file is zero bytes, the ZipFile object throws an exception,
but there is still an open handle to the file. So if I catch that
exception, and then try to delete the file, the delete then fails. I
have attached a script that replicates the issue.

----------
components: Windows
files: zipfileCrash.py
messages: 94236
nosy: skelker
severity: normal
status: open
title: zipfile leaves a file handle open if file is zero size
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file15165/zipfileCrash.py

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 26, 2009, 2:18 AM

Post #2 of 8 (297 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

Ryan Leslie <rylesny [at] gmail> added the comment:

I expect this should already be fixed by the commit in
http://bugs.python.org/issue6511

BadZipFile will now be raised for empty files rather than IOError, and
so ZipFile._GetContents() should now also close the file.

The fix was committed to trunk, but I don't see it merged into 2.6.

----------
nosy: +amaury.forgeotdarc, ryles

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 26, 2009, 5:42 AM

Post #3 of 8 (298 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

skelker <steve.kelker [at] dtn> added the comment:

Thanks. I did do a search before opening my ticket. Not sure why I didn't see that in my search. Sorry for the duplicate ticket.

Steve Kelker
(952)882-4381 (or x4381)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 26, 2009, 5:43 AM

Post #4 of 8 (297 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

skelker <steve.kelker [at] dtn> added the comment:

Fixed in http://bugs.python.org/issue6511

----------
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 28, 2009, 7:19 AM

Post #5 of 8 (285 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

Brian Curtin <curtin [at] acm> added the comment:

Since the issue exists in 2.6 and is only currently fixed on trunk and
beyond, shouldn't the 6511 fix make it's way backwards into 2.6.x?

----------
nosy: +brian.curtin

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 28, 2009, 7:37 AM

Post #6 of 8 (285 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

skelker <steve.kelker [at] dtn> added the comment:

That would be great. Perhaps that should be discussed in 6511. I'll make a note there.

Steve Kelker
(952)882-4381 (or x4381)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 28, 2009, 11:02 AM

Post #7 of 8 (285 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

Ryan Leslie <rylesny [at] gmail> added the comment:

Yes, I think this fix should have been included in the 2.6 branch. I
subscribed Amaury to look into that when I last updated.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Oct 28, 2009, 12:19 PM

Post #8 of 8 (285 views)
Permalink
[issue7169] zipfile leaves a file handle open if file is zero size [In reply to]

R. David Murray <rdmurray [at] bitdance> added the comment:

The 2.6 branch was frozen except for critical issues during the release
process for 2.6.3 and then 2.6.4. Now that 2.6.4 is out, the bug fix
can be backported.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7169>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.