[Distutils] setuptools process_url doesn't handle URLErrors gracefullly

Jim Fulton jim at zope.com
Mon May 14 15:52:45 CEST 2007


This problem is rather serious.  As we rely more and more on  
setuptools, it needs to be robust in the presence of this sort of  
failure.

Phillip, If I fix this, can we get a timely release with the fix?  
(Otherwise, I'll work on a fix in buildout.)

Jim

On May 11, 2007, at 4:21 AM, Christian Theune wrote:

> Hi,
>
> I'm fighting against a  problem where the DNS name of the homepage  
> of a
> package that is listed on the cheeseshop isn't accessible any more. In
> this special case the DNS name for this thing is gone (the package is
> `rwproperty` the missing DNS entry is z3lab.org).
>
> In this case easy_install dies with the following error, although the
> eggs are listed on the cheeseshop page and the listed homepage is  
> pretty
> irrelevant:
>
> Searching for rwproperty
> Reading http://cheeseshop.python.org/pypi/rwproperty/
> Reading
> http://www.z3lab.org/sections/blogs/philipp-weitershausen/ 
> 2006_05_29_pycon-06-lightning-talk
> Traceback (most recent call last):
>   File "/usr/bin/easy_install", line 7, in ?
>     sys.exit(
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/command/easy_install.py", line 1670, in main
>     with_ei_usage(lambda:
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/command/easy_install.py", line 1659, in with_ei_usage
>     return f()
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/command/easy_install.py", line 1674, in <lambda>
>     distclass=DistributionWithoutHelpCommands, **kw
>   File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
>     dist.run_commands()
>   File "/usr/lib/python2.4/distutils/dist.py", line 946, in  
> run_commands
>     self.run_command(cmd)
>   File "/usr/lib/python2.4/distutils/dist.py", line 966, in  
> run_command
>     cmd_obj.run()
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/command/easy_install.py", line 211, in run
>     self.easy_install(spec, not self.no_deps)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/command/easy_install.py", line 432, in easy_install
>     dist = self.package_index.fetch_distribution(
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 462, in fetch_distribution
>     self.find_packages(requirement)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 303, in find_packages
>     self.scan_url(self.index_url + requirement.unsafe_name+'/')
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 610, in scan_url
>     self.process_url(url, True)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 201, in process_url
>     page = self.process_index(url, page)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 278, in process_index
>     self.scan_url(new_url)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 610, in scan_url
>     self.process_url(url, True)
>   File
> "/usr/lib/python2.4/site-packages/setuptools-0.6c5-py2.4.egg/ 
> setuptools/package_index.py", line 191, in process_url
>     self.fetched_urls[url] = self.fetched_urls[f.url] = True
> AttributeError: URLError instance has no attribute 'url'
>
> I didn't find any switch to turn to make this go away and I don't know
> the setuptools code so my few feeble attempts to fix this didn't work
> out.
>
> Some help would be very appreciated.
>
> Christian
>
>
> -- 
> gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
> www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
> fax +49 345 122 9889 1 - zope and plone consulting and development
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> http://mail.python.org/mailman/listinfo/distutils-sig

--
Jim Fulton			mailto:jim at zope.com		Python Powered!
CTO 				(540) 361-1714			http://www.python.org
Zope Corporation	http://www.zope.com		http://www.zope.org





More information about the Distutils-SIG mailing list