[New-bugs-announce] [issue12638] urllib.URLopener prematurely deletes files on cleanup
report at bugs.python.org
Mon Jul 25 17:34:58 CEST 2011
New submission from Carl <carl at carlbook.com>:
urllib.URLopener (or urllib.request.URLopener for Python 3) and user defined classes that inherit from these prematurely delete files upon cleanup. Any temporary files downloaded using the .retrieve() method are deleted when an instance of a URLopener is garbage collected.
I feel this is a violation since the filename is returned to the caller and then silently deleted. It is possible to simply override the .cleanup() method, but I feel this is not a good solution.
title: urllib.URLopener prematurely deletes files on cleanup
versions: Python 2.6, Python 2.7, Python 3.2
Added file: http://bugs.python.org/file22750/bug2.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce