Maximum recursion depth exceeded while attempting to upgrade setuptools on Mac OS X

Bug #430775 reported by Laurence Rowe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

Running buildout on my Mac (10.5) with newest=true fails while attempting to upgrade setuptools. This is with setuptools 0.6c9 and zc.buildout 1.4.1. The same buildout works fine on linux. This is with a plain python2.6 built from source.

The buildout.cfg
============

[buildout]
parts = test

[test]
recipe = zc.recipe.egg
eggs =
interpreter = py

buildout command and traceback
========================

$ bin/buildout -vvv
Installing 'zc.buildout', 'setuptools'.
We have the best distribution that satisfies 'zc.buildout'.
Picked: zc.buildout = 1.4.1
Getting distribution for 'setuptools'.
...
Getting distribution for 'setuptools'.
While:
  Installing.
  Checking for upgrades.
  Getting distribution for 'setuptools'.
...
  Getting distribution for 'setuptools'.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 1659, in main
    getattr(buildout, command)(args)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 381, in install
    self._maybe_upgrade()
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 804, in _maybe_upgrade
    allow_hosts = self._allow_hosts
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 800, in install
    return installer.install(specs, working_set)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 646, in install
    for dist in self._get_dist(requirement, ws, self._always_unzip):
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
    dist.location, ws, self._dest, dist)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 301, in _call_easy_install
    ws, False,
...
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
    dist.location, ws, self._dest, dist)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 301, in _call_easy_install
    ws, False,
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 475, in _get_dist
    dist, avail = self._satisfied(requirement)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 243, in _satisfied
    best_available = self._obtain(req, source)
  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 399, in _obtain
    if index.obtain(requirement) is None:
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 318, in obtain
    self.prescan(); self.find_packages(requirement)
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 303, in find_packages
    self.scan_url(self.index_url + requirement.unsafe_name+'/')
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 617, in scan_url
    self.process_url(url, True)
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 174, in process_url
    dists = list(distros_for_url(url))
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 50, in distros_for_url
    base, fragment = egg_info_for_url(url)
  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 43, in egg_info_for_url
    scheme, server, path, parameters, query, fragment = urlparse.urlparse(url)
  File "/data/devel/collective/python/boot/lib/python2.6/urlparse.py", line 108, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/data/devel/collective/python/boot/lib/python2.6/urlparse.py", line 139, in urlsplit
    allow_fragments = bool(allow_fragments)
RuntimeError: maximum recursion depth exceeded while calling a Python object

Revision history for this message
Jim Fulton (jim-zope) wrote : Re: [Bug 430775] [NEW] Maximum recursion depth exceeded while attempting to upgrade setuptools on Mac OS X
Download full text (4.5 KiB)

I can't reproduce this. I might be able to suggest something if you
included the full traceback.

Jim

On Wed, Sep 16, 2009 at 10:49 AM, Laurence Rowe <email address hidden> wrote:
> Public bug reported:
>
> Running buildout on my Mac (10.5) with newest=true fails while
> attempting to upgrade setuptools. This is with setuptools 0.6c9 and
> zc.buildout 1.4.1. The same buildout works fine on linux. This is with a
> plain python2.6 built from source.
>
> The buildout.cfg
> ============
>
> [buildout]
> parts = test
>
> [test]
> recipe = zc.recipe.egg
> eggs =
> interpreter = py
>
> buildout command and traceback
> ========================
>
> $ bin/buildout -vvv
> Installing 'zc.buildout', 'setuptools'.
> We have the best distribution that satisfies 'zc.buildout'.
> Picked: zc.buildout = 1.4.1
> Getting distribution for 'setuptools'.
> ...
> Getting distribution for 'setuptools'.
> While:
>  Installing.
>  Checking for upgrades.
>  Getting distribution for 'setuptools'.
> ...
>  Getting distribution for 'setuptools'.
>
> An internal error occured due to a bug in either zc.buildout or in a
> recipe being used:
> Traceback (most recent call last):
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 1659, in main
>    getattr(buildout, command)(args)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 381, in install
>    self._maybe_upgrade()
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/buildout.py", line 804, in _maybe_upgrade
>    allow_hosts = self._allow_hosts
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 800, in install
>    return installer.install(specs, working_set)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 646, in install
>    for dist in self._get_dist(requirement, ws, self._always_unzip):
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
>    dist.location, ws, self._dest, dist)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 301, in _call_easy_install
>    ws, False,
> ...
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
>    dist.location, ws, self._dest, dist)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 301, in _call_easy_install
>    ws, False,
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 475, in _get_dist
>    dist, avail = self._satisfied(requirement)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 243, in _satisfied
>    best_available = self._obtain(req, source)
>  File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 399, in _obtain
>    if index.obtain(requirement) is None:
>  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py", line 318, in obtain
>    self.prescan(); self.find_packages(requirement)
>  File "/data/buildout/eggs/setuptools-0.6c9-py2.6.egg/setuptools/package_index.p...

