The bug tracker for setuptools 0.7 or higher is on BitBucket

 

Issue7

Title allow-host will not allow local files
Priority bug Status resolved
Superseder Nosy List pje, tarek
Assigned To Keywords

Created on 2008-05-09.07:34:22 by tarek, last changed 2008-08-21.17:56:26 by pje.

Files
File name Uploaded Type Edit Remove
distutils.allow-hosts.patch tarek, 2008-05-09.07:34:22 application/octet-stream
Messages
msg92 (view) Author: pje Date: 2008-08-21.17:56:26
Fixed in trunk and branch.
msg8 (view) Author: tarek Date: 2008-05-09.07:34:22
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.
History
Date User Action Args
2008-08-21 17:56:26pjesetstatus: in-progress -> resolved
nosy: + pje
messages: + msg92
2008-08-05 14:53:09pjesetstatus: unread -> in-progress
2008-05-09 07:34:22tarekcreate