[Zope3-Users] zope.sqlalchemy problems

2008-09-10 Thread Andre Schubert
Hi,

iam working on an large project since several years implemented with Zope2.
Now its time to make a big rework of our project, and thats the right time to 
switch it to Z3.
Because our data are stored in an PostgresDB i tried to play a little bit with 
Z3 and Postgres.
While searching through the archives i think Z3 + SQLAlchemy + zope.sqlalchemy 
is a rebust solution.

Because the data are represented as a tree-structure i tried to reimplement
a zope.app.folder.Folder, that the contained objects are fetched from Postgres 
via zope.sqlalchemy.

The good point here ist, that i could traverse to the object in the Postgres-DB 
via
http://www.example.com/SAFolder/User/@@SelectedManagementView.html;.
I could see the ZMI and modify the data inside the Postgres-DB.

The only problem is with my Folder implementation.
If i try to access it directly via
http://www.example.com/SAFolder/@@SelectedManagementView.html;
i get the following error:

Traceback (most recent call last):
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.publisher-3.5.3-py2.4.egg/zope/publisher/publish.py,
 line 133, in publish
result = publication.callObject(request, obj)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publication-3.4.3-py2.4.egg/zope/app/publication/zopepublication.py,
 line 167, in callObject
return mapply(ob, request.getPositionalArguments(), request)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.publisher-3.5.3-py2.4.egg/zope/publisher/publish.py,
 line 108, in mapply
return debug_call(obj, args)
   - __traceback_info__: security proxied 
zope.app.publisher.browser.viewmeta.ManagementViewSelector instance at 
0xaca466c
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.publisher-3.5.3-py2.4.egg/zope/publisher/publish.py,
 line 114, in debug_call
return obj(*args)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publisher-3.5.0-py2.4.egg/zope/app/publisher/browser/managementviewselector.py,
 line 35, in __call__
item = getFirstMenuItem('zmi_views', self.context, self.request)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publisher-3.5.0-py2.4.egg/zope/app/publisher/browser/menu.py,
 line 195, in getFirstMenuItem
items = getMenu(id, object, request)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publisher-3.5.0-py2.4.egg/zope/app/publisher/browser/menu.py,
 line 190, in getMenu
return menu.getMenuItems(object, request)
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publisher-3.5.0-py2.4.egg/zope/app/publisher/browser/menu.py,
 line 55, in getMenuItems
if item.available():
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.app.publisher-3.5.0-py2.4.egg/zope/app/publisher/browser/menu.py,
 line 134, in available
if not canAccess(view, '__call__'):
  File 
/root/virtualzope1/cmms1/buildout-eggs/zope.security-3.5.2-py2.4-linux-i686.egg/zope/security/checker.py,
 line 134, in canAccess
checker.check_getattr(obj, name)
ForbiddenAttribute: ('__call__', satest1.user.User object at 0xb47322c)

I hope someone could help me a little bit.

Regards,
Andre


pgpDxJ16JNvpB.pgp
Description: PGP signature
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Santiago Videla
Hi people,

I want to use zc.async in  a Zope2/Plone web app. The problem that I found
it's that zc.async requires zope.testing.
When I run buildout it seems that zope.testing overwrite the testing module
from zope2 (instance/lib/python/zope/testing) and when I try to run my
automated tests I get an error in testrunner.py about 'other' attribute

The questions are:
* it's possible to run zc.async over Zope2 ? I think it is, in fact, I have
it running (I think), but the tests get broken as I said
* How can I solve this problem?? There is any way to say in the
buildout.cfg: Ignore the zope.testing package
   I guess that I won't be able to run the tests for zc.async, but I can