Read more...

Revision history for this message
Laurence Rowe (lrowe) wrote :

Only the repeating sections have been removed from the traceback. In
each case there are about 500 / 2000 lines of:

1.
Getting distribution for 'setuptools'.

2.
 Getting distribution for 'setuptools'.

3.
 File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py",
line 543, in _get_dist
   dist.location, ws, self._dest, dist)
 File "/data/buildout/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py",
line 301, in _call_easy_install
   ws, False,

I've had one other person confirm that it is repeatable on their Mac.

I've attached the full traceback along with some locals() information
from running buildout -D. If anything else would be helpful I can try
and get the information for you.

Laurence

Revision history for this message
Andrew (a-ndrew) wrote :

Easy workaround: pin setuptools version in your [version] slot to latest one like this:

[versions]
setuptools = 0.6c9

Revision history for this message
kleist (kleist) wrote :
Download full text (4.3 KiB)

I got a similar error message when running the Plone 4 coredev buildout, using openSUSE 10.3 (X86-64). I haven't explicitly installed setuptools, only as part of "distribute". Instead of the "Getting distribution for 'setuptools'" message above, I got "Getting distribution for 'distribute'".

  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
    dist.location, ws, self._dest, dist)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 301, in _call_easy_install
    ws, False,
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/buildout.dumppickedversions-0.4-py2.6.egg/buildout/dumppickedversions/__init__.py", line 27, in get_dist
    dists = old_get_dist(self, requirement, ws, always_unzip)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 494, in _get_dist
    dist = self._fetch(avail, tmp, self._download_cache)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/zc.buildout-1.4.1-py2.6.egg/zc/buildout/easy_install.py", line 457, in _fetch
    new_location = self._index.download(dist.location, tmp)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 396, in download
    found = self._download_url(scheme.group(1), spec, tmpdir)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 630, in _download_url
    return self._attempt_download(url, filename)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 639, in _attempt_download
    headers = self._download_to(url, filename)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 546, in _download_to
    fp = self.open_url(url)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 583, in open_url
    return open_with_auth(url)
  File "/home/zope/buildouts/zope-instances/plone4coredev/eggs/distribute-0.6.6-py2.6.egg/setuptools/package_index.py", line 735, in open_with_auth
    fp = urllib2.urlopen(request)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 124, in urlopen
    return _opener.open(url, data, timeout)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 389, in open
    response = self._open(req, data)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 407, in _open
    '_open', req)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 367, in _call_chain
    result = func(*args)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 1140, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/home/zope/local/python-2.6.3/lib/python2.6/urllib2.py", line 1112, in do_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/home/zope/local/py...

Read more...

Revision history for this message
kleist (kleist) wrote :

It turned out that my issue was caused by an incorrect "executable" option in $HOME/.buildout/default.cfg.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.