[issue16301] localhost() and thishost() in urllib/request.py

2012-10-27 Thread Senthil Kumaran
Senthil Kumaran added the comment: This is fixed in 3.3 and 3.2 3.2 5e71f2712076 3.3 30547e2cd04d -- resolution: -> fixed status: open -> closed versions: -Python 2.7 ___ Python tracker _

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: Buildbot still failing, but due to different reason. PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\buildbot\\appdata\\local\\temp\\tmpwwvqao' http://buildbot.python.org/all/builders

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-23 Thread Senthil Kumaran
Senthil Kumaran added the comment: > Serhiy Storchaka added the comment: > >> +tmp_fileurl = 'file://localhost' + tmp_file > > tmp_fileurl = 'file://localhost/' + tmp_file.replace(os.path.sep, '/') Ok, I realized the mistake. 'file://localhost' + tmpfile is getting expanded to 'f

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > +tmp_fileurl = 'file://localhost' + tmp_file tmp_fileurl = 'file://localhost/' + tmp_file.replace(os.path.sep, '/') -- ___ Python tracker _

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 478cda291bbc by Senthil Kumaran in branch 'default': Fix the ResourceWarning in test_urllib.py due changes made for #16301. Patch by Berker Peksag http://hg.python.org/cpython/rev/478cda291bbc -- ___ Pyt

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49de26395d1a by Senthil Kumaran in branch 'default': Issue #16301: Fix the localhost verification in urllib/request.py for file://. Modify tests to use localhost for local temp files, which could make Windows Buildbot (#16300) happy http://hg.pytho

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Serhiy: Yes. I stand corrected. That snippet suggestion was my mistake. I think, wrapping the test is better than changing the return of localhost. It would always return a single value. Thanks. -- ___ Python tracke

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is wrong too. >>> tuple('abc') ('a', 'b', 'c') Use ((localhost(),) + thishost())) -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue16301] localhost() and thishost() in urllib/request.py

2012-10-22 Thread Senthil Kumaran
New submission from Senthil Kumaran: localhost() returns a string and thishost() returns tuple. In urllib/request.py, for file:// protocol, there is a verification to check to if the host is in the localhost and check happens: socket.gethostbyname(host) in (localhost() + thishost())): This is