live with that...
* If I find a way to remove zope.testing, (downloading the source and
removing that requirement, I know it's ugly) could that get me into troubles
??
* Could zope.testing be require for something else than tests over zc.async
and it's dependecies??

thanks in advance

-- 
Santiago Videla
www.revolucionesweb.com.ar
http://www.linkedin.com/in/svidela

Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el
pensamiento que se hace corazón resplandece con la palabra sencilla y
humilde que [EMAIL PROTECTED] [EMAIL PROTECTED] somos.
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Gary Poster

On Sep 10, 2008, at 2:55 PM, Santiago Videla wrote:

 Hi people,

Hi!

 I want to use zc.async in  a Zope2/Plone web app. The problem that I  
 found it's that zc.async requires zope.testing.
 When I run buildout it seems that zope.testing overwrite the testing  
 module from zope2 (instance/lib/python/zope/testing) and when I try  
 to run my automated tests I get an error in testrunner.py about  
 'other' attribute

That's a shame.  Could it be that, if you specify a version of  
zope.testing in your setup.py that is equivalent to the version of  
zope.testing in your Plone app, the overwriting happens but without  
ill effects?  I bet that would work.

 The questions are:
 * it's possible to run zc.async over Zope2 ?

I sure hope so.  I intend it to be. :-)

 I think it is, in fact, I have it running (I think),

yay!

 but the tests get broken as I said

Mm. :-(

 * How can I solve this problem?? There is any way to say in the  
 buildout.cfg: Ignore the zope.testing package

Not at the moment.  I have been following the ZC opinion--brought  
about by pain, not theory, BTW--that test dependencies should be  
included as primary dependencies.

However, your story seems like a reason to divide up the requirements,  
especially if my first suggestion doesn't work for you.  Maybe I'll do  
that for the next release (1.5.0) which I hope/intend to make in the  
next 7 days.

If that's not soon enough, you could make a local release for  
yourself, as you mention below, that divides out or removes the  
requirement.

I guess that I won't be able to run the tests for zc.async, but I  
 can live with that...

Right.  It's a shame and an annoyance, but not necessarily a show- 
stopper.

 * If I find a way to remove zope.testing, (downloading the source  
 and removing that requirement, I know it's ugly) could that get me  
 into troubles ??

I don't believe so.  Though there are no automated tests to guarantee  
that, of course. :-)

 * Could zope.testing be require for something else than tests over  
 zc.async and it's dependecies??

That is not the intent.

So, to repeat, I *want* it to work (easily!) in Zope 2/Plone.  I think  
your best solution is to see if you can pin the zope.testing egg to  
the same version that your Zope 2/Plone app currently uses, and see if  
it works.  If that fails, let me know.

Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Santiago Videla
Hi Gary

thanks for the help


That's a shame.  Could it be that, if you specify a version of zope.testing
 in your setup.py that is equivalent to the version of zope.testing in your
 Plone app, the overwriting happens but without ill effects?  I bet that
 would work.


I will have to this with all the packages that zc.async requires, right?
zope.component
zope.interface
zope.testing
...
and so on

what I don't know is where I can find what versions for each egg should I
use. Latest plone use Zope.2.10.6. is there any place where I can see the
versions?

I found this:
http://svn.zope.org/Zope2.buildout/trunk/versions-zope3.cfg?rev=90415view=markup

but I'm not sure if it's correct

http://www.zope.org/Products/Zope/2.10.6/Zope-2.10.6-released

   - Zope 3.3, Five 1.5 integration
   - replaced several Zope 2 modules with their sister implementation of
   Zope 3

I guess that I have to specify all the versions that Zope3.3 uses


 Not at the moment.  I have been following the ZC opinion--brought about by
 pain, not theory, BTW--that test dependencies should be included as primary
 dependencies.

 However, your story seems like a reason to divide up the requirements,
 especially if my first suggestion doesn't work for you.  Maybe I'll do that
 for the next release (1.5.0) which I hope/intend to make in the next 7 days.


don't worry, others packages requires zope.testing as well

* ZODB
* zc.twist


cheers

-- 
Santiago Videla
www.revolucionesweb.com.ar
http://www.linkedin.com/in/svidela

Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el
pensamiento que se hace corazón resplandece con la palabra sencilla y
humilde que [EMAIL PROTECTED] [EMAIL PROTECTED] somos.
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Gary Poster

On Sep 10, 2008, at 5:01 PM, Santiago Videla wrote:

 Hi Gary

 thanks for the help


 That's a shame.  Could it be that, if you specify a version of  
 zope.testing in your setup.py that is equivalent to the version of  
 zope.testing in your Plone app, the overwriting happens but without  
 ill effects?  I bet that would work.

 I will have to this with all the packages that zc.async requires,  
 right?
 zope.component
 zope.interface
 zope.testing
 ...
 and so on

Well, for a stable production, I believe you'll want to specify all of  
those, yeah.

For your specific problem here, it's less clear.  For a first cut, I'd  
probably aim for the minimum changes that you discover you need, but  
yeah, another approach would be to specify all of the packages that  
overlap.

I don't know which approach will be faster.

 what I don't know is where I can find what versions for each egg  
 should I use. Latest plone use Zope.2.10.6. is there any place where  
 I can see the versions?

 I found this: 
 http://svn.zope.org/Zope2.buildout/trunk/versions-zope3.cfg?rev=90415view=markup

 but I'm not sure if it's correct

 http://www.zope.org/Products/Zope/2.10.6/Zope-2.10.6-released
   • Zope 3.3, Five 1.5 integration
   • replaced several Zope 2 modules with their sister implementation  
 of Zope 3
 I guess that I have to specify all the versions that Zope3.3 uses

Zope 3.3 was not eggified.

Looking on pypi (http://pypi.python.org/simple/zope.testing) it looks  
like you can try the 3.6 line, the 3.5 line, the 3.4 line or the 3.0  
line.

If you don't get success soon, let me know what the exact traceback  
you get is, and under what exact circumstance (running your own tests,  
right?).  I might be able to suggest a specific zope.testing version.

I suspect this won't be as easy as I would like until Zope 2/Plone is  
eggified. :-/ That said, having to specify versions wouldn't be too  
bad, once the version cocktail has been determined.

 Not at the moment.  I have been following the ZC opinion--brought  
 about by pain, not theory, BTW--that test dependencies should be  
 included as primary dependencies.

 However, your story seems like a reason to divide up the  
 requirements, especially if my first suggestion doesn't work for  
 you.  Maybe I'll do that for the next release (1.5.0) which I hope/ 
 intend to make in the next 7 days.

 don't worry, others packages requires zope.testing as well

 * ZODB
 * zc.twist

I hear you.  FWIW, I can help with zc.twist if you want, but I doubt  
ZODB is going to change.

Gary

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Michael Dunstan
On Thu, Sep 11, 2008 at 6:55 AM, Santiago Videla
[EMAIL PROTECTED] wrote:

 * How can I solve this problem?? There is any way to say in the
 buildout.cfg: Ignore the zope.testing package
I guess that I won't be able to run the tests for zc.async, but I can
 live with that...

z3c.recipe.fakezope2eggs lets you tame these kind of dependencies. See
http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs

plone.recipe.zope2install includes a couple of options for making use
of that too. See http://pypi.python.org/pypi/plone.recipe.zope2install

It would be great to have an example buildout of a Zope2 instance
configured with zc.async.

-- 
Michael Dunstan
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] zc.async in Zope2/Plone

2008-09-10 Thread Gary Poster

On Sep 10, 2008, at 5:27 PM, Michael Dunstan wrote:

 On Thu, Sep 11, 2008 at 6:55 AM, Santiago Videla
 [EMAIL PROTECTED] wrote:

 * How can I solve this problem?? There is any way to say in the
 buildout.cfg: Ignore the zope.testing package
   I guess that I won't be able to run the tests for zc.async, but I  
 can
 live with that...

 z3c.recipe.fakezope2eggs lets you tame these kind of dependencies. See
 http://pypi.python.org/pypi/z3c.recipe.fakezope2eggs

 plone.recipe.zope2install includes a couple of options for making use
 of that too. See http://pypi.python.org/pypi/plone.recipe.zope2install

Great!

 It would be great to have an example buildout of a Zope2 instance
 configured with zc.async.

Yes!  I'd love to include this in the docs too.

Santiago, I won't have a chance to try this in Zope 2 for awhile, but  
I'd love to help, and to publicize your success. ;-)

Gary

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users