[issue12638] urllib.URLopener prematurely deletes files on cleanup

2021-05-08 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2021-05-08 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2021-03-26 Thread Irit Katriel
Irit Katriel added the comment: I think this is out of date as this feature was deprecated in issue10050. -- components: +Library (Lib) -None nosy: +iritkatriel status: open -> pending ___ Python tracker ___

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2011-07-25 Thread Carl
Carl added the comment: @orsenthil, that is the correct behavior if you do not want to override any of URLopener's handlers for error codes. In my case, I wanted to override FancyURLopener (a child class of URLopener) to override HTTP 401 behavior. Using urlretrieve is not correct in this c

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2011-07-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: Tracker stripped off the code. Here is it. import urllib.request urllib.request.urlretrieve('http://bugs.python.org') ('/tmp/tmpe873xe', ) import os os.stat('/tmp/tmpe873xe') posix.stat_result(st_mode=33152, st_ino=4462517, st_dev=2054, st_nlink=1, st_uid=100

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2011-07-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: urlretrieve is a helper function from urllib module. The way to use it is: ('/tmp/tmpe873xe', ) >>> import os >>> os.stat('/tmp/tmpe873xe') Works! -- ___ Python tracker __

Re: [issue12638] urllib.URLopener prematurely deletes files on cleanup

2011-07-25 Thread Senthil Kumaran
urlretrieve is a helper function from urllib module. The way to use it is: >>> import urllib.request >>> urllib.request('http://bugs.python.org') ('/tmp/tmpe873xe', ) >>> import os >>> os.stat('/tmp/tmpe873xe') posix.stat_result(st_mode=33152, st_ino=4462517, st_dev=2054, st_nlink=1, st_uid=1000,

[issue12638] urllib.URLopener prematurely deletes files on cleanup

2011-07-25 Thread Carl
New submission from Carl : 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 col