[Distutils] bootstrap.py/ez_setup doesn't understand username:passwd in URLs
Attila Oláh
attilaolah at gmail.com
Wed Aug 25 06:26:13 CEST 2010
Hello,
Here's my traceback:
$ python bootstrap.py --distribute
--download-base=https://username:password@pypi.example.com/
Downloading https://username:password@pypi.example.com/distribute-0.6.14.tar.gz
Traceback (most recent call last):
File "bootstrap.py", line 171, in <module>
ez['use_setuptools'](**setup_args)
File "<string>", line 145, in use_setuptools
File "<string>", line 124, in _do_download
File "<string>", line 193, in download_setuptools
File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib64/python2.6/urllib2.py", line 1178, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib64/python2.6/urllib2.py", line 1116, in do_open
h = http_class(host, timeout=req.timeout) # will parse host:port
File "/usr/lib64/python2.6/httplib.py", line 1105, in __init__
HTTPConnection.__init__(self, host, port, strict, timeout)
File "/usr/lib64/python2.6/httplib.py", line 661, in __init__
self._set_hostport(host, port)
File "/usr/lib64/python2.6/httplib.py", line 686, in _set_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: 'password at pypi.example.com'
Since URLs like
"https://username:password@pypi.example.com/distribute-0.6.14.tar.gz"
seem to be handled well by *urllib*, but not by *urllib2*, I wonder
why are they handled by urllib2 instead of urllib.
I know it doesn't make sense to put a password on the site that hosts
distribute/setuptools, but we have a private PyPI and we'd like to use
that as --download-base too.
Attila
More information about the Distutils-SIG
mailing list