-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
urllib2 mangles file://-scheme URLs #52902
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
Comments
$ touch /tmp/x.html
$ python -c 'import urllib2;resp=urllib2.urlopen("file:///tmp/x.html");print resp.geturl()'
file:/tmp/x.html note the missing // after the colon |
Fixed in r80953, r80954 , r80955 and r80956. |
Major buildbot failures caused by this change, eg: ERROR: test_file (test.test_urllib2net.OtherNetworkTests) Traceback (most recent call last):
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_urllib2net.py", line 126, in test_file
self._test_urls(urls, self._extra_handlers(), retry=True)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_urllib2net.py", line 175, in _test_urls
f = urlopen(url, req, TIMEOUT)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_urllib2net.py", line 28, in wrapped
return _retry_thrice(func, exc, *args, **kwargs)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/test/test_urllib2net.py", line 19, in _retry_thrice
return func(*args, **kwargs)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/urllib2.py", line 391, in open
response = self._open(req, data)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/urllib2.py", line 409, in _open
'_open', req)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/urllib2.py", line 1257, in file_open
return self.open_local_file(req)
File "/home/buildbot/slave/py-build/2.6.norwitz-amd64/build/Lib/urllib2.py", line 1291, in open_local_file
headers, 'file://'+ host + file)
TypeError: cannot concatenate 'str' and 'NoneType' objects |
On Sat, May 8, 2010 at 10:04 AM, Jean-Paul Calderone
Okay, I see where the problem is. I shall quickly fix it. |
Fixed the change which resulted in Buildbots failure. Those should |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: