Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Gary Poster

On Aug 23, 2010, at 3:25 PM, Gary Poster wrote:

> 
> On Aug 23, 2010, at 2:53 PM, Andreas Jung wrote:
> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>> 
>> Gary Poster wrote:
>> 
>>> 1.3.1 has change and is released.
>>> 
>> 
>> On it's failing in a different way:
>> 
>> An internal error occurred due to a bug in either zc.buildout or in a
>> recipe being used:
>> Traceback (most recent call last):
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1784, in main
>>   getattr(buildout, command)(args)
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 569, in install
>>   installed_files = self[part]._call(recipe.install)
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1276, in _call
>>   return f()
>> File
>> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
>> line 202, in install
>>   extra_eggs + \
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
>> line 173, in install
>>   return self._install(reqs, ws, scripts)
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
>> line 189, in _install
>>   options['bin-directory'],
>> File "/opt/python-2.6/lib/python2.6/UserDict.py", line 22, in __getitem__
>>   raise KeyError(key)
>> KeyError: 'bin-directory'
> 
> Please apply this patch to zc.recipe.egg and see if it fixes things for you.
> 
> 

Whether or not it fixed things for you, it was a good fix for the 1.3.1 change. 
 I released it as 1.3.2.

Gary

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Gary Poster

On Aug 23, 2010, at 2:53 PM, Andreas Jung wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Gary Poster wrote:
> 
>> 1.3.1 has change and is released.
>> 
> 
> On it's failing in a different way:
> 
> An internal error occurred due to a bug in either zc.buildout or in a
> recipe being used:
> Traceback (most recent call last):
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 1784, in main
>getattr(buildout, command)(args)
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 569, in install
>installed_files = self[part]._call(recipe.install)
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 1276, in _call
>return f()
>  File
> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
> line 202, in install
>extra_eggs + \
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
> line 173, in install
>return self._install(reqs, ws, scripts)
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
> line 189, in _install
>options['bin-directory'],
>  File "/opt/python-2.6/lib/python2.6/UserDict.py", line 22, in __getitem__
>raise KeyError(key)
> KeyError: 'bin-directory'

Please apply this patch to zc.recipe.egg and see if it fixes things for you.

Index: src/zc/recipe/egg/egg.py
===
--- src/zc/recipe/egg/egg.py(revision 115896)
+++ src/zc/recipe/egg/egg.py(working copy)
@@ -200,6 +200,9 @@
 
 class _BackwardsSupportOption(UserDict.UserDict):
 
+def __init__(self, data):
+self.data = data # We want to show mutations to the underlying dict.
+
 def query_bool(self, name, default=None):
 """Given a name, return a boolean value for that name.
 


Gary

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gary Poster wrote:

> 1.3.1 has change and is released.
> 

On it's failing in a different way:

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File
"/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
line 1784, in main
getattr(buildout, command)(args)
  File
"/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
line 569, in install
installed_files = self[part]._call(recipe.install)
  File
"/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
line 1276, in _call
return f()
  File
"/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
line 202, in install
extra_eggs + \
  File
"/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
line 173, in install
return self._install(reqs, ws, scripts)
  File
"/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.1-py2.6.egg/zc/recipe/egg/egg.py",
line 189, in _install
options['bin-directory'],
  File "/opt/python-2.6/lib/python2.6/UserDict.py", line 22, in __getitem__
raise KeyError(key)
KeyError: 'bin-directory'


Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMcsOdAAoJEADcfz7u4AZj/zQLwLCYKwQ4i150F6QwJPLQQfbK
nhm5z3G5a2FwsaTDlW3Y7KBy6vQQs42XzopZYouSu70GywQWloxaMS27ahtjHCrO
XOe655oMZuZrRaCTOdwv8gHvwk3t+3nuu+ZIRLArUNEzMcsIdXXGV8ASMZeP5z2j
2VDWlPo1lYhirb1rQcvG0k3S0kwJSKgv2axTGEDRqMf5pq0Nws/2tOqYb/47vEbw
N7Yi6yv/ituiIBHXLh8ozoIpZQOYKkgCYkFZ2T4nCwTNp1GlI6XSnVftb8P0jGN0
Gk7yfpE25ST8em5ZAAyS5K1csktMZOwyxDEe0f+/8d0oDjlbiy+apo5dyVOtMmp7
dRNVvfZPBPwDj2+IRoOzwADpEcK6RZtqrfsjpl1djgvMUsHidr79zG+mohE4mkK0
dONI2Tik74iNe08YU66QFT90ixi0MsV236kkjMTKK2gj/IYMw2BUZRhUAdopOW1R
oqZ2kRAQis0Le2zcB+5YbP7ufZ9avXs=
=7ec0
-END PGP SIGNATURE-
<>___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Gary Poster

On Aug 23, 2010, at 1:38 PM, Gary Poster wrote:

> 
> On Aug 23, 2010, at 1:26 PM, Gary Poster wrote:
> 
>> 
>> On Aug 23, 2010, at 12:36 PM, Andreas Jung wrote:
>> 
>>> zc.recipe.egg 1.3.0 fails badly with
>>> 
>>> While:
>>> Installing supervisor.
>>> Traceback (most recent call last):
>>> File
>>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>>> line 1784, in main
>>>  getattr(buildout, command)(args)
>>> File
>>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>>> line 569, in install
>>>  installed_files = self[part]._call(recipe.install)
>>> File
>>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>>> line 1276, in _call
>>>  return f()
>>> File
>>> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
>>> line 202, in install
>>>  extra_eggs + \
>>> File
>>> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.0-py2.6.egg/zc/recipe/egg/egg.py",
>>> line 159, in install
>>>  if options.query_bool('dependent-scripts', 'false'):
>>> AttributeError: 'dict' object has no attribute 'query_bool'
>>> 
>>> Not sure who is in charge and where the related bug tracker is!?
>> 
>> zc.recipe.egg 1.3.0 requires zc.buildout 1.5.0 or higher, as it states it 
>> setup.py.  Are you using zc.buildout 1.5.0?  If you are, then this is a bug 
>> in zc.recipe.egg (that I don't understand on the face of it; all tests pass, 
>> and Options objects now have a "query_bool" method).
>> 
>> If you are not forced to use zc.buildout 1.5.0 somehow, I don't know what 
>> the error there is.
> 
> Sorry, the traceback shows you are using zc.buildout 1.5.0.
> 
> I take it collective.recipe.supervisor does not use an Options object from 
> zc.buildout?  That is what is passed to zc.recipe.egg normally.  Options 
> objects now have a query_bool method, which reduces a lot of duplication of 
> code acrorss recipes.
> 
> I'd argue that this is a bug in the collective.recipe.supervisor, but I knew 
> at the start that zc.recipe.egg usage was likely to be fragile.  I'll put 
> together a more-backwards-compatible change later, hopefully today.

1.3.1 has change and is released.

Gary
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Andreas Jung
Gary Poster wrote:
> On Aug 23, 2010, at 12:36 PM, Andreas Jung wrote:
> 
>> zc.recipe.egg 1.3.0 fails badly with
>>
>> While:
>>  Installing supervisor.
>> Traceback (most recent call last):
>>  File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1784, in main
>>getattr(buildout, command)(args)
>>  File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 569, in install
>>installed_files = self[part]._call(recipe.install)
>>  File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1276, in _call
>>return f()
>>  File
>> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
>> line 202, in install
>>extra_eggs + \
>>  File
>> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.0-py2.6.egg/zc/recipe/egg/egg.py",
>> line 159, in install
>>if options.query_bool('dependent-scripts', 'false'):
>> AttributeError: 'dict' object has no attribute 'query_bool'
>>
>> Not sure who is in charge and where the related bug tracker is!?
> 
> zc.recipe.egg 1.3.0 requires zc.buildout 1.5.0 or higher, as it states it 
> setup.py.  Are you using zc.buildout 1.5.0? 

Using zc.buildout 1.5.0 here.

Andreas
<>___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Gary Poster

On Aug 23, 2010, at 1:26 PM, Gary Poster wrote:

> 
> On Aug 23, 2010, at 12:36 PM, Andreas Jung wrote:
> 
>> zc.recipe.egg 1.3.0 fails badly with
>> 
>> While:
>> Installing supervisor.
>> Traceback (most recent call last):
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1784, in main
>>   getattr(buildout, command)(args)
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 569, in install
>>   installed_files = self[part]._call(recipe.install)
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
>> line 1276, in _call
>>   return f()
>> File
>> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
>> line 202, in install
>>   extra_eggs + \
>> File
>> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.0-py2.6.egg/zc/recipe/egg/egg.py",
>> line 159, in install
>>   if options.query_bool('dependent-scripts', 'false'):
>> AttributeError: 'dict' object has no attribute 'query_bool'
>> 
>> Not sure who is in charge and where the related bug tracker is!?
> 
> zc.recipe.egg 1.3.0 requires zc.buildout 1.5.0 or higher, as it states it 
> setup.py.  Are you using zc.buildout 1.5.0?  If you are, then this is a bug 
> in zc.recipe.egg (that I don't understand on the face of it; all tests pass, 
> and Options objects now have a "query_bool" method).
> 
> If you are not forced to use zc.buildout 1.5.0 somehow, I don't know what the 
> error there is.

Sorry, the traceback shows you are using zc.buildout 1.5.0.

I take it collective.recipe.supervisor does not use an Options object from 
zc.buildout?  That is what is passed to zc.recipe.egg normally.  Options 
objects now have a query_bool method, which reduces a lot of duplication of 
code acrorss recipes.

I'd argue that this is a bug in the collective.recipe.supervisor, but I knew at 
the start that zc.recipe.egg usage was likely to be fragile.  I'll put together 
a more-backwards-compatible change later, hopefully today.

Gary
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Gary Poster

On Aug 23, 2010, at 12:36 PM, Andreas Jung wrote:

> zc.recipe.egg 1.3.0 fails badly with
> 
> While:
>  Installing supervisor.
> Traceback (most recent call last):
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 1784, in main
>getattr(buildout, command)(args)
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 569, in install
>installed_files = self[part]._call(recipe.install)
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.buildout-1.5.0-py2.6.egg/zc/buildout/buildout.py",
> line 1276, in _call
>return f()
>  File
> "/Users/ajung/sandboxes/occ/eggs/collective.recipe.supervisor-0.12-py2.6.egg/collective/recipe/supervisor/__init__.py",
> line 202, in install
>extra_eggs + \
>  File
> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.0-py2.6.egg/zc/recipe/egg/egg.py",
> line 159, in install
>if options.query_bool('dependent-scripts', 'false'):
> AttributeError: 'dict' object has no attribute 'query_bool'
> 
> Not sure who is in charge and where the related bug tracker is!?

zc.recipe.egg 1.3.0 requires zc.buildout 1.5.0 or higher, as it states it 
setup.py.  Are you using zc.buildout 1.5.0?  If you are, then this is a bug in 
zc.recipe.egg (that I don't understand on the face of it; all tests pass, and 
Options objects now have a "query_bool" method).

If you are not forced to use zc.buildout 1.5.0 somehow, I don't know what the 
error there is.

Gary
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] zc.recipe.egg bug (tracker)?

2010-08-23 Thread Chris Withers
Andreas Jung wrote:
> "/Users/ajung/sandboxes/occ/eggs/zc.recipe.egg-1.3.0-py2.6.egg/zc/recipe/egg/egg.py",
> line 159, in install
> if options.query_bool('dependent-scripts', 'false'):
> AttributeError: 'dict' object has no attribute 'query_bool'
> 
> Not sure who is in charge and where the related bug tracker is!?

Best bet is distutils-sig and/or Gary Poster direct at the moment...

Chris


___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )