[Distutils] [issue7] allow-host will not allow local files
Tarek Ziadé
setuptools at bugs.python.org
Fri May 9 09:34:22 CEST 2008
New submission from Tarek Ziadé <ziade.tarek at gmail.com>:
while playing with the allow-host options in setuptools, I have noticed
that it is restricted to URLs because url_ok() uses urlparse
over the regular expressions that are provided
This means that it is not possible to allow local folders to be visited
since a "file://*" expression for example,
will lead to an empty string:
>>> import urlparse
>>> urlparse.urlparse('file:///tmp/my/local/file.tgz')[1]
''
This will make some links blocked and impossible to add as authorized
resource:
...
Link to file:///tmp/tmpE-LbUpbuildouttests/setuptools/ ***BLOCKED*** by
--allow-hosts
...
I have attached a patch to fix this.
----------
files: distutils.allow-hosts.patch
messages: 8
nosy: tarek
priority: bug
status: unread
title: allow-host will not allow local files
Added file: http://bugs.python.org/setuptools/file2/distutils.allow-hosts.patch
_______________________________________________
Setuptools tracker <setuptools at bugs.python.org>
<http://bugs.python.org/setuptools/issue7>
_______________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: distutils.allow-hosts.patch
Type: application/octet-stream
Size: 1281 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080509/21b2e977/attachment.obj>
More information about the Distutils-SIG
mailing list