Re: [Zope] re ad-only-database

2009-03-17 Thread Jean Jordaan

Hi Tres


Tres Seaver wrote:
> 
> Can you please file a bug suggesting changing the '.in' file?
> 

Certainly:
  https://bugs.launchpad.net/zope2/+bug/344098

-- 
View this message in context: 
http://www.nabble.com/read-only-database-tp3438824p22553862.html
Sent from the Zope - General mailing list archive at Nabble.com.

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


Re: [Zope] re ad-only-database

2009-03-16 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jean Jordaan wrote:
> Hi there
> 
> The only place I find a clue about 'read-only' is in
> .../zope2/lib/python/ZODB/component.xml after grepping (after reading
> Dieter's message) .. and in the same Zope instance
> .../zope2/skel/etc/zope.conf.in still pushes the 'read-only-database'
> "relic". 
> 
> Doesn't look like many people use this .. 

Can you please file a bug suggesting changing the '.in' file?


Tres.
- --
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJvn/++gerLs4ltQ4RAtAvAJ9h0vO/zHbTnENH68TOm7Dzd46D4wCgtuTO
v1A3KIzcy9SUm6VcsbayAz0=
=v133
-END PGP SIGNATURE-

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


Re: [Zope] re ad-only-database

2009-03-16 Thread Jean Jordaan
Hi Dieter

> It describes a configuration option for your "storage" subsections
> of the "zodb_db" sections in your Zope configuration file.

Yes, that's what I understood -- thank you!

What I meant was that few people seem to use this functionality, as
the outdated howtos stand uncorrected, and the new option seems
largely unknown. I'll post comments on the howtos when I find time ..

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


Re: [Zope] re ad-only-database

2009-03-13 Thread Dieter Maurer
Jean Jordaan wrote at 2009-3-12 04:11 -0700:
>The only place I find a clue about 'read-only' is in
>.../zope2/lib/python/ZODB/component.xml after grepping (after reading
>Dieter's message)

That's what you should use for your "read-only" databases.

It describes a configuration option for your "storage" subsections
of the "zodb_db" sections in your Zope configuration file.



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


Re: [Zope] re ad-only-database

2009-03-12 Thread Jean Jordaan

Hi there

The only place I find a clue about 'read-only' is in
.../zope2/lib/python/ZODB/component.xml after grepping (after reading
Dieter's message) .. and in the same Zope instance
.../zope2/skel/etc/zope.conf.in still pushes the 'read-only-database'
"relic". 

Doesn't look like many people use this .. 


Dieter Maurer wrote:
> 
> Ulla Theiss wrote at 2006-3-16 17:00 +0100:
>>I want to run the database in read-only mode from CD and configured it 
>>accordingly in the zope.conf:
>>
>>read-only-database on
> 
> This is a relict from earlier times. It is no longer working...
> 
> Nowadays, you specify the "read-only" property on the
> storage object.
> 
> -- 
> Dieter
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 
> 

-- 
View this message in context: 
http://www.nabble.com/read-only-database-tp3438824p22473030.html
Sent from the Zope - General mailing list archive at Nabble.com.

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


[Zope] Re: Page Template help

2008-08-10 Thread Philipp von Weitershausen

Garito wrote:
Could someone point me where the page template code decide if an 
expression is a path expression or a string or python one, please?


I'm studying the zope page template classes and I would like to 
understand where this decision is taken


Products.PageTemplates.Expressions.createZopeEngine():

for pt in ZopePathExpr._default_type_names:
e.registerType(pt, ZopePathExpr)

ZopePathExpr._default_type_names contains, among others, the name 
'standard', which makes this expression type the default expression type.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Plone-Users] Python Security Vulnerabilities

2008-08-08 Thread Andreas Jung



--On 8. August 2008 10:09:56 -0500 Stacy Ladnier <[EMAIL PROTECTED]> 
wrote:



I first apologize for cross posting, but this is a critical issue for my
organization.

We have several applications built with Plone, ranging from v 2.0.5 to v
2.5.3 and Zope, ranging from 2.7.3 to 2.9.7. With the August 2008
release of a Python security vulnerability
(http://secunia.com/advisories/31305/), we are trying to determine how
this affects our web applications and how to mitigate and detect any
attacks. We have seen no discussion among the Zope and Plone communities
regarding this security threat. Is this an indication that Zope and
Plone are immune from these exploits due to the additional security
model it puts in place or is everyone simply waiting for Python to
release a patch?




I don't see any imminent thread for Zope based on the vague
advisories. As Limi said: wait until fixed Python versions are available.

Andreas

pgpmYxTXHHgSn.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Python Security Vulnerabilities

2008-08-08 Thread Alexander Limi
On Fri, 08 Aug 2008 08:09:56 -0700, Stacy Ladnier  
<[EMAIL PROTECTED]> wrote:


I first apologize for cross posting, but this is a critical issue for my  
organization.


We have several applications built with Plone, ranging from v 2.0.5 to v  
2.5.3 and Zope, ranging from 2.7.3 to 2.9.7. With the August 2008  
release of a Python security vulnerability  
(http://secunia.com/advisories/31305/), we are trying to determine how  
this affects our web applications and how to mitigate and detect any  
attacks. We have seen no discussion among the Zope and Plone communities  
regarding this security threat. Is this an indication that Zope and  
Plone are immune from these exploits due to the additional security  
model it puts in place or is everyone simply waiting for Python to  
release a patch?


Most of the issues mentioned seem to be irrelevant to Plone from a casual  
glance (disclaimer: I'm not a coder :) — but this one could probably do  
with some investigation:


3) Integer overflow errors in the processing of unicode strings can be  
exploited to cause buffer overflows on 32-bit systems.


In general, we have to wait until Python releases new versions that fix  
these issues when they happen. I'm sure that will be the easiest and  
quickest way to resolve this too.


--
Alexander Limi · http://limi.net

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Problems with buildout and zope.interface

2008-07-30 Thread Paul Winkler
On Fri, Jul 25, 2008 at 02:53:55PM +0200, Christian Scholz wrote:
>>> So my main question is probably: Is there a way to automate the
>>> process of installing and running virtualenv similar to what
>>> bootstrap.py does for buildout so that people do not need to care
>>> about the virtualenv part?

Yes, you can write a custom virtualenv bootstrap script as documented
here:
http://pypi.python.org/pypi/virtualenv#creating-your-own-bootstrap-scripts

You can then distribute just your bootstrap script, and all somebody
has to do is download and run it (assuming they have python).  The
bootstrapper will then fetch and run virtualenv, install easy_install
into the virtualenv, and do anything else you put in your
bootstrapper.

Personally I've never tried combining virtualenv and buildout.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Unrestricted threads

2008-07-25 Thread Chris Withers

Tres Seaver wrote:

Note that you can write scripts designed to use the ZODB, but be run
from a crontab.  E.g.:

  $ cat Products/foo/scripts/send_report.py
  mailnost = app.site.MailHost
  catalog = app.site.portal_catalog()
  

  $ crontab -l
  55 0 * * *  /home/tseaver/instance/bin/zopectl run \ #(no linebreak!)
  /home/tseaver/instance/Products/foo/scripts/send_report.py

You can *only* use this approach if you use ZEO, of course.


...and if you want lots of helper stuff for this kind of operation, you 
can use stepper:


http://www.simplistix.co.uk/software/zope/stepper

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Chris Withers

Christian Scholz wrote:
Ok, except that this does not run under windows and it still needs to 
have easy_install installed. But if there is no existing script, maybe I 
write one then. I have my custom bootstrap for using the development 
version of setuptools now already anway.


Ignas may have a customer bootstrap.py that helps even further over on 
the SchoolTool project...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Christian Scholz

Daniel Nouri wrote:

Christian Scholz:


Daniel Nouri wrote:


The solution to this one is quite simple: Use virtualenv with
--no-site-packages and then use bin/python to run bootstrap.py

Ok, thanks. How do I deploy such a thing? I guess virtualenv then has
to run by the one setting up his development sandbox? What files
can/need to be in subversion?
(I never used virtualenv before, only buildout).

So my main question is probably: Is there a way to automate the
process of installing and running virtualenv similar to what
bootstrap.py does for buildout so that people do not need to care
about the virtualenv part?


This shell script should help:

  #!/bin/sh
  sudo easy_install virtualenv
  virtualenv . --no-site-packages
  bin/python bootstrap.py



Ok, except that this does not run under windows and it still needs to 
have easy_install installed. But if there is no existing script, maybe I 
write one then. I have my custom bootstrap for using the development 
version of setuptools now already anway.


Thanks so far!

-- Christian


--
Christian Scholz video blog: http://comlounge.tv
COM.lounge   blog: http://mrtopf.de/blog
Luetticher Strasse 10Skype: HerrTopf
52064 Aachen  Homepage: http://comlounge.net
Tel: +49 241 400 730 0   E-Mail [EMAIL PROTECTED]
Fax: +49 241 979 00 850   IRC: MrTopf, Tao_T

neue Show: TOPFtäglich (http://mrtopf.de/blog/category/topf-taglich/)

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Christian Scholz

Baiju M wrote:

Christian Scholz wrote:

 Daniel Nouri wrote:

>
> The solution to this one is quite simple: Use virtualenv with
> --no-site-packages and then use bin/python to run bootstrap.py

 Ok, thanks. How do I deploy such a thing? I guess virtualenv then has
 to run by the one setting up his development sandbox? What files
 can/need to be in subversion? (I never used virtualenv before, only
 buildout).

 So my main question is probably: Is there a way to automate the
 process of installing and running virtualenv similar to what
 bootstrap.py does for buildout so that people do not need to care
 about the virtualenv part?


Use a clean custom built Python.


I myself am using this but the opinion of the rest of the group is that 
it should be as easy as possible to get going without the need to 
compile custom Pythons etc. I actually second this because losing 
potential co-developers directly at the beginning would be bad.
(I think this is also one the ideas behind buildout: To make setting 
these things up as easy as possible).


So maybe there is a way to solve this :)

-- Christian


--
Christian Scholz video blog: http://comlounge.tv
COM.lounge   blog: http://mrtopf.de/blog
Luetticher Strasse 10Skype: HerrTopf
52064 Aachen  Homepage: http://comlounge.net
Tel: +49 241 400 730 0   E-Mail [EMAIL PROTECTED]
Fax: +49 241 979 00 850   IRC: MrTopf, Tao_T

neue Show: TOPFtäglich (http://mrtopf.de/blog/category/topf-taglich/)

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Daniel Nouri
Christian Scholz:

> Daniel Nouri wrote:
>
>>
>> The solution to this one is quite simple: Use virtualenv with
>> --no-site-packages and then use bin/python to run bootstrap.py
>
> Ok, thanks. How do I deploy such a thing? I guess virtualenv then has
> to run by the one setting up his development sandbox? What files
> can/need to be in subversion?
> (I never used virtualenv before, only buildout).
>
> So my main question is probably: Is there a way to automate the
> process of installing and running virtualenv similar to what
> bootstrap.py does for buildout so that people do not need to care
> about the virtualenv part?

This shell script should help:

  #!/bin/sh
  sudo easy_install virtualenv
  virtualenv . --no-site-packages
  bin/python bootstrap.py



-- 
Daniel Nouri
http://danielnouri.org

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


Re: [Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Baiju M

Christian Scholz wrote:

 Daniel Nouri wrote:

>
> The solution to this one is quite simple: Use virtualenv with
> --no-site-packages and then use bin/python to run bootstrap.py

 Ok, thanks. How do I deploy such a thing? I guess virtualenv then has
 to run by the one setting up his development sandbox? What files
 can/need to be in subversion? (I never used virtualenv before, only
 buildout).

 So my main question is probably: Is there a way to automate the
 process of installing and running virtualenv similar to what
 bootstrap.py does for buildout so that people do not need to care
 about the virtualenv part?


Use a clean custom built Python.

Regards,
Baiju M


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Christian Scholz

Daniel Nouri wrote:



The solution to this one is quite simple: Use virtualenv with
--no-site-packages and then use bin/python to run bootstrap.py


Ok, thanks. How do I deploy such a thing? I guess virtualenv then has to 
run by the one setting up his development sandbox? What files can/need 
to be in subversion?

(I never used virtualenv before, only buildout).

So my main question is probably: Is there a way to automate the process 
of installing and running virtualenv similar to what bootstrap.py does 
for buildout so that people do not need to care about the virtualenv part?


-- Christian

--
Christian Scholz video blog: http://comlounge.tv
COM.lounge   blog: http://mrtopf.de/blog
Luetticher Strasse 10Skype: HerrTopf
52064 Aachen  Homepage: http://comlounge.net
Tel: +49 241 400 730 0   E-Mail [EMAIL PROTECTED]
Fax: +49 241 979 00 850   IRC: MrTopf, Tao_T

neue Show: TOPFtäglich (http://mrtopf.de/blog/category/topf-taglich/)

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Problems with buildout and zope.interface

2008-07-25 Thread Daniel Nouri
Christian Scholz writes:

> I am trying right now to convince people to use buildout and ZCA for
> the Open Grid Protocol project but it turns out that it's not working
> as expected. So maybe somebody on here can help me :-)
>
> The setup is Mac OSX 10.5.4 with Python 2.5.1 installed and apparently
> a zope.interface egg inside the standard install of Python of version
> 3.3.0. (you can see the contents of the lib dir her:
> http://pastebin.com/d3f5fb455)
>
> On some machines it now seems that this version is used instead of
> using a newer one the system wide installed one is used (for some
> reason not on my own machine), so the for instance the testrunner
> script looks like this: http://pastebin.com/d1a1024d2

The solution to this one is quite simple: Use virtualenv with
--no-site-packages and then use bin/python to run bootstrap.py


-- 
Daniel Nouri
http://danielnouri.org

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


[Zope] Re: Unrestricted threads

2008-07-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Eric Bréhault wrote:
> yes indeed you can easily extract the mechanism to create a specific
> security manager and create a request to call the method you want
> using this security manager
> 
> the problem with ZEO is not related to this aspect so it should work fine
> 
> eric
> 
> On Wed, Jul 23, 2008 at 11:05 AM, Thierry Florac <[EMAIL PROTECTED]> wrote:
>> Le mardi 22 juillet 2008 à 19:43 +0200, Eric Bréhault a écrit :
>>> Hello Thierry,
>>>
>>> To schedule cron-like tasks on Zope, I use ZpCron:
>>> http://www.zope.org/Members/janik/ZpCron
>>>
>>> It works pretty fine (well, as far as you do not use ZEO) and it
>>> allows to define the user you want to use to run such or such task,
>>> and the Zope security mechanisms are applied just like if the user had
>>> run the task himself.

Note that you can write scripts designed to use the ZODB, but be run
from a crontab.  E.g.:

  $ cat Products/foo/scripts/send_report.py
  mailnost = app.site.MailHost
  catalog = app.site.portal_catalog()
  

  $ crontab -l
  55 0 * * *  /home/tseaver/instance/bin/zopectl run \ #(no linebreak!)
  /home/tseaver/instance/Products/foo/scripts/send_report.py

You can *only* use this approach if you use ZEO, of course.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIh06c+gerLs4ltQ4RAuJAAKCWoSwiWxmtxqszfwPK6o4c5EKPSACgitdD
yqCYwcEekqscJM3bwl1sUiQ=
=boKO
-END PGP SIGNATURE-

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


[Zope] Re: Page template issues

2008-07-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
> 
> --On 14. Juli 2008 12:02:32 -0500 Jeff Peterson <[EMAIL PROTECTED]> 
> wrote:
> 
>> Greetings,
>>
>> I recently upgraded from Zope 2.8.7 to 2.11.0.  After working out some
>> issues, everything worked OK for a couple weeks.  There were minor page
>> template issues, but they weren't stopping the pages from rendering.
>> Then our server locked up..we had to reboot it.  When I got everything
>> back up I get this error:
>>
>> 2008-07-14T11:45:50 ERROR Zope.SiteErrorLog
>> http://dev.bearcatproducts.com:9280/zzz-v2/public/ope/index.html
>> Traceback (innermost last):
>>   Module ZPublisher.Publish, line 119, in publish
>>   Module ZPublisher.mapply, line 88, in mapply
>>   Module ZPublisher.Publish, line 42, in call_object
>>   Module Shared.DC.Scripts.Bindings, line 313, in __call__
>>   Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
>>   Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
>>   Module Products.PageTemplates.ZopePageTemplate, line 428, in pt_render
>> AssertionError
> 
> The pt_render() method did not return a unicode string as expected.
> Can this be reproduced? Your templates are stored within the ZODB (you edit 
> them through the ZMI?). You would be helpful to write a bugreport 
> (Launchpad) together with  a .zexp  of the related template.

I would also try installing the PDBDebugMode product, which should allow
you to inspect the 'result' value when this exception raises.

As a workaround, can you rename the broken templates, and re-create them
using the text from the set-aside versions?


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIe5FB+gerLs4ltQ4RAiNtAJ46Mb6X5CFk7mMt1xBYwBV3zSMvjACfd8t4
WCJHTpJRKsn6gff4e7rbtt0=
=NypU
-END PGP SIGNATURE-

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


Re: [Zope] Re: Deployment Best Practices?

2008-07-13 Thread Jeff McNeil
I think I'll add a new directive to register my application specific
plugins.  That way, I can rely on my own entry points and whatnot.
That gives me a nice way to not have to rerun buildout (rather, not
have to rely on the operations department to rerun buildout).

I'm planning on running through and setting up an HA installation
using zc.zodbrecipe as long as that's a "standard" way of doing it.
I'll throw it up on my blog; if I get it wrong, someone can correct
me.

Thanks for all of the help.  It would be nice to have standard and
somewhat generic installation guides.  Nothing too in-depth, just
something to get us Zope newbies pointed in the right direction.

Jeff

On Sun, Jul 13, 2008 at 1:47 PM, Philipp von Weitershausen
<[EMAIL PROTECTED]> wrote:
> Paul Winkler wrote:
>>
>> On Sun, Jul 13, 2008 at 01:20:53PM -0400, Philipp von Weitershausen wrote:
>>>
>>> Jeff McNeil wrote:

 I'd love to be able to just drop an egg on the file system and tell
 Zope "Here, go load that one now" via configuration alone.
>>>
>>> You could also write your own ZCML directive (+ a handler) that does
>>> that. Then you'd only ever have to change your application's site.zcml to
>>> load a new plugin.
>>
>> There's also this:
>> http://pypi.python.org/pypi/z3c.autoinclude
>
> Yep, that only saves you the
>
>  
>
> directive, though.
>
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Deployment Best Practices?

2008-07-13 Thread Philipp von Weitershausen

Paul Winkler wrote:

On Sun, Jul 13, 2008 at 01:20:53PM -0400, Philipp von Weitershausen wrote:

Jeff McNeil wrote:

I'd love to be able to just drop an egg on the file system and tell
Zope "Here, go load that one now" via configuration alone.
You could also write your own ZCML directive (+ a handler) that does that. 
Then you'd only ever have to change your application's site.zcml to load a 
new plugin.


There's also this:
http://pypi.python.org/pypi/z3c.autoinclude


Yep, that only saves you the

  

directive, though.

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Deployment Best Practices?

2008-07-13 Thread Paul Winkler
On Sun, Jul 13, 2008 at 01:20:53PM -0400, Philipp von Weitershausen wrote:
> Jeff McNeil wrote:
>> I'd love to be able to just drop an egg on the file system and tell
>> Zope "Here, go load that one now" via configuration alone.
>
> You could also write your own ZCML directive (+ a handler) that does that. 
> Then you'd only ever have to change your application's site.zcml to load a 
> new plugin.

There's also this:
http://pypi.python.org/pypi/z3c.autoinclude


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Deployment Best Practices?

2008-07-13 Thread Philipp von Weitershausen

Jeff McNeil wrote:

That's not all that obvious to someone new to the Zope system.  Most
of the documentation I've found is geared towards the 2.x branch.  As
Zope 3 and Zope 2 are different animals, I wouldn't think that the
deployment steps and recommendations would be all that similar.


With buildout, they can be similar, at least superficially.


I really like what I've seen thus far, it's just been difficult at
times as it feels like I'm fighting with documentation.

So I'm assuming I'll just need to build up a Zeo server instance with
zc.zodbrecipes and update my corresponding buildout.cfg for the Zope
instances?


Yep, you can do that.


If Buildout is the preferred deployment tool, then my
redistributable is a sandbox tarball or an RPM containing the skeleton
files needed to bootstrap a buildout run on the target hosts?


Yes.


Maybe I'll dump the whole process on a blog somewhere as I step through it.


That'd be cool!


I do have another question. The project we're working on is plug-in
based. Within the old system, eggs are loaded dynamically using
setuptools pkg_resources and we define certain entry points for
capability registration.  Eggs are added to a directory and a config
entry is made such that we can load the proper version of each
plug-in.  Is there an upfront way to reproduce that functionality
without needing to update setup.py and rerun buildout every time we
want to push a new plug-in or update an existing?


Well, you could just do the exact same thing that you did in your old 
application, I suppose.



I'd love to be able
to just drop an egg on the file system and tell Zope "Here, go load
that one now" via configuration alone.


You could also write your own ZCML directive (+ a handler) that does 
that. Then you'd only ever have to change your application's site.zcml 
to load a new plugin.



My apologies if some of this is obvious. As I said, I'm really just
tackling Zope for the first time.


Don't worry, your questions are valid. We haven't actually done a very 
good job of documenting things on the website.



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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: I wonder why class constructor is never in apidoc ?

2008-07-07 Thread Philipp von Weitershausen

KLEIN Stéphane wrote:

I wonder why class constructor is never in apidoc ?


Because nobody has bothered to implement this feature. Patches are 
welcome :)



Are there something in OOP concept I haven't understand ?


I don't know what you mean with this.

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Annoying when objectValues() doesn't work

2008-07-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
> from cStringIO import StringIO
> 
> def workflowscripts2methods(self):
> out = StringIO()
> 
> print >>out, "Star converting workflow scripts into External Methods"
> 
> pw = self.portal_workflow
> for workflow in pw.objectValues('Workflow'):
> for container in workflow.objectValues('Workflow Scripts'):
> meta_type = 'Script (Python)'
> for script in container.objectValues(meta_type):
> assert script.meta_type == meta_type
> print >>out, "script (%r, %s)" % (script.meta_type,
> script.absolute_url_path())
> 
> 
> value = out.getvalue()
> print value
> return value
> 
> 
> I'm getting an AssertionError on this!!!
> After having used objectValues() for so many many years without much
> trouble my confidence in it just dropped.
> Anybody else seen something like this?

Change the bare assert to generate more info, e.g.:

   if script.meta_type != meta_type:
   raise ValueError('Invalide meta_type (%s) for object %s'
  % (script.meta_type, script.getId()))

and debug from there.  You might also add the PDBDebugMode product to
your instance, which would allow you to put an
'import pdb; pdb.set_trace()' inside the script.



Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIcCBc+gerLs4ltQ4RAoOsAJoDc07f4P8D/dBRFBQ5uOtfIqprNQCfUCAW
LGXgba7MF5vvK+wIEo77/iQ=
=kqGy
-END PGP SIGNATURE-

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


[Zope] Re: CMF security error in DCWorkflow that doesn't make sense

2008-07-02 Thread Peter Bengtsson
Some progress.

I managed to get it work by de-selecting the "Manager" role on the
Proxy roles. Makes absolutely no sense.

Later today I had another similar problem/error and nothing I changed
on the Proxy roles mattered. I ended up replacing the Python Scipt
with an External Method and that worked.
This absolutely sucks. The DCWorkflow code is incredibly complicated
and obscure and I hope it burns in hell. Having said that, I don't
think I would do any better if I was to replicate what it can do :)



2008/7/1 Peter Bengtsson <[EMAIL PROTECTED]>:
> First of all, I'm not sure if this is the right mailing list but
> hopefully the DCWorkflow people read this list too.
>
> I've got a strange problem.
> On my laptop it works (zope 2.7.8) on the live server it works (zope
> 2.7.3) but on the test server (2.7.8) it doesn't!!! And it's the same
> Data.fs and Products as the live server. It throws an Unauthorized
> error upon executing a python script as part of a workflow transition.
> The Error:
>
> The owner of the executing script is defined outside the context of
> the object being accessed. The script has proxy roles, but they do not
> apply in this context.. Access to 'workflow' of
> (Products.DCWorkflow.Expression.StateChangeInfo instance at 0xddffb48)
> denied. Access requires Manage_portal_Permission, granted to the
> following roles: ['Manager']. The executing script is (PythonScript at
> /intranet/portal_workflow/intranet_workflow/scripts/wf_script_despatcher),
> owned by oliver.
>
> The Python script has Proxy role "Manager" so how can it be limited?
>
> I didn't write this CMF based application and I want to get on top of
> it so it doesn't happen again.
>
> Regards, Peter
>
>
> --
> Peter Bengtsson,
> work www.fry-it.com
> home www.peterbe.com
> hobby www.issuetrackerproduct.com
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Cache

2008-06-25 Thread Paul Winkler
On Wed, Jun 25, 2008 at 07:12:53PM +0100, Miles wrote:
> Kereoz wrote:
>> On Wed, Jun 25, 2008 at 1:13 PM, Andreas Jung <[EMAIL PROTECTED]> wrote:
>>> As you can see from the HTML code: something like
>>>
>>> app.Control_Panel.Database..manage_minimize()
>>>
>>> should work.
>> I was thinking about the zope command line tools such as zopectl or so.

I don't think doing it in zopectl will do what you want.  AFAIK, the
cache that method minimizes is the in-memory object cache.  zopectl
runs in a separate process, which will have its own cache; so calling
manage_minimize() in a zopectl script will not affect the running Zope
server.

Instead you could write a script that uses wget or python's httplib or
similar to connect to the running Zope server and send the same
request that submitting the form in the ZMI would send.

None of this has anything to do with caches on disk, so I may be
misunderstanding what you want. The only disk cache I know of that's
relevant to ZODB is the ZEO client cache, which I don't believe is
affected by manage_minimize(). I don't think there is any API for
cleaning stuff out of it.

> You could also use something like
>
> $ PYTHONPATH=/usr/local/Zope-2.9.6/lib/python 
> /usr/local/Zope-2.9.6/bin/zeopack.py -p $PORT -S $STORAGE -d $PACKDAYS

That's for packing the storage, which is totally different.


-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Cache

2008-06-25 Thread Miles

Kereoz wrote:

On Wed, Jun 25, 2008 at 1:13 PM, Andreas Jung <[EMAIL PROTECTED]> wrote:


As you can see from the HTML code: something like

app.Control_Panel.Database..manage_minimize()

should work.


I was thinking about the zope command line tools such as zopectl or so.
But in fact yes, seems to work, so I'll do it that way :)
Thanks



You could also use something like

$ PYTHONPATH=/usr/local/Zope-2.9.6/lib/python 
/usr/local/Zope-2.9.6/bin/zeopack.py -p $PORT -S $STORAGE -d $PACKDAYS


(obviously, adjust for your version of zope)

Miles

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: help debugging a "can't pickle" error deep within a catalog reindex

2008-06-24 Thread Rob Miller

Rob Miller wrote:

hi,

i'm trying to perform a ZCatalog.refreshCatalog() on a catalog with over 
29,000 indexed objects.  it churns for a good long time, and eventually 
fails with a long set of tracebacks, of which i've included a sample at 
the end of this message.


i think i understand the gist of the issue... it's trying to write an 
object (probably a CatalogBrain) to the database, but this object's 
__dict__ contains a value that is of type instancemethod, which isn't 
allowed for persistent objects.


the problem is that i can't figure out which specific objects are 
causing the problem.  i've used pdb.post_mortem to get a debug prompt 
way down in the traceback, but the code goes in and out of C modules, so 
i'm missing a lot of what's happening.  and when i interactively peek at 
the objects that are being indexed when the error happens, there doesn't 
seem to be anything wrong, and i can index the objects w/ no problem.  
i've even tried dropping the subtransaction threshold down to 1, so it 
will try to commit a savepoint after every object, but none of the 
objects being indexed seemed to have any problems.


okay, after leaving this for a few days, i came back to it and managed to work 
it out.  for posterity's sake, what ended up working was that i added an 
explicit transaction.commit() after every object reindex, wrapped in a try: 
except, like so:


--- src/Zope/lib/python/Products/ZCatalog/ZCatalog.py   2007-10-29 
06:09:30.0 -0700
+++ lib/zope/lib/python/Products/ZCatalog/ZCatalog.py   2008-06-24 
10:47:49.0 -0700

@@ -294,6 +294,11 @@
 if obj is not None:
 try:
 self.catalog_object(obj, p, pghandler=pghandler)
+try:
+transaction.commit()
+except:
+import sys, pdb
+pdb.post_mortem(sys.exc_info()[2])
 except ConflictError:
 raise
 except:

this made the reindex take a ridiculously long time, and it leaves the catalog 
in an inconsistent state (i.e. it should only be done on a copy of the 
database, one that you can throw away), but it did in the end reveal to me 
which record was causing the problem.


the problematic record ended up being a ghosted catalog entry that happened to 
share the same name as a view.  when the catalog tried to look up the object 
by its path (via unrestrictedTraverse), the view object was returned.


thanks for the help!

-r

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: how to unindex an non existing (deleted)object

2008-06-24 Thread robert rottermann

Daniel Nouri schrieb:

robert rottermann writes:

  

Sometimes a catalog query returns brains that point to non existing objects.

how can I remove such brains from the index programmatically  without
using the portal_catalag/advanced/update tab?



  brain.aq_parent._catalog.uncatalogObject(brain.getPath())


Daniel

  

brilliant, exactly what I needed
thanks
robert
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: how to unindex an non existing (deleted)object

2008-06-24 Thread Daniel Nouri
robert rottermann writes:

> Sometimes a catalog query returns brains that point to non existing objects.
>
> how can I remove such brains from the index programmatically  without
> using the portal_catalag/advanced/update tab?

  brain.aq_parent._catalog.uncatalogObject(brain.getPath())


Daniel

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


[Zope] Re: m2crypt in Zope 10

2008-06-22 Thread Josef Meile

I am wondering, if there are some howto patching the zope 10


We're in the year 3030? We are just at Zope 3.X :-)

You are in year 3030 ;-). I'm still stucked in the past with zope 2.8.x
:-(

Anyway, my suggestion for the original poster is to use apache for ssl.
I used m2crypto in the past and it was first really slow and second,
it hanged sometimes while loading pages. I didn't wanted to use apache
since I thoght it was too much effort. Anyway, I finally installed it
and now I'm really happy with it ;-)
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: record count in catalog

2008-06-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dieter Maurer wrote:
> Tres Seaver wrote at 2008-6-15 16:18 -0400:
>> ...
>>> The Catalog tab in my catalog says this:
>>>
>>> The catalog "mycatalog" contains 30,345 record(s) in the path "/".
>>>
>>> But when I sort and return a list of cataloged objects I only have 19,881.
>>>
>>> Here is the script call to retrieve the records:
>>>
>>> context.mycatalog.search( {}, sort_index='lastname' )
>>>
>>> Why don't the numbers match up?
>> Some of your objects don't have a 'lastname' attribute, and so when
>> sorting, they get dropped.
> 
> Should we not consider this a bug and fix it?

If you can specify the "fixed" behavior in a way that makes logical
sense to everyone:

 - how should the documents without 'lastname' be sorted?

 - Is this choice fixed at indexing time or can it vary by query?

Any proposed fix must also not:

 - break existing applications which depend on the current behavior
   (yes, they exist, I've found that quite useful).  Therefore, making
   "missing" values sort needs to be an option which is configured
   into the index, or else passed with the query.

 - destroy the efficiency considerations which dictated the choice
   in the first place.  This is the *hard* part.  Using the sorted
   UIDs from the sort index, and merging with the other indexes sets
   lazily, gives a *huge* scaling benefit.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIXHvN+gerLs4ltQ4RAhGpAJ9MvaNf3dUNSrTp9hCoHyZYSHMJeQCeKByA
nGIcxZ3pzcyOl5GBTo75qOA=
=PXJ+
-END PGP SIGNATURE-

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


Re: [Zope] Re: record count in catalog

2008-06-20 Thread Chris Withers

Dieter Maurer wrote:

Tres Seaver wrote at 2008-6-15 16:18 -0400:

...

The Catalog tab in my catalog says this:

The catalog "mycatalog" contains 30,345 record(s) in the path "/".

But when I sort and return a list of cataloged objects I only have 19,881.

Here is the script call to retrieve the records:

context.mycatalog.search( {}, sort_index='lastname' )

Why don't the numbers match up?

Some of your objects don't have a 'lastname' attribute, and so when
sorting, they get dropped.


Ah, now that's interesting...


Should we not consider this a bug and fix it?


Yes, this has bitten me before and I have a feeling I may have already 
submitted it as a bug somewhere. Google is your friend...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: record count in catalog

2008-06-19 Thread Andreas Jung



--On 19. Juni 2008 20:35:29 +0200 Dieter Maurer <[EMAIL PROTECTED]> wrote:


Tres Seaver wrote at 2008-6-15 16:18 -0400:

...

The Catalog tab in my catalog says this:

The catalog "mycatalog" contains 30,345 record(s) in the path "/".

But when I sort and return a list of cataloged objects I only have
19,881.

Here is the script call to retrieve the records:

context.mycatalog.search( {}, sort_index='lastname' )

Why don't the numbers match up?


Some of your objects don't have a 'lastname' attribute, and so when
sorting, they get dropped.


Should we not consider this a bug and fix it?


+1 for the bug prospective :-)

Andreas

pgpDCuaDnFWCF.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: record count in catalog

2008-06-19 Thread Dieter Maurer
Tres Seaver wrote at 2008-6-15 16:18 -0400:
> ...
>> The Catalog tab in my catalog says this:
>> 
>> The catalog "mycatalog" contains 30,345 record(s) in the path "/".
>> 
>> But when I sort and return a list of cataloged objects I only have 19,881.
>> 
>> Here is the script call to retrieve the records:
>> 
>> context.mycatalog.search( {}, sort_index='lastname' )
>> 
>> Why don't the numbers match up?
>
>Some of your objects don't have a 'lastname' attribute, and so when
>sorting, they get dropped.

Should we not consider this a bug and fix it?



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


[Zope] Re: help debugging a "can't pickle" error deep within a catalog reindex

2008-06-18 Thread Ross Patterson
Rob Miller <[EMAIL PROTECTED]> writes:

> Ross Patterson wrote:
>> Rob Miller <[EMAIL PROTECTED]> writes:
>>
>>> hi,
>>>
>>> i'm trying to perform a ZCatalog.refreshCatalog() on a catalog with
>>> over 29,000 indexed objects.  it churns for a good long time, and
>>> eventually fails with a long set of tracebacks, of which i've included
>>> a sample at the end of this message.
>>>
>>> i think i understand the gist of the issue... it's trying to write an
>>> object (probably a CatalogBrain) to the database, but this object's
>>> __dict__ contains a value that is of type instancemethod, which isn't
>>> allowed for persistent objects.
>>>
>>> the problem is that i can't figure out which specific objects are
>>> causing the problem.  i've used pdb.post_mortem to get a debug prompt
>>> way down in the traceback, but the code goes in and out of C modules,
>>> so i'm missing a lot of what's happening.  and when i interactively
>>> peek at the objects that are being indexed when the error happens,
>>> there doesn't seem to be anything wrong, and i can index the objects
>>> w/ no problem.  i've even tried dropping the subtransaction threshold
>>> down to 1, so it will try to commit a savepoint after every object,
>>> but none of the objects being indexed seemed to have any problems.
>>>
>>> i CAN verify that the instancemethod that is causing the problem
>>> renders like this:
>>>
>>> >> at /session_data_manager>>
>>>
>>> even that hasn't proven enough for me to concretely identify the
>>> source of the problem, though.
>>>
>>> i've been working on this for a full day already, and am not sure how
>>> to proceed.  does anyone have any debugging tips that might help me
>>> figure out what, exactly, is causing the reindex attempts to blow up?
>>>
>>> thanks!
>>
>> Can you get a pdb.post_mortem prompt at the actual ZODB/serialize.py:416
>> error or only at transaction/_transaction.py:267 where some sort of
>> previous error is handled?
>
> yes, i put the post_mortem around the "transaction.savepoint" call at
> line 559 of Products/ZCatalog/ZCatalog.py.  this is the place where
> the error is happening, but it's where the subtransaction threshold
> has been reached, so IIUC the error could be caused by any of the
> objects in the subtransaction.

Then it seems like you're not getting at the actual pickle error and
thus aren't looking at the object whose __getstate__ returns the
offending instance method.  If you have enough memory, try running the
refreshCatalog with subtransactions disabled to get the *actual* pickle
error.

>> If the former, I often find it informative to step up to
>> ZODB/serialize.py:407 where obj.__getstate__() is called and find out
>> what obj is.  Is it the same object every time?  If not, is it of the
>> same type every time?
>
> right.  as long as the subtxn threshold number is the same, then the
> object is the same.  but if i change the subtxn threshold, then the
> object will be different.  as i said, i even tried reducing the subtxn
> threshold to '1', so, assuming my understanding is correct, this would
> be triggered after every object.  it took many hours to get to my
> debug prompt; when i did, the obj was FileAttachment object that
> didn't seem to have any problems.  i was able to interactively index
> the object from the pdb prompt, and even commit the transaction, w/ no
> problems.

The actual error of your TB is the error that savepoint raises when a
previous error has occurred.  So changing the subtransaction threshold
just changes which object is being indexed when the savepoint *happens*
to be run and notices that an error has been raised for a previous
object in the savepoint.  At least, that's my read of it.

>> A next step can also be to put a pdb.set_trace() at
>> transaction/_transaction.py:340 in the register() method such that
>> it's is only called when the offending object is added to the
>> transaction.
>
> i'll give this a shot, thx.
>
>> Hope some of that helps,
>
> even just having someone to discuss it with is helpful, for my sanity
> at least...  ;-)

Well, then I'll have to enjoy your sanity vicariously.  :)

Ross

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


[Zope] Re: help debugging a "can't pickle" error deep within a catalog reindex

2008-06-18 Thread Rob Miller

Ross Patterson wrote:

Rob Miller <[EMAIL PROTECTED]> writes:


hi,

i'm trying to perform a ZCatalog.refreshCatalog() on a catalog with
over 29,000 indexed objects.  it churns for a good long time, and
eventually fails with a long set of tracebacks, of which i've included
a sample at the end of this message.

i think i understand the gist of the issue... it's trying to write an
object (probably a CatalogBrain) to the database, but this object's
__dict__ contains a value that is of type instancemethod, which isn't
allowed for persistent objects.

the problem is that i can't figure out which specific objects are
causing the problem.  i've used pdb.post_mortem to get a debug prompt
way down in the traceback, but the code goes in and out of C modules,
so i'm missing a lot of what's happening.  and when i interactively
peek at the objects that are being indexed when the error happens,
there doesn't seem to be anything wrong, and i can index the objects
w/ no problem.  i've even tried dropping the subtransaction threshold
down to 1, so it will try to commit a savepoint after every object,
but none of the objects being indexed seemed to have any problems.

i CAN verify that the instancemethod that is causing the problem
renders like this:

>

even that hasn't proven enough for me to concretely identify the
source of the problem, though.

i've been working on this for a full day already, and am not sure how
to proceed.  does anyone have any debugging tips that might help me
figure out what, exactly, is causing the reindex attempts to blow up?

thanks!


Can you get a pdb.post_mortem prompt at the actual ZODB/serialize.py:416
error or only at transaction/_transaction.py:267 where some sort of
previous error is handled?


yes, i put the post_mortem around the "transaction.savepoint" call at line 559 
of Products/ZCatalog/ZCatalog.py.  this is the place where the error is 
happening, but it's where the subtransaction threshold has been reached, so 
IIUC the error could be caused by any of the objects in the subtransaction.



If the former, I often find it informative to step up to
ZODB/serialize.py:407 where obj.__getstate__() is called and find out
what obj is.  Is it the same object every time?  If not, is it of the
same type every time?


right.  as long as the subtxn threshold number is the same, then the object is 
the same.  but if i change the subtxn threshold, then the object will be 
different.  as i said, i even tried reducing the subtxn threshold to '1', so, 
assuming my understanding is correct, this would be triggered after every 
object.  it took many hours to get to my debug prompt; when i did, the obj was 
FileAttachment object that didn't seem to have any problems.  i was able to 
interactively index the object from the pdb prompt, and even commit the 
transaction, w/ no problems.



A next step can also be to put a pdb.set_trace() at
transaction/_transaction.py:340 in the register() method such that it's
is only called when the offending object is added to the transaction.


i'll give this a shot, thx.


Hope some of that helps,


even just having someone to discuss it with is helpful, for my sanity at 
least...  ;-)


thx.

-r

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: I would like to join your LinkedIn Zope group

2008-06-18 Thread Chris Calloway

On 6/18/2008 11:23 AM, Andreas Jung wrote:
--On 18. Juni 2008 11:14:29 -0400 Tres Seaver <[EMAIL PROTECTED]> 

Andreas Jung wrote:

We don't maintain something like that.


I don't know who the real group admin is, but there is a "Zope
Community" group on LinkedIn.  Chris' mail comes as a result of
requesting membership there and then clicking through to the "please
notify the manager" link:  the manager has set the e-mail to be this
list (which is wrong).


I remember that someone did that nonsense :->


Wow. Sorry. I didn't notice that when I clicked on the link. I only did 
so because my request had not been acted on. Whoever the mystery group 
owner is did approve my request just now.


Hey, mystery Linked In Zope Community group owner who obviously 
subscribes to this list, you may want to change that LinkedIn group 
contact email address. :)


--
Sincerely,

Chris Calloway
http://www.secoora.org
office: 332 Chapman Hall   phone: (919) 599-3530
mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599



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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: I would like to join your LinkedIn Zope group

2008-06-18 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andreas Jung wrote:
> 
> --On 18. Juni 2008 10:37:28 -0400 Chris Calloway <[EMAIL PROTECTED]> wrote:
> 
>> I would like to join your LinkedIn Zope group. I am a facilitator of the
>> Triangle Zope and Python Users Group.
>>
> 
> We don't maintain something like that.

I don't know who the real group admin is, but there is a "Zope
Community" group on LinkedIn.  Chris' mail comes as a result of
requesting membership there and then clicking through to the "please
notify the manager" link:  the manager has set the e-mail to be this
list (which is wrong).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIWSZV+gerLs4ltQ4RAhq+AKCOMZ1TpjV5C96h5VghTUH3/fVtYgCgnvNl
Z0zBUhB4g09GBvy9aba+IiM=
=2603
-END PGP SIGNATURE-

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


[Zope] Re: help debugging a "can't pickle" error deep within a catalog reindex

2008-06-17 Thread Ross Patterson
Rob Miller <[EMAIL PROTECTED]> writes:

> hi,
>
> i'm trying to perform a ZCatalog.refreshCatalog() on a catalog with
> over 29,000 indexed objects.  it churns for a good long time, and
> eventually fails with a long set of tracebacks, of which i've included
> a sample at the end of this message.
>
> i think i understand the gist of the issue... it's trying to write an
> object (probably a CatalogBrain) to the database, but this object's
> __dict__ contains a value that is of type instancemethod, which isn't
> allowed for persistent objects.
>
> the problem is that i can't figure out which specific objects are
> causing the problem.  i've used pdb.post_mortem to get a debug prompt
> way down in the traceback, but the code goes in and out of C modules,
> so i'm missing a lot of what's happening.  and when i interactively
> peek at the objects that are being indexed when the error happens,
> there doesn't seem to be anything wrong, and i can index the objects
> w/ no problem.  i've even tried dropping the subtransaction threshold
> down to 1, so it will try to commit a savepoint after every object,
> but none of the objects being indexed seemed to have any problems.
>
> i CAN verify that the instancemethod that is causing the problem
> renders like this:
>
>  at /session_data_manager>>
>
> even that hasn't proven enough for me to concretely identify the
> source of the problem, though.
>
> i've been working on this for a full day already, and am not sure how
> to proceed.  does anyone have any debugging tips that might help me
> figure out what, exactly, is causing the reindex attempts to blow up?
>
> thanks!

Can you get a pdb.post_mortem prompt at the actual ZODB/serialize.py:416
error or only at transaction/_transaction.py:267 where some sort of
previous error is handled?

If the former, I often find it informative to step up to
ZODB/serialize.py:407 where obj.__getstate__() is called and find out
what obj is.  Is it the same object every time?  If not, is it of the
same type every time?

A next step can also be to put a pdb.set_trace() at
transaction/_transaction.py:340 in the register() method such that it's
is only called when the offending object is added to the transaction.

Hope some of that helps,
Ross

> Traceback (most recent call last):
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/Products/ZCatalog/ZCatalog.py",
> line 296, in refreshCatalog
> self.catalog_object(obj, p, pghandler=pghandler)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/zope/Products/CMFPlone/CatalogTool.py",
> line 367, in catalog_object
> self._increment_counter()
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/zope/Products/CMFPlone/CatalogTool.py",
> line 395, in _increment_counter
> self._counter.change(1)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/BTrees/Length.py",
> line 55, in change
> self.value += delta
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/Connection.py",
> line 890, in register
> self._register(obj)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZODB/Connection.py",
> line 900, in _register
> self.transaction_manager.get().join(self)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/transaction/_transaction.py",
> line 273, in join
> self._prior_operation_failed() # doesn't return
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/transaction/_transaction.py",
> line 267, in _prior_operation_failed
> raise TransactionFailedError("An operation previously failed, "
> TransactionFailedError: An operation previously failed, with traceback:
>
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZServer/PubCore/ZServerPublisher.py",
> line 25, in __init__
> response=b)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py",
> line 401, in publish_module
> environ, debug, request, response)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py",
> line 202, in publish_module_standard
> response = publish(request, module_name, after_list, debug=debug)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py",
> line 119, in publish
> request, bind=1)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/mapply.py",
> line 88, in mapply
> if debug is not None: return debug(object,args,context)
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/ZPublisher/Publish.py",
> line 42, in call_object
> result=apply(object,args) # Type s to step into published object.
>   File
> "/home/rob/topp/14000/builds/20080611/opencore/lib/zope/lib/python/Products/ZCatalog/ZCatalog.py",
> line 260, in manage_catalogReindex
> self.refreshCatalog(clear=

[Zope] Re: record count in catalog

2008-06-15 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Darryl Caldwell wrote:
> Hi all,
> 
> The Catalog tab in my catalog says this:
> 
> The catalog "mycatalog" contains 30,345 record(s) in the path "/".
> 
> But when I sort and return a list of cataloged objects I only have 19,881.
> 
> Here is the script call to retrieve the records:
> 
> context.mycatalog.search( {}, sort_index='lastname' )
> 
> Why don't the numbers match up?

Some of your objects don't have a 'lastname' attribute, and so when
sorting, they get dropped.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIVXkf+gerLs4ltQ4RAun4AJ0X8whmA8ABUqkn1bAWIMqv3utX+ACZAV8y
YQCLz6XhuBvLn8rAF65Q4L4=
=6XZ+
-END PGP SIGNATURE-

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


[Zope] Re: [Zope-dev] Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-14 Thread Dieter Maurer
Jim Fulton wrote at 2008-6-11 15:18 -0400:
>
>On Jun 11, 2008, at 10:36 AM, rahul bhaskar wrote:
>
>> Hi,
>> I am facing some problem with merging two zodb file.
>> is it possible to open two zodb Database at a time and copy object
>> from one to another.
>
>
>Yes, using the export/import mechanism.

Another option is to mount both ZODB's and then copy the objects.

It is necessary to decouple the copy from its source before
it can be stored in the target. Apparently, "copy.deepcopy" is
able to reliably decouple.



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


[Zope] Re: Python instance growing while ZTC

2008-06-12 Thread Philipp von Weitershausen

Marco Bizzarri wrote:

Hi all.

Apologies in advance if my question has a somewhat obvious answer.

I'm working on a Zope application, developed as a python product.

I've ZTC in place for this application. While I run all the ZTC, I can
see python process size growing. Can I use this as an indication of a
leak of resources in my application?


Probably not. I suggest running your tests multiple times in a loop 
using the -N switch of the test runner. If the memory consumption grows 
with each repetition of the tests, you may have a leak.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Jim Fulton


On Jun 11, 2008, at 10:36 AM, rahul bhaskar wrote:


Hi,
I am facing some problem with merging two zodb file.
is it possible to open two zodb Database at a time and copy object
from one to another.



Yes, using the export/import mechanism.

Jim

--
Jim Fulton
Zope Corporation


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Zope3-Users] is it possible to copy object b/w two zodb Database

2008-06-11 Thread Eric Bréhault
Hello,

I do not know if you can open 2 ZODB

but you can exchange objects between 2 instances:
a method on instance A would export an object as zexp and stream it over http
and a method on instance B would call this method on instance A, and
would import the resulting zexp

but there is maybe a smarter way

Eric

On Wed, Jun 11, 2008 at 4:36 PM, rahul bhaskar <[EMAIL PROTECTED]> wrote:
> Hi,
> I am facing some problem with merging two zodb file.
> is it possible to open two zodb Database at a time and copy object
> from one to another.
>
> Regards
> Rahul Bhaskar
> ___
> Zope3-users mailing list
> [EMAIL PROTECTED]
> http://mail.zope.org/mailman/listinfo/zope3-users
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: zopectlsock missing

2008-06-11 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
> This happens from time to time and I've never really understood how it
> ends up like this.
> There's no zopeinstance/var/zopectlsock socket which means that
> zopectl stop|restart|start just spits out "daemon manager not running"
> When in fact, Zope is running. It's there when you run `netstat -nptl`
> and you can go to the.
> If I do go in to http://localhost:8080/Control_Panel/manage_main and
> Shutdown the next time I'll be able to use zopectl happily.
> 
> Does anybody know what's going on with and why it goes missing?
> I have a vague suspicion that it might have something to do with my
> init.d restart script and rebooting of the server but I could be
> wrong.

Ususally when I see the "daemon manager not running", it implies that I
don't have permissions on the socket file, rather than that the file is
missing (e.g., the service was started as root).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIT/0R+gerLs4ltQ4RAugWAJ0REaUnTpYrIbBarVmaS44RZjUBsACfWfy2
CBqExbsezRoYQi3JGNo/pYE=
=j68T
-END PGP SIGNATURE-

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


[Zope] Re: [Zope3-Users] NOTICE: zope.org server move

2008-06-11 Thread Reinoud van Leeuwen
On Wed, Jun 11, 2008 at 02:05:51PM +0300, Marius Gedminas wrote:
> On Wed, Jun 11, 2008 at 01:22:18AM -0500, Jens Vagelpohl wrote:
> > The zope.org-related servers and services maintained by Zope Corporation 
> > will be moving to a new home late Thursday night Eastern Standard Time.
> 
> > How long will the outage last?
> > 
> >
> > The servers will be moved physically to a new hosting provider. There  
> > will be an outage of about 2 hours for the physical move, as well as an 
> > outage while the new DNS information for these services propagate  
> > throughout the internet.
> 
> If the sysadmins reduce the DNS TTLs to something like 5 minutes, and do
> that well in advance of the physical move (say, couple of days before),
> then new DNS information should propagate quickly.

That would be the case if all DNS servers would be perfect

-- 
__
"Nothing is as subjective as reality"
Reinoud van Leeuwen[EMAIL PROTECTED]
http://reinoud.van.leeuwen.net
__
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: acl_users folder > 25000

2008-06-06 Thread Max M

Kees de Brabander skrev:

A client of mine wants a site that is only accessible for members. However,
there are more than 25000 members. Are there any reasons that would make it
unwise to populate an ordinary acl_users folder with such a number of user
accounts?



Have you tried to just generate 25K users in an empty site and see what 
happens? It should take 15 about minutes to set up and write the code.


Members are stored in a dict, and the ZODB. They should be plenty fast.

Last week I wrote a tool that imported 10K lines of data from a csv file 
as dicts. It took about 2 seconds to read them from disk and save them 
in the ZODB. That is comparable.


Perhaps you don't have a problem?



--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] re: help required in [result.data_record_id_]

2008-06-04 Thread Dieter Maurer
suhail shaik wrote at 2008-6-2 12:25 +0100:
> I am a novice in zope. i have to debug a program where i get the key value
>error, traversal error.
>
>a lil info from the error log.
>
>"Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
>   - __traceback_info__:
>here.getStoryNumber(here.catalog.data.getobject(result.data_record_id_,
>REQUEST=None).getId())
>  Module PythonExpr, line 1, in 
>  Module Products.ZCatalog.ZCatalog, line 590, in getobject
>  Module OFS.Traversable, line 284, in unrestrictedTraverse
>   - __traceback_info__: (['20071122_9.txt', 'stories', 'text'], '20071122')
>KeyError: '20071122'"

This looks like an inconsistency between your catalog
and the world of catalogued objects.

Try to rebuild your catalog.
You do this by visiting the catalog "Advanced" tab and there
pressing the "Update catalog" button.

Then try again whether the error remains.



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


[Zope] Re: acl_users folder > 25000

2008-06-04 Thread Riccardo Lemmi
Kees de Brabander wrote:

> A client of mine wants a site that is only accessible for members. However,
> there are more than 25000 members. Are there any reasons that would make it
> unwise to populate an ordinary acl_users folder with such a number of user
> accounts?

we have a Plone site with 30K users, if you access some parts you can have slow
response (eg source_users is not batched), so if you use these parts often it
is better to use an LDAP or RDBMS "user manager" plugin

> If so, what other options do I have?
> tia
> Cornelis J. de Brabander

-- 
Riccardo Lemmi   Email:   [EMAIL PROTECTED]
Reflab S.r.l. - Plone Design, Development and Consulting
Phone: +39 349 4620820 http://www.reflab.it

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


Re: [Zope] Re: PageTemplates len() of unsized object

2008-06-02 Thread Philipp von Weitershausen

On 2 Jun 2008, at 20:44 , Dieter Maurer wrote:

Philipp von Weitershausen wrote at 2008-5-28 21:52 +0200:

Dieter Maurer wrote:

2008-05-24T09:31:32 ERROR Zope.SiteErrorLog http://myurl/error_log/manage_main
Traceback (innermost last):
 Module ZPublisher.Publish, line 119, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 42, in call_object
 Module Shared.DC.Scripts.Bindings, line 313, in __call__
 Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
 Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
 Module Products.PageTemplates.PageTemplate, line 89, in pt_render
 Module zope.pagetemplate.pagetemplate, line 117, in pt_render
 Module zope.tal.talinterpreter, line 271, in __call__
 Module zope.tal.talinterpreter, line 346, in interpret
 Module zope.tal.talinterpreter, line 379, in do_startEndTag
 Module zope.tal.talinterpreter, line 412, in do_startTag
TypeError: len() of unsized object

...
As far as I can tell, the code in zope.pagetemplate and zope.tales  
still

has the same traceback information that Products.PageTemplate had.
zope.tal, which contains the TAL interpreter, doesn't have any  
traceback

supplements, but then again, Zope 2's TAL package doesn't either.

To conclude, I don't think there's a "step backward" at all.


The Zope 2.9 code had traceback support in "PageTemplate.pt_render"
which told us which template was affected.
As you can see in the traceback above, at least this traceback support
is lost in Zope 2.10.

To conclude: "no step backward at all" is incorrect.

Looking at Zope 2.11, the traceback support above seems to have
been resurrected.


Furthermore, I could not find the equivalent of the transback
support which formerly was in "Expressions.py" (I found the one
corresponding to "TALES" and "PythonExpr").


Thank you for that careful analysis. I was only comparing Zope 2.9  
with Zope 3 (which are AFAICT equivalent in their traceback info) but  
I didn't take 2.10 into consideration. I've now filed a bug report at https://bugs.launchpad.net/zope2/+bug/236938 
 to make sure the issue isn't lost. I will look into it a.s.a.p.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: PageTemplates len() of unsized object

2008-06-02 Thread Dieter Maurer
Philipp von Weitershausen wrote at 2008-5-28 21:52 +0200:
>Dieter Maurer wrote:
>>> 2008-05-24T09:31:32 ERROR Zope.SiteErrorLog 
>>> http://myurl/error_log/manage_main
>>> Traceback (innermost last):
>>>   Module ZPublisher.Publish, line 119, in publish
>>>   Module ZPublisher.mapply, line 88, in mapply
>>>   Module ZPublisher.Publish, line 42, in call_object
>>>   Module Shared.DC.Scripts.Bindings, line 313, in __call__
>>>   Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
>>>   Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
>>>   Module Products.PageTemplates.PageTemplate, line 89, in pt_render
>>>   Module zope.pagetemplate.pagetemplate, line 117, in pt_render
>>>   Module zope.tal.talinterpreter, line 271, in __call__
>>>   Module zope.tal.talinterpreter, line 346, in interpret
>>>   Module zope.tal.talinterpreter, line 379, in do_startEndTag
>>>   Module zope.tal.talinterpreter, line 412, in do_startTag
>>> TypeError: len() of unsized object
> ...
>As far as I can tell, the code in zope.pagetemplate and zope.tales still 
>has the same traceback information that Products.PageTemplate had. 
>zope.tal, which contains the TAL interpreter, doesn't have any traceback 
>supplements, but then again, Zope 2's TAL package doesn't either.
>
>To conclude, I don't think there's a "step backward" at all.

The Zope 2.9 code had traceback support in "PageTemplate.pt_render"
which told us which template was affected.
As you can see in the traceback above, at least this traceback support
is lost in Zope 2.10.

To conclude: "no step backward at all" is incorrect.

Looking at Zope 2.11, the traceback support above seems to have
been resurrected.


Furthermore, I could not find the equivalent of the transback
support which formerly was in "Expressions.py" (I found the one
corresponding to "TALES" and "PythonExpr").









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


[Zope] re: help required in [result.data_record_id_]

2008-06-02 Thread suhail shaik
Hi,

 I am a novice in zope. i have to debug a program where i get the key value
error, traversal error.

a lil info from the error log.

"Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
   - __traceback_info__:
here.getStoryNumber(here.catalog.data.getobject(result.data_record_id_,
REQUEST=None).getId())
  Module PythonExpr, line 1, in 
  Module Products.ZCatalog.ZCatalog, line 590, in getobject
  Module OFS.Traversable, line 284, in unrestrictedTraverse
   - __traceback_info__: (['20071122_9.txt', 'stories', 'text'], '20071122')
KeyError: '20071122'"


i am unable to understand why this error is occuring . at the expression.

 


i would be happy if some one could give me a sense of direction and give a
brief idea where the error could have occured and how i should approach.

thanks in advance.

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


Re: [Zope] Re: zope-memory-readings

2008-05-30 Thread Paul Winkler
On Fri, May 30, 2008 at 3:56 PM, Tres Seaver <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Peter Bengtsson wrote:
>> Check it out
>> http://code.google.com/p/zope-memory-readings/
>>
>> Perhaps useful
>
> Looks really cool.  Thanks for releasing it!

Yeah. It also looks nicely non-zope-specific.
All it really needs to do its job is a PID and a log file in apache's
common format.
The only zope-specific stuff is just a couple lines of code that uses
a path to a Zope instance to find those.

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


[Zope] Re: zope-memory-readings

2008-05-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
> Check it out
> http://code.google.com/p/zope-memory-readings/
> 
> Perhaps useful

Looks really cool.  Thanks for releasing it!


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIQFvm+gerLs4ltQ4RAnX5AJ4zVxk8RdCJv6C+/7Ls8e7apoWkuQCeMGC3
BZd6MLBKfHMVb42mO5Kzi6Q=
=M7LL
-END PGP SIGNATURE-

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


Re: [Zope] Re: Displaying Graphs using TAL

2008-05-30 Thread Tino Wildenhain

Hi,

Encolpe Degoute wrote:
...


 If your site is only for FireFox or evolved browser you can use inline


not only Firefox. also Opera supports this for years :-)
It is not totally ideal because of the overhead due to the
base64-encoding.

For graphs (as the op wants to show) I think in the long
run SVG would be a better option (gnuplot can output SVG)

Regards
Tino


smime.p7s
Description: S/MIME Cryptographic Signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Displaying Graphs using TAL

2008-05-30 Thread Andreas Jung



--On 30. Mai 2008 10:20:28 +0200 Encolpe Degoute 
<[EMAIL PROTECTED]> wrote:



Andreas Jung a écrit :



--On 30. Mai 2008 12:38:21 +0530 Andyy
<[EMAIL PROTECTED]> wrote:


i am preparing graphs(MatPlotLib) related files using external methods.,
when i test them on zope they display very well there.

But when i call these external methods using tal as:


where IterationBar is my external method that displays a BarChart.

Or using

 


1) the thing you're calling must return an *URL*
  not the image data itself...think about how the 
  in HTML works

2) The script called through the given url must return the image
  data _and_ it must set the proper http headers content-type,
  and content-length


 If your site is only for FireFox or evolved browser you can use inline
rendering:





Ouch :-)

Andreas

pgpUpKC10NfuI.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Displaying Graphs using TAL

2008-05-30 Thread Encolpe Degoute
Andreas Jung a écrit :
> 
> 
> --On 30. Mai 2008 12:38:21 +0530 Andyy
> <[EMAIL PROTECTED]> wrote:
> 
>> i am preparing graphs(MatPlotLib) related files using external methods.,
>> when i test them on zope they display very well there.
>>
>> But when i call these external methods using tal as:
>>
>> 
>> where IterationBar is my external method that displays a BarChart.
>>
>> Or using
>>
>>  >tal:attributes="src context.IteartionBar(context)"/>
> 
> 1) the thing you're calling must return an *URL*
>   not the image data itself...think about how the 
>   in HTML works
> 
> 2) The script called through the given url must return the image
>   data _and_ it must set the proper http headers content-type,
>   and content-length

 If your site is only for FireFox or evolved browser you can use inline
rendering:



-- 
Encolpe Degoute
INGENIWEB (TM) - S.A.S 5 Euros - RC B 438 725 632
Bureaux de la Colline
1 rue Royal
92210 Saint Cloud
web : www.ingeniweb.com - « les Services Web Ingénieux »
Tel : 01.78.15.24.08 / Fax : 01 47 57 39 14

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


[Zope] Re: PageTemplates len() of unsized object

2008-05-28 Thread Philipp von Weitershausen

Dieter Maurer wrote:

Giampiero Benvenuti wrote at 2008-5-24 11:47 +0200:

...
after the upgrade from zope2.9.7 to 2.10.6 i get this error in the  
event log:


2008-05-24T09:31:32 ERROR Zope.SiteErrorLog http://myurl/error_log/manage_main
Traceback (innermost last):
  Module ZPublisher.Publish, line 119, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 42, in call_object
  Module Shared.DC.Scripts.Bindings, line 313, in __call__
  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
  Module Products.PageTemplates.PageTemplateFile, line 129, in _exec
  Module Products.PageTemplates.PageTemplate, line 89, in pt_render
  Module zope.pagetemplate.pagetemplate, line 117, in pt_render
  Module zope.tal.talinterpreter, line 271, in __call__
  Module zope.tal.talinterpreter, line 346, in interpret
  Module zope.tal.talinterpreter, line 379, in do_startEndTag
  Module zope.tal.talinterpreter, line 412, in do_startTag
TypeError: len() of unsized object


Looks as if the Zope 2.10 PageTemplate implementation made a big
step backward with respect to quality of traceback information :-((


As far as I can see, traceback information was never added within the 
TAL interpreter but always for TALES expression evalutation. The 
traceback above seems to be about something going wrong within the TAL 
interpreter which is probably why we don't see any further traceback info.



Shane had added lots of "__traceback_info__" and "__traceback_supplement__"
declarations to the older code such that the tracebacks were
very informative
... unlike the traceback above.


As far as I can tell, the code in zope.pagetemplate and zope.tales still 
has the same traceback information that Products.PageTemplate had. 
zope.tal, which contains the TAL interpreter, doesn't have any traceback 
supplements, but then again, Zope 2's TAL package doesn't either.


To conclude, I don't think there's a "step backward" at all.

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: dtml-tree documentation

2008-05-25 Thread Philipp von Weitershausen

Andreas Jung wrote:

Is there a complete documentation of the dtml-tree tag anywhere?
The dtml reference of the Zope book has the following for some options:
"This attribute is for advanced usage only"
Where can I find out about this 'advanced usage'?


Using DTML and related DTML tags is like driving a SUV in the time
of climate change.

Better look a "ZopeTree" or something similar (I think there was 
something like "SimpleTree" - Google).


zope.app.tree has a bunch of adapters and helpers for creating complex 
folding trees with any sort of templating mechanism, including Page 
Templates.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Confused about permissions

2008-05-16 Thread Dieter Maurer
Brenda Bell wrote at 2008-5-13 13:27 +:
>In article <[EMAIL PROTECTED]>,
> Brenda Bell <[EMAIL PROTECTED]> 
> wrote:
>
>> What I can't seem to do is get the permissions right such that a user in 
>> the Editor role can add new External Files.
>> 
>> I've checked every box on the Security tab for the Editor role.  Users 
>> in the Editor role can view and modify existing ExternalFile's but still 
>> cannot add new ones.
>> 
>
>I enabled VerboseSecurity and I see this in my console window when I try 
>to add an ExternalFile when logged in as a user who is assigned the 
>Editor role:
>
>2008-05-13 13:12:55 ERROR Zope.SiteErrorLog 
>http://localhost:8090/foo/manage_addProduct/ExternalFile/manage_addObject
>ViaGui
>Traceback (innermost last):
>  Module ZPublisher.Publish, line 110, in publish
>  Module ZPublisher.BaseRequest, line 596, in traverse
>  Module ZPublisher.HTTPResponse, line 713, in unauthorized
>Unauthorized: You are not authorized to access this 
>resource.
>No Authorization header found. 

The "manage_addObject" requires roles for which no user folder
in context could identify an appropriate user.

You could try to find out in an interactive interpreter
(started with "bin/zopectl debug" under "*nix") which
roles are required.

  
app.unrestrictedTraverse('foo/manage_addProduct/ExternalFile').manage_addObject__roles__



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


[Zope] Re: one zope instance per cpu

2008-05-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sours, Kevin wrote:
>  
> 
>> Four:  the idea is to split up the processes so that their threads
> make best 
>> use of the available CPUs.  Python's global interpreter lock makes
> using more 
>> than one CPU within a single process problematic.
> 
> In the multiprocess setup, is it better to run a single thread per
> process or multiple threads? Seems like multiple threads would still
> prevent long running requests from tying up a processor, but the
> overhead may not be worth it.  I haven't had a change to do any testing,
> so I was wondering if there was a concensus.

I would still go  with multiple threads, for the cases where the
application *does* release the GIL (e.g., making a call to a relational
database, etc.)  The tradeoff is that you hit the ceiling on RAM faster
with more threads, so if your system is RAM-constrained, you should
perhaps consider reducing the number of threads.


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKx3h+gerLs4ltQ4RAmiNAJ98AhMS8+pyi3p0xOjOVMVczxQGeACguaIE
NdL21l8nX3Y3NsKyNZevJxU=
=Z6LP
-END PGP SIGNATURE-

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


[Zope] Re: Confused about permissions

2008-05-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Brenda Bell wrote:
> In article <[EMAIL PROTECTED]>,
>  Brenda Bell <[EMAIL PROTECTED]> 
>  wrote:
> 
>> What I can't seem to do is get the permissions right such that a user in 
>> the Editor role can add new External Files.
>>
>> I've checked every box on the Security tab for the Editor role.  Users 
>> in the Editor role can view and modify existing ExternalFile's but still 
>> cannot add new ones.

I don't know that product.  There is likely another permission, e.g.
'Add External Files', which protects the methods used to create new
instances;  that permission is likely distinct from the permissions
required to modify or delete those instances.

> I enabled VerboseSecurity and I see this in my console window when I try 
> to add an ExternalFile when logged in as a user who is assigned the 
> Editor role:
> 
> 2008-05-13 13:12:55 ERROR Zope.SiteErrorLog 
> http://localhost:8090/foo/manage_addProduct/ExternalFile/manage_addObject
> ViaGui
> Traceback (innermost last):
>   Module ZPublisher.Publish, line 110, in publish
>   Module ZPublisher.BaseRequest, line 596, in traverse
>   Module ZPublisher.HTTPResponse, line 713, in unauthorized
> Unauthorized: You are not authorized to access this 
> resource.
> No Authorization header found. 

That traceback should be from the first request, which then prompts you
to log in (e.g., via basic auth).

The next request should either succeed (if the login / password you
supply matches), or show a different traceback (e.g., invalid credentials).

> A loop in BaseRequest seems to be falling through a loop that's 
> dependent on ''__allow_groups__''.

'__allow_groups__' is the name which the authentication machinery uses
to find the user folder:  it is an alias for 'acl_users', not visible in
the ZMI.

> I've tried adding a group, assigning the Editor role to the group and 
> making my user a member of the group.  But I still get the same error.
> 
> What am I missing?


Rewa.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKxyD+gerLs4ltQ4RAr4BAJ9g3VW8CKoNUsTeyOeLv0q4mYJE4QCgu6Id
PoQUteaxY9oNtgwqyNQfdHQ=
=SBFz
-END PGP SIGNATURE-

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


RE: [Zope] Re: one zope instance per cpu

2008-05-14 Thread Sours, Kevin
 

> Four:  the idea is to split up the processes so that their threads
make best 
> use of the available CPUs.  Python's global interpreter lock makes
using more 
> than one CPU within a single process problematic.

In the multiprocess setup, is it better to run a single thread per
process or multiple threads? Seems like multiple threads would still
prevent long running requests from tying up a processor, but the
overhead may not be worth it.  I haven't had a change to do any testing,
so I was wondering if there was a concensus.
Kevin

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


[Zope] Re: one zope instance per cpu

2008-05-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pat McNamee wrote:
>> Generally, the rule-of-thumb for scaling Zope on a multi-CPU box is to
>> run an appserver instance per CPU, each talking to a shared storage...
> 
> I came across the preceeding post while googling for info about the
> one zope per cpu question.
> 
> First, when you say one zope instance per cpu, do you count a quad-core
> cpu as four cpus?

Four:  the idea is to split up the processes so that their threads make
best use of the available CPUs.  Python's global interpreter lock makes
using more than one CPU within a single process problematic.

> Also, I've been (unsuccessfully) searching all over for an answer to
> the question: if you create one zope instance per cpu each talking
> to a shared zeo instance, how do the instances know about the cpus?
> Does each instance automagically use a separate cpu or what?

Modern linux kernels will tend to migrate all the processes to separate
CPUs (in steady state).

> I thank you in advance for your reply, and I hope I'm not being
> rude by emailing you instead of the Zope list. If this is rude
> please tell me and I'll post to the list.

CC'ing the list does leave the conversation open, and makes future
searches likelier to show the "whole picture".


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIKni9+gerLs4ltQ4RAg9rAJ4xaklSySaGqR2bdZhxE6RVL2qOPACdEqWO
lq2zMLDM4+G4q2WuqmAO2Gk=
=D5M6
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Strange property behaviour - why? (zope 2.10/Five)

2008-05-13 Thread Piotr Chamera

Suresh V. pisze:

Piotr Chamera wrote:

def list_items2(self):
""" test """
return self.items

try to remove acquisition wrapper before you access items?

But this function returns no value, it fails to find "items" attribute
in self and tries to find it through acquisition :(

--
Piotr Chamera
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Confused about permissions

2008-05-13 Thread Brenda Bell
In article <[EMAIL PROTECTED]>,
 Brenda Bell <[EMAIL PROTECTED]> 
 wrote:

> What I can't seem to do is get the permissions right such that a user in 
> the Editor role can add new External Files.
> 
> I've checked every box on the Security tab for the Editor role.  Users 
> in the Editor role can view and modify existing ExternalFile's but still 
> cannot add new ones.
> 

I enabled VerboseSecurity and I see this in my console window when I try 
to add an ExternalFile when logged in as a user who is assigned the 
Editor role:

2008-05-13 13:12:55 ERROR Zope.SiteErrorLog 
http://localhost:8090/foo/manage_addProduct/ExternalFile/manage_addObject
ViaGui
Traceback (innermost last):
  Module ZPublisher.Publish, line 110, in publish
  Module ZPublisher.BaseRequest, line 596, in traverse
  Module ZPublisher.HTTPResponse, line 713, in unauthorized
Unauthorized: You are not authorized to access this 
resource.
No Authorization header found. 

A loop in BaseRequest seems to be falling through a loop that's 
dependent on ''__allow_groups__''.

I've tried adding a group, assigning the Editor role to the group and 
making my user a member of the group.  But I still get the same error.

What am I missing?

> I thought maybe the problem had to do with permissions on the 
> ExternalFile product itself, but when reading the description on the 
> Define Permissions tab I couldn't really figure out what it was trying 
> to say:
> 
> "The first column below lists the permissions for this object. The 
> second specifies the permissions that should have this permission in 
> this product or ZClass. For ZClass methods, only permissions that are 
> defined for the ZClass are permitted.
> In general, any permissions that include operations that change (mutate) 
> an object should be disabled."
> 
> What exactly does this mean?
> 
> More to the point:  What permissions do I need to assign to my Editor 
> role so users can add External Files?
> 
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

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


[Zope] Re: Strange property behaviour - why? (zope 2.10/Five)

2008-05-13 Thread Suresh V.

Piotr Chamera wrote:



def list_items2(self):
""" test """
return self.items


try to remove acquisition wrapper before you access items?

Suresh

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: disappearing external methods

2008-05-07 Thread Garry Saddington
On Wednesday 07 May 2008 18:13, Josef Meile wrote:
> Garry Saddington schrieb:
> >> Have you tried deleting the .pyc files associated with the external
> >> methods and then restarting zope?
> >
> > There are no .pyc files in any of our installations.
> > Have you used the Zope that comes with Centos or from Zope.org?
>
> Tried, as somebody say, to open the external method on the ZMI, then
> press save, and test if it works. If you have a lot of them, you could
> try Dieter's advice here:
>
> http://mail.zope.org/pipermail/zope/2002-July/119101.html
>
> Check also that you move all .py files from your external methods and
> that file and folder permissions allow the user running zope to access
> them.
>
> I'm not sure but I think this problems with the external methods only
> happen with old zope versions. Which version you have?

2.9.6
I am re-compiling on Centos to see if that helps

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


[Zope] Re: disappearing external methods

2008-05-07 Thread Josef Meile

Garry Saddington schrieb:

Have you tried deleting the .pyc files associated with the external methods
and then restarting zope?

There are no .pyc files in any of our installations.
Have you used the Zope that comes with Centos or from Zope.org?
Tried, as somebody say, to open the external method on the ZMI, then 
press save, and test if it works. If you have a lot of them, you could

try Dieter's advice here:

http://mail.zope.org/pipermail/zope/2002-July/119101.html

Check also that you move all .py files from your external methods and
that file and folder permissions allow the user running zope to access
them.

I'm not sure but I think this problems with the external methods only
happen with old zope versions. Which version you have?

Best regards
Josef
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Zope threads and the GIL

2008-05-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Manuel Vazquez Acosta wrote:
> Dieter Maurer wrote:
>> Manuel Vazquez Acosta wrote at 2008-5-4 11:12 -0400:
>>> ...
>>> That would mean that the only place where real multitasking occurs is
>>> when fetching objects from ZEO and other I/O bounded tasks, isn't?
>> I depends what you mean with "real multitasking".
>>
>> If you mean by this that several CPUs are concurrently active for your
>> Zope process, then you are near. 
> 
> Exactly. Several CPUs, I would like to use.

Generally, the rule-of-thumb for scaling Zope on a multi-CPU box is to
run an appserver instance per CPU, each talking to a shared storage
(ZEO, usually, but RelStorage would do as well).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIH7wa+gerLs4ltQ4RAndLAJwM+qs7w5hQy0tA9ZY33mJBGPeTBgCeN8fi
J50GVau5mZLxpFnRyJLYCIc=
=09EA
-END PGP SIGNATURE-

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


[Zope] Re: But I have python2.4-dev installed

2008-05-01 Thread Peter Bengtsson
Turns out that I was missing libc6-dev (I had libc6)

2008/4/28 Tres Seaver <[EMAIL PROTECTED]>:
>
>
>  -BEGIN PGP SIGNED MESSAGE-
>  Hash: SHA1
>
>
>  Peter Bengtsson wrote:
>  > Searching the mailing list it seems that the uniform advice is to
>  > install python2.4-dev but I already have that installed. I also
>  > installed the metapackage
>  > python-all-dev just to be safe. I'll paste the whole error of what
>  > happens when I try to make a configured Zope 2.10 or Zope 2.9.8.
>  > In the error it says this:
>  > "/usr/lib/gcc/i486-linux-gnu/4.2.3/include/limits.h:122:61: error:
>  > limits.h: No such file or directory"
>  > But that file exists and around line 122 it contains the following:
>  > 121> #ifdef _GCC_NEXT_LIMITS_H
>  > 122> #include_next /* recurse down to the real 
> one */
>  > 123> #endif
>  >
>  > This is the first Zope I've tried to install on this brand spanking
>  > new (K)ubuntu 8.04 which is a fresh install (not an upgrade).
>  > The error:
>
>  Googling that error reveals the following gcc thread which seems to be
>  relevant:
>
>   http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00819.html
>
>
>  Tres.
>  - --
>  ===
>  Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
>  Palladion Software   "Excellence by Design"http://palladion.com
>  -BEGIN PGP SIGNATURE-
>  Version: GnuPG v1.4.6 (GNU/Linux)
>  Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>  iD8DBQFIFlSn+gerLs4ltQ4RArWtAJ0ceikWr8z9Ty7wnKP8rR1Sr9oGowCgy3sq
>  2/qcsS+1cQuvQ/XUNqPUQok=
>  =PYkF
>  -END PGP SIGNATURE-
>
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Check for currently loged in users

2008-04-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

robert rottermann wrote:
> vaibhav pol schrieb:
>> Dear all,
>>  here i am using zop-2.8.1 and am trying to get the how many users 
>> currently loged in  zope. Let me know if zope having any  supported 
>> function or module to do the same .
> 
> to my knowledge there is no such tool.
> the logged in user is not a state kept by the server, so there is 
> nothing the server can tell you.

The usual workaround is to report the number of sessions open (which the
server *does* know about).


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIGIXE+gerLs4ltQ4RAih8AKC9/rq0YK7yHXD5KF2t8JC+pZ+AwACg2jG6
OHKwvimJ5oti49GZZSlnD9g=
=Wrsc
-END PGP SIGNATURE-

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


[Zope] Re: But I have python2.4-dev installed

2008-04-28 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Bengtsson wrote:
> Searching the mailing list it seems that the uniform advice is to
> install python2.4-dev but I already have that installed. I also
> installed the metapackage
> python-all-dev just to be safe. I'll paste the whole error of what
> happens when I try to make a configured Zope 2.10 or Zope 2.9.8.
> In the error it says this:
> "/usr/lib/gcc/i486-linux-gnu/4.2.3/include/limits.h:122:61: error:
> limits.h: No such file or directory"
> But that file exists and around line 122 it contains the following:
> 121> #ifdef _GCC_NEXT_LIMITS_H
> 122> #include_next /* recurse down to the real one 
> */
> 123> #endif
> 
> This is the first Zope I've tried to install on this brand spanking
> new (K)ubuntu 8.04 which is a fresh install (not an upgrade).
> The error:

Googling that error reveals the following gcc thread which seems to be
relevant:

  http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00819.html


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIFlSn+gerLs4ltQ4RArWtAJ0ceikWr8z9Ty7wnKP8rR1Sr9oGowCgy3sq
2/qcsS+1cQuvQ/XUNqPUQok=
=PYkF
-END PGP SIGNATURE-

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


[Zope] Re: manage_tabs.dtml (was manage_users.dtml)

2008-04-25 Thread Tom Von Lahndorff
It was using manage_tabs.dtml in /Products/ExternalEditor. Wow, that
was driving me nuts.

On Fri, Apr 25, 2008 at 4:08 PM, Tom Von Lahndorff <[EMAIL PROTECTED]> wrote:
> Sorry!!  I meant /python/App/dtml/manage_tabs.dtml
>
>  -- Forwarded message --
>  From: Tom Von Lahndorff <[EMAIL PROTECTED]>
>  Date: Fri, Apr 25, 2008 at 4:07 PM
>  Subject: manage_users.dtml
>  To: zope list user 
>
>
>  I'm using Zope 2.10.5. Made a change to
>   /python/App/dtml/manage_users.dtml and it's not showing up after I
>   rebooted. I even removed /python/App/dtml/manage_users.dtml altogether
>   and and rebooted and the app came up fine, still not showing the
>   change. Is there another file that controls the ZMI tabs in Zope2 in
>   2.10.5. I have a couple of older version that I tested this on, 2.9.6
>   and ti worked fine. Thanks!
>
>   - Tom
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Extensive Javascript GUI and security

2008-04-24 Thread Tim Nash
It is just a how to. And judging by the lack of discussion it has
generated I guess it is old news. Oh well, I am figuring out the
security problems anyway.

I'm thinking of switching to zope 3 just to get more feedback on my
posts! Well that and the Flint project looks interesting.
:)



On Thu, Apr 24, 2008 at 6:31 AM, Garito <[EMAIL PROTECTED]> wrote:
> But did you pretend to make something useful or a demo is enough?
> Why don't make the demo changing the ZMI GUI or something more useful? (ZMI
> is old enough and needs a renew version, don't you think so?)
>
>
>
>  Thanks!
>
> 2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
> > Sorry, I am not a great writer. Let me list the points:
> >
> > -The code demonstrates how to build a full GUI in javascript.
> > - It uses the extjs library.
> > - Building a GUI like this reduces the load on zope which makes zope
> scalable.
> > - You can also distribute your GUI code to be closer to your
> > customers. For example, you can host your zope in Norway but place
> > your GUI on web servers in Norway, Australia, Spain, Russia etc.
> >
> > - I am having problem understanding how to set up the security when
> > using zope in this way.
> > - I wish someone would take a look at the code and help me figure out
> > the best security.
> >
> > Thanks!,
> >
> > Tim
> >
> >
> > On Wed, Apr 23, 2008 at 3:47 AM, Garito <[EMAIL PROTECTED]> wrote:
> > > Sorry, Tim, but I don't catch what you pretend with this demo
> > >
> > > Can you explain more about this test?
> > >
> > > Thanks!
> > >
> > > 2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
> > > >
> > > >
> > > >
> > > > I updated the 'HowTo' to now include a TTW version of the same
> > > > product. This could be a useful way to compare TTW code with product
> > > > based code for anyone interested. That is if the security issues are
> > > > resolved.
> > > >
> > > >
> > > > http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> > > >
> > > >
> > > > The TTW zexp also doesn't require the installation of extjs but it is
> > > > for demo purposes only.
> > > >
> > > >
> > > > On Tue, Apr 22, 2008 at 1:35 PM, Tim Nash <[EMAIL PROTECTED]> wrote:
> > > > > I have created a zope product that demonstrates how I would like to
> > > > >  use zope with extjs library. The demo does not require an
> installation
> > > > >  of extjs. It is linked to here
> > > > >  http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> > > > >
> > > > >  I hope that using zope along with extjs in this way makes zope much
> > > > >  more scalable however I am having trouble figuring out the proper
> way
> > > > >  to set up security.
> > > > >
> > > > >  Could somebody check out my demo and give me feedback on how to set
> up
> > > > >  the security?
> > > > >  I would like the user to only have to log on once. Subsequent AJAX
> > > > >  calls should not require subsequent log in.
> > > > >
> > > > >  Also, I create new accounts by copying an account 'template' folder
> > > > >  that includes a acl_users folder in it. How do you set the proper
> > > > >  security when you create accounts in this way? How do you set the
> > > > >  security on an external Method in these folders?
> > > > >  I want to use zope to hold medical data for everyone from a
> physician
> > > > >  in the remote regions of the World all the way up to multi-hospital
> > > > >  chains. This requires a very scalable and very secure zope.
> > > > >
> > > > >  Thanks for any help!
> > > > >
> > > > >  Tim
> > > > >
> > > > ___
> > > > Zope maillist  -  Zope@zope.org
> > > > http://mail.zope.org/mailman/listinfo/zope
> > > > **   No cross posts or HTML encoding!  **
> > > > (Related lists -
> > > >   http://mail.zope.org/mailman/listinfo/zope-announce
> > > >   http://mail.zope.org/mailman/listinfo/zope-dev )
> > > >
> > >
> > >
> > >
> > > --
> > > Mis Cosas
> > > http://blogs.sistes.net/Garito
> > > Zope Smart Manager
> > > http://blogs.sistes.net/Garito/670
> > > ___
> > >  Zope maillist  -  Zope@zope.org
> > >  http://mail.zope.org/mailman/listinfo/zope
> > >  **   No cross posts or HTML encoding!  **
> > >  (Related lists -
> > >   http://mail.zope.org/mailman/listinfo/zope-announce
> > >   http://mail.zope.org/mailman/listinfo/zope-dev )
> > >
> > >
> >
>
>
>
> --
>
> Mis Cosas
> http://blogs.sistes.net/Garito
>  Zope Smart Manager
> http://blogs.sistes.net/Garito/670
> ___
>  Zope maillist  -  Zope@zope.org
>  http://mail.zope.org/mailman/listinfo/zope
>  **   No cross posts or HTML encoding!  **
>  (Related lists -
>   http://mail.zope.org/mailman/listinfo/zope-announce
>   http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail

Re: [Zope] Re: Extensive Javascript GUI and security

2008-04-24 Thread Garito
But did you pretend to make something useful or a demo is enough?
Why don't make the demo changing the ZMI GUI or something more useful? (ZMI
is old enough and needs a renew version, don't you think so?)

Thanks!

2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
>
> Sorry, I am not a great writer. Let me list the points:
>
> -The code demonstrates how to build a full GUI in javascript.
> - It uses the extjs library.
> - Building a GUI like this reduces the load on zope which makes zope
> scalable.
> - You can also distribute your GUI code to be closer to your
> customers. For example, you can host your zope in Norway but place
> your GUI on web servers in Norway, Australia, Spain, Russia etc.
>
> - I am having problem understanding how to set up the security when
> using zope in this way.
> - I wish someone would take a look at the code and help me figure out
> the best security.
>
> Thanks!,
>
> Tim
>
>
> On Wed, Apr 23, 2008 at 3:47 AM, Garito <[EMAIL PROTECTED]> wrote:
> > Sorry, Tim, but I don't catch what you pretend with this demo
> >
> > Can you explain more about this test?
> >
> > Thanks!
> >
> > 2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
> > >
> > >
> > >
> > > I updated the 'HowTo' to now include a TTW version of the same
> > > product. This could be a useful way to compare TTW code with product
> > > based code for anyone interested. That is if the security issues are
> > > resolved.
> > >
> > >
> > > http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> > >
> > >
> > > The TTW zexp also doesn't require the installation of extjs but it is
> > > for demo purposes only.
> > >
> > >
> > > On Tue, Apr 22, 2008 at 1:35 PM, Tim Nash <[EMAIL PROTECTED]> wrote:
> > > > I have created a zope product that demonstrates how I would like to
> > > >  use zope with extjs library. The demo does not require an
> installation
> > > >  of extjs. It is linked to here
> > > >  http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> > > >
> > > >  I hope that using zope along with extjs in this way makes zope much
> > > >  more scalable however I am having trouble figuring out the proper
> way
> > > >  to set up security.
> > > >
> > > >  Could somebody check out my demo and give me feedback on how to set
> up
> > > >  the security?
> > > >  I would like the user to only have to log on once. Subsequent AJAX
> > > >  calls should not require subsequent log in.
> > > >
> > > >  Also, I create new accounts by copying an account 'template' folder
> > > >  that includes a acl_users folder in it. How do you set the proper
> > > >  security when you create accounts in this way? How do you set the
> > > >  security on an external Method in these folders?
> > > >  I want to use zope to hold medical data for everyone from a
> physician
> > > >  in the remote regions of the World all the way up to multi-hospital
> > > >  chains. This requires a very scalable and very secure zope.
> > > >
> > > >  Thanks for any help!
> > > >
> > > >  Tim
> > > >
> > > ___
> > > Zope maillist  -  Zope@zope.org
> > > http://mail.zope.org/mailman/listinfo/zope
> > > **   No cross posts or HTML encoding!  **
> > > (Related lists -
> > >   http://mail.zope.org/mailman/listinfo/zope-announce
> > >   http://mail.zope.org/mailman/listinfo/zope-dev )
> > >
> >
> >
> >
> > --
> > Mis Cosas
> > http://blogs.sistes.net/Garito
> > Zope Smart Manager
> > http://blogs.sistes.net/Garito/670
> > ___
> >  Zope maillist  -  Zope@zope.org
> >  http://mail.zope.org/mailman/listinfo/zope
> >  **   No cross posts or HTML encoding!  **
> >  (Related lists -
> >   http://mail.zope.org/mailman/listinfo/zope-announce
> >   http://mail.zope.org/mailman/listinfo/zope-dev )
> >
> >
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Extensive Javascript GUI and security

2008-04-23 Thread Tim Nash
Sorry, I am not a great writer. Let me list the points:

-The code demonstrates how to build a full GUI in javascript.
- It uses the extjs library.
- Building a GUI like this reduces the load on zope which makes zope scalable.
- You can also distribute your GUI code to be closer to your
customers. For example, you can host your zope in Norway but place
your GUI on web servers in Norway, Australia, Spain, Russia etc.

- I am having problem understanding how to set up the security when
using zope in this way.
- I wish someone would take a look at the code and help me figure out
the best security.

Thanks!,
Tim

On Wed, Apr 23, 2008 at 3:47 AM, Garito <[EMAIL PROTECTED]> wrote:
> Sorry, Tim, but I don't catch what you pretend with this demo
>
> Can you explain more about this test?
>
> Thanks!
>
> 2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
> >
> >
> >
> > I updated the 'HowTo' to now include a TTW version of the same
> > product. This could be a useful way to compare TTW code with product
> > based code for anyone interested. That is if the security issues are
> > resolved.
> >
> >
> > http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> >
> >
> > The TTW zexp also doesn't require the installation of extjs but it is
> > for demo purposes only.
> >
> >
> > On Tue, Apr 22, 2008 at 1:35 PM, Tim Nash <[EMAIL PROTECTED]> wrote:
> > > I have created a zope product that demonstrates how I would like to
> > >  use zope with extjs library. The demo does not require an installation
> > >  of extjs. It is linked to here
> > >  http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> > >
> > >  I hope that using zope along with extjs in this way makes zope much
> > >  more scalable however I am having trouble figuring out the proper way
> > >  to set up security.
> > >
> > >  Could somebody check out my demo and give me feedback on how to set up
> > >  the security?
> > >  I would like the user to only have to log on once. Subsequent AJAX
> > >  calls should not require subsequent log in.
> > >
> > >  Also, I create new accounts by copying an account 'template' folder
> > >  that includes a acl_users folder in it. How do you set the proper
> > >  security when you create accounts in this way? How do you set the
> > >  security on an external Method in these folders?
> > >  I want to use zope to hold medical data for everyone from a physician
> > >  in the remote regions of the World all the way up to multi-hospital
> > >  chains. This requires a very scalable and very secure zope.
> > >
> > >  Thanks for any help!
> > >
> > >  Tim
> > >
> > ___
> > Zope maillist  -  Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >   http://mail.zope.org/mailman/listinfo/zope-announce
> >   http://mail.zope.org/mailman/listinfo/zope-dev )
> >
>
>
>
> --
> Mis Cosas
> http://blogs.sistes.net/Garito
> Zope Smart Manager
> http://blogs.sistes.net/Garito/670
> ___
>  Zope maillist  -  Zope@zope.org
>  http://mail.zope.org/mailman/listinfo/zope
>  **   No cross posts or HTML encoding!  **
>  (Related lists -
>   http://mail.zope.org/mailman/listinfo/zope-announce
>   http://mail.zope.org/mailman/listinfo/zope-dev )
>
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Extensive Javascript GUI and security

2008-04-23 Thread Garito
Sorry, Tim, but I don't catch what you pretend with this demo

Can you explain more about this test?

Thanks!

2008/4/23, Tim Nash <[EMAIL PROTECTED]>:
>
> I updated the 'HowTo' to now include a TTW version of the same
> product. This could be a useful way to compare TTW code with product
> based code for anyone interested. That is if the security issues are
> resolved.
>
>
> http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
>
>
> The TTW zexp also doesn't require the installation of extjs but it is
> for demo purposes only.
>
>
> On Tue, Apr 22, 2008 at 1:35 PM, Tim Nash <[EMAIL PROTECTED]> wrote:
> > I have created a zope product that demonstrates how I would like to
> >  use zope with extjs library. The demo does not require an installation
> >  of extjs. It is linked to here
> >  http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
> >
> >  I hope that using zope along with extjs in this way makes zope much
> >  more scalable however I am having trouble figuring out the proper way
> >  to set up security.
> >
> >  Could somebody check out my demo and give me feedback on how to set up
> >  the security?
> >  I would like the user to only have to log on once. Subsequent AJAX
> >  calls should not require subsequent log in.
> >
> >  Also, I create new accounts by copying an account 'template' folder
> >  that includes a acl_users folder in it. How do you set the proper
> >  security when you create accounts in this way? How do you set the
> >  security on an external Method in these folders?
> >  I want to use zope to hold medical data for everyone from a physician
> >  in the remote regions of the World all the way up to multi-hospital
> >  chains. This requires a very scalable and very secure zope.
> >
> >  Thanks for any help!
> >
> >  Tim
> >
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>   http://mail.zope.org/mailman/listinfo/zope-announce
>   http://mail.zope.org/mailman/listinfo/zope-dev )
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Extensive Javascript GUI and security

2008-04-22 Thread Tim Nash
I updated the 'HowTo' to now include a TTW version of the same
product. This could be a useful way to compare TTW code with product
based code for anyone interested. That is if the security issues are
resolved.

http://wiki.zope.org/zope2/HowToCreateJavascriptGUI

The TTW zexp also doesn't require the installation of extjs but it is
for demo purposes only.

On Tue, Apr 22, 2008 at 1:35 PM, Tim Nash <[EMAIL PROTECTED]> wrote:
> I have created a zope product that demonstrates how I would like to
>  use zope with extjs library. The demo does not require an installation
>  of extjs. It is linked to here
>  http://wiki.zope.org/zope2/HowToCreateJavascriptGUI
>
>  I hope that using zope along with extjs in this way makes zope much
>  more scalable however I am having trouble figuring out the proper way
>  to set up security.
>
>  Could somebody check out my demo and give me feedback on how to set up
>  the security?
>  I would like the user to only have to log on once. Subsequent AJAX
>  calls should not require subsequent log in.
>
>  Also, I create new accounts by copying an account 'template' folder
>  that includes a acl_users folder in it. How do you set the proper
>  security when you create accounts in this way? How do you set the
>  security on an external Method in these folders?
>  I want to use zope to hold medical data for everyone from a physician
>  in the remote regions of the World all the way up to multi-hospital
>  chains. This requires a very scalable and very secure zope.
>
>  Thanks for any help!
>
>  Tim
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: anyone heard of Zamasing?

2008-04-21 Thread Garito
The tecnique showed by Tim is the same I use at Zope Smart Manager but I
prefer prototype and scriptaculous. At this time the most active community
is, perhaps, RoR and they use the same libraries

And when I use a Zope manage page like the constructor of a product I use
ModalBox to show it as a dialog box

I like to put in ZSM a drag and drop option to sort the ordered folder
objects, to launch the creation dialog and delete object to a trash (I need
scriptaculous for things like this)

It's amazing what you can do with AJAX! (prototype is the library used)

I don't want to program anything else like a desktop program (in fact I
believe that the next desktop will be a http server)

2008/4/21, Simon Michael <[EMAIL PROTECTED]>:
>
> Tim Nash wrote:
>
> > find a way to upload the zexp to the wiki but I don't see how to do
> >
>
> You're absolutely right, I forgot we restricted this to authenticated
> users when junk uploads became a problem. I did the upload and changed the
> link. Contact me for a wiki.zope.org login so you can do more uploads, or
> you may prefer to just link to your site.
>
> Thanks for sharing this example!
>
> ___
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>



-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: anyone heard of Zamasing?

2008-04-21 Thread Simon Michael

Tim Nash wrote:

find a way to upload the zexp to the wiki but I don't see how to do


You're absolutely right, I forgot we restricted this to authenticated 
users when junk uploads became a problem. I did the upload and changed 
the link. Contact me for a wiki.zope.org login so you can do more 
uploads, or you may prefer to just link to your site.


Thanks for sharing this example!

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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: anyone heard of Zamasing?

2008-04-19 Thread Tim Nash
I created an entry and added a link to the zexp on my site. I tried to
find a way to upload the zexp to the wiki but I don't see how to do
it. I tried mozilla and safari 3 on mac. It may be one of those deals
where the icon only shows up on Internet explorer.

Here is the link:

http://wiki.zope.org/zope2/HowToCreateJavascriptGUI



On Sat, Apr 19, 2008 at 9:48 AM, Simon Michael <[EMAIL PROTECTED]> wrote:
> Tim Nash wrote:
>
> >   I created a zexp that demonstrates the use of extjs and zope but I
> > don't know where to put it for anyone that might be interested. Can
> > the wiki.zope.org/zope2 site accept .zexp uploads?
> >
>
>  Hi Tim - yes it can, see the edit form. However there is a size limit, it's
> either 1Mb or 1Gb. :) See if it works for you.
>
>
>
>  ___
>  Zope maillist  -  Zope@zope.org
>  http://mail.zope.org/mailman/listinfo/zope
>  **   No cross posts or HTML encoding!  **
>  (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: anyone heard of Zamasing?

2008-04-19 Thread Simon Michael

Tim Nash wrote:

   I created a zexp that demonstrates the use of extjs and zope but I
don't know where to put it for anyone that might be interested. Can
the wiki.zope.org/zope2 site accept .zexp uploads?


Hi Tim - yes it can, see the edit form. However there is a size limit, 
it's either 1Mb or 1Gb. :) See if it works for you.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

Yes please
and thakns to every body
  

Here you go  :

#!/bin/python

import base64
import urllib2
base64string = base64.encodestring('%s:%s' % ("username", "password"))
url = "http://10.28.1.239/bitacoras/alta/estado2.html";
req = urllib2.Request(url)
req.add_header("Authorization", "Basic %s" % base64string)
handle = urllib2.urlopen(req)
print handle.read()




--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: anyone heard of Zamasing?

2008-04-18 Thread Tim Nash
Simon,
   I created a zexp that demonstrates the use of extjs and zope but I
don't know where to put it for anyone that might be interested. Can
the wiki.zope.org/zope2 site accept .zexp uploads?

 This zexp doesn't require the installation of extjs to see how it
works because it uses the extjs cached on the extjs site (for
demonstration purposes only)

This demonstrates:
1. separation of GUI from zope. (you could serve your zope data from
one continent and your GUI from another.)
2. use of extjs data storage (client cache of data reduces calls to zope)
3. loading of extjs  data storage widget via ajax and JSON
4.  ajax submit of form data
5. client side form field validation
and my favorite:
6.  webserver cache of GUI reduces load on zope making zope more scalable

-Tim


On Thu, Apr 17, 2008 at 6:35 PM, Simon Michael <[EMAIL PROTECTED]> wrote:
> Tim Nash wrote:
>
> > up-to-date documentation than anything else. Products are the way to
> > go. It is very much like wriitng 'Scripts Python'. I am going to put a
> > simple 'boring' product on the zope.org site (if they let me) which
> >
>
>  Hi Tim.. put it also on http://wiki.zope.org/zope2 if you wish. That is an
> easy place to grow and rework documentation.
>
>
>
>  ___
>  Zope maillist  -  Zope@zope.org
>  http://mail.zope.org/mailman/listinfo/zope
>  **   No cross posts or HTML encoding!  **
>  (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
Yes please
and thakns to every body

2008/4/18, Martijn Jacobs <[EMAIL PROTECTED]>:
>
>  I have a very old python script which does want you want, I can send it to
> you if you like.
>
>
>  Martijn
>
>  Using web browser work fine.
>
> Using wireshark I see what my python program not send WWW-Authentification.
>
> Now I going to python list. But if someone know how can tell me please
>
> 2008/4/18, Martijn Jacobs <[EMAIL PROTECTED]>:
>
>
>  Miguel Beltran R. wrote:
>
>
>
>  #Martijn
> Yes, have role manager
>
>
>
>
>
>  What if you login with the user with your webbrowser instead of your python
> program?
>
>
>  --
>  Martijn Jacobs
>  Four Digits, Internet Solutions
>
>  a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
> 8161.22.234.B01
>  e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
>  tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
>
>
>
>
>
>
>  --
> Martijn Jacobs
> Four Digits, Internet Solutions
>
> a: Willemsplein 15-1 6811 KB Arnhem NL
> kvk: 09162137 | btw: 8161.22.234.B01
> e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
> tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
>
>


-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs
I have a very old python script which does want you want, I can send it 
to you if you like.



Martijn

Using web browser work fine.

Using wireshark I see what my python program not send WWW-Authentification.

Now I going to python list. But if someone know how can tell me please

2008/4/18, Martijn Jacobs <[EMAIL PROTECTED]>:
  

Miguel Beltran R. wrote:



#Martijn
Yes, have role manager




  

 What if you login with the user with your webbrowser instead of your python
program?


 --
 Martijn Jacobs
 Four Digits, Internet Solutions

 a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
8161.22.234.B01
 e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
 tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117





  



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 

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


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
Using web browser work fine.

Using wireshark I see what my python program not send WWW-Authentification.

Now I going to python list. But if someone know how can tell me please

2008/4/18, Martijn Jacobs <[EMAIL PROTECTED]>:
> Miguel Beltran R. wrote:
>
> > #Martijn
> > Yes, have role manager
> >
> >
> >
> >
>  What if you login with the user with your webbrowser instead of your python
> program?
>
>
>  --
>  Martijn Jacobs
>  Four Digits, Internet Solutions
>
>  a: Willemsplein 15-1 6811 KB Arnhem NL kvk: 09162137 | btw:
> 8161.22.234.B01
>  e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
>  tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
>


-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Miguel Beltran R. wrote:

#Martijn
Yes, have role manager


  
What if you login with the user with your webbrowser instead of your 
python program?



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Miguel Beltran R.
#Martijn
Yes, have role manager

#Josef
After change options and restart
Z2.log:
10.28.1.18 - admin [18/Apr/2008:17:01:08 +0200] "GET
/Control_Panel/manage_main HTTP/1.1" 200 8023 "" "Mozilla/5.0
(Windows; U; Windows NT 5.1; es-AR; rv:1.8.1.14) Gecko/20080404
Firefox/2.0.0.14"
10.28.1.18 - Anonymous [18/Apr/2008:17:01:18 +0200] "POST
/bitacoras/alta/estado2.html HTTP/1.1" 200 692 "" "Python-urllib/2.5"

trace.log:
B 36356824 2008-04-18T17:01:08 GET /Control_Panel/manage_main
I 36356824 2008-04-18T17:01:08 0
A 36356824 2008-04-18T17:01:08 200 8023
E 36356824 2008-04-18T17:01:08
B 36356864 2008-04-18T17:01:18 POST /bitacoras/alta/estado2.html
I 36356864 2008-04-18T17:01:18 434
A 36356864 2008-04-18T17:01:18 200 692
E 36356864 2008-04-18T17:01:18

error_log:
??



2008/4/18, Josef Meile <[EMAIL PROTECTED]>:
> Hi Miguel
>
>  First, you could drop the Unauthorized Exception from the error_log
>  object in the root folder of the zope management interface. Then
>  activate the verbose-security option in your zope.conf file. To do
>  this, you need to put/replace this lines:
>
>  security-policy-implementation python
>  verbose-security on
>
>  After you have done this, you need to restart zope, try again your
>  authentication script, and take a look at your event.log file or
>  the error_log object. You may find the reason of why is this failing.
>  In case you don't find it, then place the full traceback here.
>
>  Best regards
>  Josef
>
>  Miguel Beltran R. schrieb:
>
>
> > I have this program what open a dtml what return a XML page, but I
> > have error with permisions:
> >
> > import urllib, urllib2
> >
> > pagina = "http://10.28.1.239/bitacoras/alta/estado2.html";
> > datos = {"btipo":"D",
> > "bholo":87654321,
> > "bplac":"dd-12345",
> > "accion":"alta_gasolina",
> > }
> >
> > params=urllib.urlencode(datos)
> > aut=urllib2.HTTPBasicAuthHandler()
> > aut.add_password("AFICON", pagina, "myuser", "mypass")
> > opener=urllib2.build_opener(aut)
> > urllib2.install_opener(opener)
> > r=urllib2.urlopen(pagina,params)
> > print r.read()
> > r.close()
> >
> > but returned XML say:
> > 
> >  alta_gasolina
> >   error
> >Unauthorized
> >You are not allowed to access 'zsql_alta'
> > in this context
> >
> >  
> >
> > help? how I can send HTTPBasicAuth?
> >
> > pd. Sorry by my bad english
> >
>
>  ___
>  Zope maillist  -  Zope@zope.org
>  http://mail.zope.org/mailman/listinfo/zope
>  **   No cross posts or HTML encoding!  **
>  (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>


-- 

Lo bueno de vivir un dia mas
es saber que nos queda un dia menos de vida
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: authentication with python program

2008-04-18 Thread Martijn Jacobs

Hi Miguel,

Is the dtml page accessable by the role "myuser" has?  Did you set the 
"Use Database Methods" permission for that role?






Hi Miguel

First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:

security-policy-implementation python
verbose-security on

After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.

Best regards
Josef

Miguel Beltran R. schrieb:

I have this program what open a dtml what return a XML page, but I
have error with permisions:

import urllib, urllib2

pagina = "http://10.28.1.239/bitacoras/alta/estado2.html";
datos = {"btipo":"D",
 "bholo":87654321,
 "bplac":"dd-12345",
 "accion":"alta_gasolina",
}

params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password("AFICON", pagina, "myuser", "mypass")
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()

but returned XML say:

  alta_gasolina
   error
Unauthorized
You are not allowed to access 'zsql_alta'
in this context

  

help? how I can send HTTPBasicAuth?

pd. Sorry by my bad english


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



--
Martijn Jacobs
Four Digits, Internet Solutions

a: Willemsplein 15-1 6811 KB Arnhem NL 
kvk: 09162137 | btw: 8161.22.234.B01

e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117 


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: authentication with python program

2008-04-18 Thread Josef Meile

Hi Miguel

First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:

security-policy-implementation python
verbose-security on

After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.

Best regards
Josef

Miguel Beltran R. schrieb:

I have this program what open a dtml what return a XML page, but I
have error with permisions:

import urllib, urllib2

pagina = "http://10.28.1.239/bitacoras/alta/estado2.html";
datos = {"btipo":"D",
 "bholo":87654321,
 "bplac":"dd-12345",
 "accion":"alta_gasolina",
}

params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password("AFICON", pagina, "myuser", "mypass")
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()

but returned XML say:

  alta_gasolina
   error
Unauthorized
You are not allowed to access 'zsql_alta'
in this context

  

help? how I can send HTTPBasicAuth?

pd. Sorry by my bad english


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: anyone heard of Zamasing?

2008-04-17 Thread Simon Michael

Tim Nash wrote:

up-to-date documentation than anything else. Products are the way to
go. It is very much like wriitng 'Scripts Python'. I am going to put a
simple 'boring' product on the zope.org site (if they let me) which


Hi Tim.. put it also on http://wiki.zope.org/zope2 if you wish. That is 
an easy place to grow and rework documentation.


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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Zope3-Users] Authentication without cookies

2008-04-14 Thread Jonathan


- Original Message - 
From: "Hermann Himmelbauer" <[EMAIL PROTECTED]>

To: "Peter Bengtsson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 14, 2008 1:34 PM
Subject: Re: [Zope3-Users] Authentication without cookies



Am Montag, 14. April 2008 18:55 schrieb Peter Bengtsson:

Slightly off-topic: What mobile browsers that support XHTML don't
support cookies these days? Don't need an accurate answer but I'm
curious about rough numbers.


Well, I have a SonyEricsson K750i which seems not to support cookies. It 
does

have some options for cookies, but they don't work.

And the SonyEricsson K550i does support cookies, but - even worse - 
sometimes

does not send the cookie, which *may* have something to do with the cookie
path and bugs in the mobile browser. In this case, the user loses his
authentication and has to login.

So, if even such recent models have severe cookie-problems, I deduce that
things will be at least the same if not worse in older models. But I can 
only
speak about SonyEricsson models as I had not yet time to test other 
brands.


Moreover, WAP seems not to support cookies by design, at least in another,
incompatible fashion, which I'm unsure how this works.


A little off the zope topic, but...

In order to ensure usability by all of our users (regardless as to device 
type) we do not use cookies on our WAP sites. We embed a session identifier 
in every url.


Jonathan 


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

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Conditional dtml-boundary in dtml-sendmail

2008-04-14 Thread Chris Withers

Josef Meile wrote:

Well, I guess I will do an external method on my own server and then try
to convince the people owning the machine where the page is hosted to
include it. 


You could do a lot worse that using MailTemplates:

http://www.simplistix.co.uk/software/zope/mailtemplates

It's a stable piece of software that's been around for a few years now 
and will let you do lots of useful mail-related things without having to 
install further code on the server filesystem...


cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: [Plone-developers] the grand reunion

2008-04-14 Thread Yuri


> I would like to have an easy way to develop without having to be subject 
> to dependencies from other envinroment, minimize the effort to mantain 
> it and focus on doing things  :) 
> 
  


Maybe not exactly what you are asking for but I recommend you play
with buildout a bit - I'm sure you'll appreciate the ease with which
you can manage independent installations in a repeatable and easily
modifiable way.

  
> Is one big zope installation, with multiple instances, well suited for 
> this tasks? Or is better different zope versions? What about the various 
> Data.fs, is better to have them separated by application or by zope 
> envinroment? I mean all the Plone in a single Data.fs or each one in a 
> separated Data.fs?
> 



Without further knowing how these sites might be related or not
this is hard to answer but often times I prefer to have separate
Zope instances (-> different ZODBs) for different Plone sites.
Even if they share substantial configuration/add-ons etc.
Again, using buildout makes it a snap to create and maintain
as many Zope instances as you want. And using a common buildout
cache they can also mostly share the basic installation.

Just my 2 cents,

Raphael

  




hi yuri,

when setting up a zope/zeo task and everything was still a bit of a 
challenge (at least to me) we tended to have everything in one big 
instance that served some 20 low traffic sites.
since then setting up a site with all the tools it needs has become a 
trivially easy and quick to execute task. we have converted nearly all 
these sites to have their own instance.


I would not do it differently anymore ..

robert
  


Thanks to all!

It seems that a separate zope instance for each plone site is the way 
to go. Just a question: is it a problem for performance/bottleneck/big 
python lock?

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: [Plone-developers] the grand reunion

2008-04-13 Thread robert rottermann

Rudá Porto Filgueiras schrieb:

On Fri, Apr 11, 2008 at 1:23 PM, Florian Friesdorf <[EMAIL PROTECTED]> wrote:

Hi Robert,


 On Fri, Apr 11, 2008 at 04:04:43PM +0200, robert rottermann wrote:
 > hi yuri,
 >
 > when setting up a zope/zeo task and everything was still a bit of a
 > challenge (at least to me) we tended to have everything in one big
 > instance that served some 20 low traffic sites.
 > since then setting up a site with all the tools it needs has become a
 > trivially easy and quick to execute task. we have converted nearly all
 > these sites to have their own instance.
 >
 > I would not do it differently anymore ..

 Do you have or are there any comparisons for RAM usage of one zope instance
 containing multiple plone instances vs. multiple zope instances containing a
 single plone instance only?


It will be overkill. ;-)
We run all Plone sitess in same instance as possible (plone provider),
only creating one data.fs to each Plone Site and tunning cache objects
to each site needs.



you might be right,
is is an overkill when you start. just creating a new folder and a new 
plone site in it is *so* easy.
however, every site has its own lifecycle and tends to call for extra 
products, adaptations, plone & product versions, you name it. every such 
change affects every site in a "one zope/several plone site" setup.
and even if the change migth be trivial, it can have unwanted side 
effects for an other site.

my experience is: dont do it!

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

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Critical System Hosed, Plan B - upgrade zope, convert db

2008-04-12 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Wes Modes wrote:
> Okay, I accept that Zope is a mysterious god that requires sacrifice.  
> And I wasn't able to solve the mysteries of how to get it up and running 
> again with my old data after an unintentional "upgrade."
> 
> However...  I can upgrade Python from 2.4.2 to 2.4.4 and upgrade Zope 
> from 2.7.2 to 2.10.5, get that working, and then hopefully convert my 
> old data.
> 
> I can handle the python and zope upgrades, but have no idea how to take 
> my old zope database and use it with my brand new zope installation.
> 
> Any ideas?

 $ /path/to/Zope-2.10.x/bin/mkzopeinstance -d ~/z210 -u admin:123
 $ cp -r ~/z27/Products ~/z210/Products
 $ ~/z210/bin/zopectl fg
 # fix / upgrade products broken by the upgrade to 2.10 until
 # Zope starts in foreground mode
 ^C
 $ ~/z27/bin/zopectl stop
 $ cp ~/z27/var/Data.fs* ~/z10/var
 $ ~/z210/bin/zopectl fg
 # Now, find and fix problems related to old data


Tres.
- --
===
Tres Seaver  +1 540-429-0999  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIAWSA+gerLs4ltQ4RAhejAJ9+4JsMIQD2T0+nl7Dk110RFnwGxgCgsq/p
kefvTl7vmTQOPHWRtX8hjaA=
=o8fp
-END PGP SIGNATURE-

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


  1   2   3   4   5   6   7   8   9   10   >