[Zope-Coders] Zope tests: 8 OK

2005-09-30 Thread Zope tests summarizer
Summary of messages to the zope-tests list.
Period Thu Sep 29 11:01:01 2005 UTC to Fri Sep 30 11:01:01 2005 UTC.
There were 8 messages: 8 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2_6-branch Python-2.1.3 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:24:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003207.html

Subject: OK : Zope-2_6-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:26:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003208.html

Subject: OK : Zope-2_7-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:27:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003209.html

Subject: OK : Zope-2_7-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:29:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003210.html

Subject: OK : Zope-2_8-branch Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:30:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003211.html

Subject: OK : Zope-2_8-branch Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:32:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003212.html

Subject: OK : Zope-trunk Python-2.3.5 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:33:45 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003213.html

Subject: OK : Zope-trunk Python-2.4.1 : Linux
From: Zope Unit Tests
Date: Thu Sep 29 22:35:15 EDT 2005
URL: http://mail.zope.org/pipermail/zope-tests/2005-September/003214.html

___
Zope-Coders mailing list
Zope-Coders@zope.org
http://mail.zope.org/mailman/listinfo/zope-coders


[Zope-dev] Re: Strange security issue with Zope 2.8.1

2005-09-30 Thread Jens Vagelpohl
My understanding (and the way we use it when monkey patching for  
instance) is that whenevery you apply new security to a class, you  
create a new ClassSecurityInfo on it. It only defines new stuff  
to do. The real synthesized security is still stored in  
__ac_permissions__.


Yes, your understanding matches what I know now. Part of my earlier  
diagnosis was wrong, the behavior of class_init has not changed  
between Zope 2.7 and Zope 2.8, just the behavior of Archetypes.


What Archetypes seems to do is to generate a new ClassSecurityInfo  
during the call to registerType, which does not contain added  
information, but information about every single method on the class.  
It does try to look at the already existing __ac_permissions__ to  
make sure already set permissions don't get stomped, but when a name  
is declared private or public it will not be part of  
__ac_permissions__ and Archetypes will gladly stomp all over it.


I have applied a patch locally (and submitted it on the Archetypes  
bug tracker on sf.net) that seems to solve the problem. I honestly  
don't know if there are other dangerous consequences because the way  
Archetypes works is just really dark magic which I don't want to get  
into too far. Basically, at the point where it tries to find already- 
set permissions, I am also trying to find a name method__roles__  
to determine if something has already been declared private or  
public, and then re-declare it private or public on the  
ClassSecurityInfo object that Archetypes creates:


Index: Archetypes/ClassGen.py
===
--- Archetypes/ClassGen.py  (revision 6167)
+++ Archetypes/ClassGen.py  (working copy)
@@ -103,6 +103,8 @@

 perm = _modes[mode]['security']
 perm = getattr(field, perm, None)
+method__roles__ = getattr(klass, '%s__roles__' % methodName, 0)
+
 # Check copied from SecurityInfo to avoid stomping over
 # existing permissions.
 if security.names.get(methodName, perm) != perm:
@@ -112,6 +114,10 @@
  'permission declared is the correct one and '
  'has preference over the permission declared '
  'on the field.' % methodName)
+elif method__roles__ is None:
+security.declarePublic(methodName)
+elif method__roles__ == ():
+security.declarePrivate(methodName)
 else:
 security.declareProtected(perm, methodName)

jens

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

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


Re: [Zope-dev] problems setting up methods for a product that registers no classes

2005-09-30 Thread Chris Withers

Dieter Maurer wrote:

You could use part of the old style initialization, the methods
declaration to be precise.

You see an example in .../Products/ZSQLMethods/__init__.py.

Be warned, however: the old style initialization puts
the declared methods on the OFS.Folder class.


Yeah, I thought about that, but it sux for the reasons you gave.

I've found a similar solution to what's currently there which works in 
both 2.7 and 2.8, so I'll make a new release sometime soon...


cheers,

Chris

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

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


[Zope-dev] Can't fetch externals???

2005-09-30 Thread Paul Winkler
I'm trying to fix a bug assigned to me, and for some reason
I can use svn to make and check out my branch but it fails when fetching
externals. Anybody else seen this?

[EMAIL PROTECTED] tmp]$ svn co
svn+ssh://[EMAIL PROTECTED]/repos/main/Zope/branches/slinkp-collector_1895
A  slinkp-collector_1895/Extensions
A  slinkp-collector_1895/Extensions/README.txt
A  slinkp-collector_1895/log.ini
A  slinkp-collector_1895/configure
A  slinkp-collector_1895/doc

(SNIP)

A  slinkp-collector_1895/skel/README.txt
 U slinkp-collector_1895
Checked out revision 38707.

Fetching external item into slinkp-collector_1895/doc/ZEO
svn: Connection refused
svn: Can't connect to host 'svn.zope.org'


And then I get the same thing if I do svn up:

[EMAIL PROTECTED] tmp]$ cd slinkp-collector_1895/
[EMAIL PROTECTED] slinkp-collector_1895]$ svn up

At revision 38707.

Fetching external item into doc/ZEO
svn: Connection refused
svn: Can't connect to host 'svn.zope.org'


-- 
Paul Winkler
http://www.slinkp.com



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


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Paul Winkler
btw, I'm in #zope-dev right now if anybody wants to chat about this.

-PW

Paul Winkler said:
 I'm trying to fix a bug assigned to me, and for some reason
 I can use svn to make and check out my branch but it fails when fetching
 externals. Anybody else seen this?
(snip)

-- 
Paul Winkler
http://www.slinkp.com



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


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Paul Winkler
Update: I *can* fetch the externals from a different box
(my windows laptop, on which i can't successfully build zope
because cygwin's python is known-broken and I don't have a C
compiler other than cygwin's.)

But when I ssh to a linux box (on which building works fine),
I get the problem described in my first post.  REALLY weird and annoying.

Tino W. hopped into #zope-dev and helped for a bit but we didn't
find a solution.

One thing Tino suggested: it might be a firewall issue.
Does svn's externals-fetching look somehow different to a firewall
than does a regular (non-external) checkout?
When I tried checking out on my laptop, I noticed that ZoneAlarm asked 'me
if I wanted to allow svn.exe to use the internet at exactly the moment
that it was time to fetch the externals.  Weird - doesn't it still
use ssh?  What's different?

-PW

Paul Winkler said:
 btw, I'm in #zope-dev right now if anybody wants to chat about this.

 -PW

 Paul Winkler said:
 I'm trying to fix a bug assigned to me, and for some reason
 I can use svn to make and check out my branch but it fails when
 fetching externals. Anybody else seen this?
 (snip)

 --
 Paul Winkler
 http://www.slinkp.com


-- 
Paul Winkler
http://www.slinkp.com



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


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Fred Drake
On 9/30/05, Paul Winkler [EMAIL PROTECTED] wrote:
 One thing Tino suggested: it might be a firewall issue.
 Does svn's externals-fetching look somehow different to a firewall
 than does a regular (non-external) checkout?
 When I tried checking out on my laptop, I noticed that ZoneAlarm asked 'me
 if I wanted to allow svn.exe to use the internet at exactly the moment
 that it was time to fetch the externals.  Weird - doesn't it still
 use ssh?  What's different?

Tino's on the right track; the externals do NOT use ssh; they use an
unauthenticated connection and cannot be used to commit changes (by
intent).

So it could be a firewall issue; some different port needs to be
opened.  The Subversion documentation should tell you what's needed.


  -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Paul Winkler
Hypothesis:
Is it possible that svn.zope.org is configured such that when you get
the externals, it uses plain svn (i.e. an anonymous checkout)
rather than svn+ssh?

If so, I bet that's the answer: our firewall is blocking svn
but allowing svn+ssh.

Can anybody confirm that this is a likely hypothesis?
Our admins are severely overworked recently and I don't want
to bother them with a red herring...

-- 
Paul Winkler
http://www.slinkp.com



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


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Fred Drake
On 9/30/05, Paul Winkler [EMAIL PROTECTED] wrote:
 Hypothesis:
 Is it possible that svn.zope.org is configured such that when you get
 the externals, it uses plain svn (i.e. an anonymous checkout)
 rather than svn+ssh?

As noted, very likely.  The default port for SVN w/out SSH is 3690:

http://svnbook.red-bean.com/en/1.1/ch06s03.html


  -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Sidnei da Silva
On Fri, Sep 30, 2005 at 04:27:47PM -0400, Fred Drake wrote:
| On 9/30/05, Paul Winkler [EMAIL PROTECTED] wrote:
|  Hypothesis:
|  Is it possible that svn.zope.org is configured such that when you get
|  the externals, it uses plain svn (i.e. an anonymous checkout)
|  rather than svn+ssh?
| 
| As noted, very likely.  The default port for SVN w/out SSH is 3690:
| 
| http://svnbook.red-bean.com/en/1.1/ch06s03.html

Note this is not generic externals behaviour. In the case of Zope,
it's because the externals are set to their svn:// urls. It could just
as well be set to svn+ssh://, but then you would be able to checkin a
file from the wrong place without paying attention.

-- 
Sidnei da Silva
Enfold Systems, LLC.
http://enfoldsystems.com
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Can't fetch externals???

2005-09-30 Thread Paul Winkler
Aha! Thanks very much Fred, this arrived just after I sent a message
asking for confirmation of exactly that :-)

Looks like it's the standard 3690 port, I'll go talk to our poor
beleaguered admins...  thanks again!

-PW

Fred Drake said:
 On 9/30/05, Paul Winkler [EMAIL PROTECTED] wrote:
 One thing Tino suggested: it might be a firewall issue.
 Does svn's externals-fetching look somehow different to a firewall
 than does a regular (non-external) checkout?
 When I tried checking out on my laptop, I noticed that ZoneAlarm asked
 'me if I wanted to allow svn.exe to use the internet at exactly the
 moment that it was time to fetch the externals.  Weird - doesn't it
 still use ssh?  What's different?

 Tino's on the right track; the externals do NOT use ssh; they use an
 unauthenticated connection and cannot be used to commit changes (by
 intent).

 So it could be a firewall issue; some different port needs to be
 opened.  The Subversion documentation should tell you what's needed.


   -Fred

 --
 Fred L. Drake, Jr.fdrake at gmail.com
 Zope Corporation
 ___
 Zope-Dev maillist  -  Zope-Dev@zope.org
 http://mail.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope )


-- 
Paul Winkler
http://www.slinkp.com



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


[Zope-dev] Re: Can't fetch externals???

2005-09-30 Thread Hanno Schlichting

Paul Winkler wrote:

Update: I *can* fetch the externals from a different box
(my windows laptop, on which i can't successfully build zope
because cygwin's python is known-broken and I don't have a C
compiler other than cygwin's.)


That's no excuse ;)

You can build Zope on Windows easily with gcc coming with MingW32, which 
is a lot less intrusive and actually working ;)


There is a short description in chapter 6.2.2 here: 
http://www.python.org/doc/2.3.5/inst/tweak-flags.html


and some additional notes can be found by following the two 'See also' 
links.


I have Zope 2.8 trunk running successfully and without problems this way.

Best regards,
Hanno

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

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


Re: [Zope] Aquisition, UserFolder and security

2005-09-30 Thread bruno modulix
Dieter Maurer wrote:
 bruno modulix wrote at 2005-9-29 13:20 +0200:
 
...

The problem here is that CPS (the portal and all CPMs are CPS instances)
uses predefined roles, on which the various workflows relies, so that
would mean renaming all roles - differently - on each CPM, and modifying
the workflows too.


I think that is would only be necessary that the roles
are disjoint between Portal and CPM. All CPMs can use
the same roles.

Nope. Some users may have different roles from CPM to CPM.
 
 
 I did not say that the user to role mapping should (or even must)
 be identical in all CPMs but that the *set* of roles *might* be identical
 in all CPMs -- or to say it differently: that you are not forced
 to use disjoint role sets for any pair of CPMs.
 
 Hopefully, you see the difference...
 

Dieter, I didn't misunderstood your proposed solution. But some users
exist in different CPMs with different roles in each CPM. So - unless
I'm totally at lost with how Zope's security works - if User1 has role
RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
any CPM could gain access to any other CPM just by faking url.

See, it's not only a 'portal roles' vs 'CPMs roles' problem, it's a
'siblings CPS  instances in the same Zope container with a same domain
name' problem. Playing with roles and permissions aquisition settings
and whatever is not the solution here IMHO. Detecting and correcting
'faked' urls would be simpler and better - and that's somehow the
solution I applyed - even if in a somewhat hackish way.

BTW I'm still looking for a hands on doc on traversal hooks, if
there's such a thing...


-- 
Bruno Desthuilliers
Développeur
[EMAIL PROTECTED]
___
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] cutpaste from one mounted storage to another

2005-09-30 Thread M. Krainer
Hi!

Is there a possibility to cutpaste from one mounted storage to another?
I have a filestorage Data.fs mounted as / and another filestorage
Archive.fs mounted at /site/Archive. When I try to cutpaste an
object from e.g. /site/foo/bar to /site/Archive/bar I get an
InvalidObjectReference Exception:

 File /opt/Zope-2.8.1/lib/python/ZODB/Connection.py, line 503, in _commit
 self._store_objects(ObjectWriter(obj), transaction)
 File /opt/Zope-2.8.1/lib/python/ZODB/Connection.py, line 525, in _store_objects
 p = writer.serialize(obj) # This calls __getstate__ of obj
 File /opt/Zope-2.8.1/lib/python/ZODB/serialize.py, line 330, in serialize
 return self._dump(meta, obj.__getstate__())
 File /opt/Zope-2.8.1/lib/python/ZODB/serialize.py, line 339, in _dump
 self._p.dump(state)
 File /opt/Zope-2.8.1/lib/python/ZODB/serialize.py, line 281, in persistent_id
 raise InvalidObjectReference(

InvalidObjectReference: Attempt to store an object from a foreign database connection

Am I doing something wrong or is this simply not possibly resp. is
there a workaround to do a cutpaste between storage boundaries?

Thanks.

-- mkrainer
___
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] Problem with links containing non-ascii characters in StructuredText

2005-09-30 Thread Maurits van Rees
On Fri, Sep 30, 2005 at 07:53:03AM +0200, Andreas Jung wrote:
 You have to configure your locale support in etc/zope.conf properly.

Ah, that seems to be part of the mix yes.  Thanks.  I am now trying:

locale [EMAIL PROTECTED]

I am also wondering about the following two settings, that seem to be
needed as well:

rest-input-encoding utf-8
rest-output-encoding utf-8

According to 
http://www.zope.org/Wikis/DevSite/Proposals/ReStructuredTextIntegration:

Zope 2.X includes a StructuredText module that has several problems:

* undefined behaviour in i18n environments (which characters are
allowed inside StructuredText markup? Which characters count as
punctuation characters?)

So I guess I should be using REstructured text instead.  This indeed
seems to help, though I haven't got all problems ironed out yet.  In
this new format the following:


.. _Zope: http://www.zope.org/ 

I like the `Zöpe platform`__.

__ Zope_ 


gets transformed into something like:

pI like the a class=reference href=http://www.zope.org/;Zöpe 
platform/a./p

Some other linking methods and other encodings either don't work (Zope
doesn't start or throws an error on the page or doesn't produce a
link) or they produce a correct link but with ugly characters like
above.

Maybe I can get it to work with some more trying and guessing.  But
does anyone have a good link on how to get Zope to work correctly with
Unicode?

Thanks,

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
It can seem like you're doing just fine,
but the creep's creeping into your mind. - Neal Morse


signature.asc
Description: Digital 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] Problem with links containing non-ascii characters in StructuredText

2005-09-30 Thread Andreas Jung



--On 30. September 2005 12:19:31 +0200 Maurits van Rees 
[EMAIL PROTECTED] wrote:





So I guess I should be using REstructured text instead.  This indeed
seems to help, though I haven't got all problems ironed out yet.  In
this new format the following:


StructuredText does not work with UTF8 (when you mean this by mentioning
unicode). There is a utf-8 patch for STX but this has other problems.
Means: Don't use STX with multi-byte encodings...instead use reST.

-aj

pgpooQydwJMoQ.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] ZEO clients eating up / filesystem

2005-09-30 Thread Andreas Jung
Perhaps your FS grows because ZEO write the cache files to /tmp (which is 
on your root filesystem)?


-aj

--On 30. September 2005 14:06:16 +0200 Reinoud van Leeuwen 
[EMAIL PROTECTED] wrote:



Hi,

We have a ZEO setup with a Plone based intranet, and for some reason it
seems that Zope is filling up space in the root filesystem. I have to
restart Zope twice a day to clear it up (restarting Zope clears up the
space). lsof does not list anything open in the root filesystem and
swapping is done in the swap partition.

Has anyone observed the same and found a solution?


System details:
- FreeBSD 4.10-RELEASE
- Pyhton 2.3.4
- Zope 2.7.3
- SOFTWARE_HOME /usr/local/zope/lib/python
- ZOPE_HOME /usr/local/zope
- INSTANCE_HOME /usr/local/WWW/intranet/zeo_client1
(2 CPU FreeBSD machines running two ZEO instances)

FilesystemSize   Used  Avail Capacity  Mounted on
/dev/da0s1a  1032M   207M   742M22%/
/dev/da0s1e   4.1G   519M   3.3G14%/usr
/dev/da0s1g   133G   1.3G   121G 1%/usr/local
/dev/da0s1f   4.1G53M   3.7G 1%/var
procfs4.1K   4.1K 0B   100%/proc

This is the zope startup script in /usr/local/etc/rc.d

# !/bin/sh
# Start or stop zope
# $FreeBSD: ports/www/zope/files/zope.sh,v 1.4 2004/11/16 00:02:25 pav Exp
# $ PROVIDE: zope
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
#
prefix=/usr/local
# Define these zope_* variables in one of these files:
#   /etc/rc.conf
#   /etc/rc.conf.local
#   /etc/rc.conf.d/zope
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
zope_enable=${zope_enable:-NO}# Enable gkrellmd
zope_instances=${zope_instances:-}# List of instancehome dirs
. /usr/local/etc/rc.subr
name=zope
rcvar=`set_rcvar`
load_rc_config $name
if checkyesno zope_enable; then

case $1 in
start)
echo Starting Zope
;;
stop)
echo Stopping Zope
;;
restart)
echo Restarting Zope
;;
*)
echo Unknown action \$1\
;;
esac

last_zope_instance=`echo $zope_instances | /usr/bin/awk {'print
$NF'}`
for instance in $zope_instances
do
if [ -r ${instance}/etc/${name}.conf -a -x
${instance}/bin/zopectl ]; then
echo -nInstance ${instance} - 
${instance}/bin/zopectl $1
if [ $instance != $last_zope_instance ]; then
echo sleeping 40 seconds between
instances to prevent read conflict errors during startup
sleep 40
fi
fi
done
fi


--
__
Nothing is as subjective as reality
Reinoud van Leeuwen[EMAIL PROTECTED]
http://www.xs4all.nl/~reinoud
__
___
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 )






pgpWHYIAYCz4Y.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] ZEO clients eating up / filesystem

2005-09-30 Thread Reinoud van Leeuwen
On Fri, Sep 30, 2005 at 02:13:34PM +0200, Andreas Jung wrote:

 Perhaps your FS grows because ZEO write the cache files to /tmp (which is 
 on your root filesystem)?

No I checked that. Nothing in /tmp (and that would have been listed by 
lsof)

-- 
__
Nothing is as subjective as reality
Reinoud van Leeuwen[EMAIL PROTECTED]
http://www.xs4all.nl/~reinoud
__
___
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: Aquisition, UserFolder and security

2005-09-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

bruno modulix wrote:

 Dieter, I didn't misunderstood your proposed solution. But some users
 exist in different CPMs with different roles in each CPM. So - unless
 I'm totally at lost with how Zope's security works - if User1 has role
 RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
 he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
 cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
 any CPM could gain access to any other CPM just by faking url.

The Zope security machinery goes out of its way to prevent such an
exploit:  essentially, it considers only containment acquisition when
evaluating roles, etc.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPTZA+gerLs4ltQ4RApDKAKC60CDyD0rIdCN/CC8dMmPbreeAKACZAUB3
cX01OZuxOaIL1hNnXS1NxrI=
=VlQo
-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: Aquisition, UserFolder and security

2005-09-30 Thread bruno modulix
Tres Seaver wrote:
 bruno modulix wrote:
 
 
Dieter, I didn't misunderstood your proposed solution. But some users
exist in different CPMs with different roles in each CPM. So - unless
I'm totally at lost with how Zope's security works - if User1 has role
RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
any CPM could gain access to any other CPM just by faking url.
 
 
 The Zope security machinery goes out of its way to prevent such an
 exploit:  

Which one ? I have the case where authentication happens in the context,
not containment, ie given two sibling folders fa and fb, each with it's
own acl_user, if UserA exists in fa['acl_users'] and not in
fb['acl_users'], then UserA is still authenticated in fb when accessing
it thru fa/fb (while he is not when accessing fb directly).

 essentially, it considers only containment acquisition when
 evaluating roles, etc.

I wasn't very sure about this. If I understand correctly, this means
that authentication can come from an acl_user aquired by context (this
is what I've experimented), but that roles/permission lookup will only
happens in the containment hierarchy ?

-- 
Bruno Desthuilliers
Développeur
[EMAIL PROTECTED]
___
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: ZEO clients eating up / filesystem

2005-09-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Reinoud van Leeuwen wrote:
 On Fri, Sep 30, 2005 at 02:13:34PM +0200, Andreas Jung wrote:
 
 
Perhaps your FS grows because ZEO write the cache files to /tmp (which is 
on your root filesystem)?
 
 
 No I checked that. Nothing in /tmp (and that would have been listed by 
 lsof)

Unless you make them persistent, ZEO cache files are unlinked from
their directory immediately after creation.  Try looking at
/proc/zope's PID/fd, and see if there aren't a couple of otherwise
inaccessible, and *large*, files there.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPTeh+gerLs4ltQ4RAmJyAJ9pk/jx4f5URs21XllHe4e0MZ3VpQCgtUjo
0KnkUVQmLU7rG9rM+BQDOOg=
=T8HA
-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: Aquisition, UserFolder and security

2005-09-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

bruno modulix wrote:

 Dieter, I didn't misunderstood your proposed solution. But some users
 exist in different CPMs with different roles in each CPM. So - unless
 I'm totally at lost with how Zope's security works - if User1 has role
 RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
 he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
 cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
 any CPM could gain access to any other CPM just by faking url.

The Zope2 security machinery explicitly prevents such abuse by
considering only containment acquisition when evaluating local roles,
acquired permission maps, etc.  It also insists that the user being
considered exist in context of the object being validated.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDPTcq+gerLs4ltQ4RAuJKAJ0Y6z6iNRMuH7AgjVvF3rOI5FTFkQCfV5SU
zV03BmP/HeQa2KHVFhhHdrA=
=JmJp
-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] how to export values from a form to SPSS or Excel format?

2005-09-30 Thread Chris Withers

Georgakopoulos Nicolas wrote:
I have a page that a client submit a questionnaire (multiply choices) 
and I want to export the values from the answers to SPSS   logistic 
format  so I can send it by mail...


No idea what SPSS is, but for excel, just do a CSV. Python has a 
moderately good csv module...


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] emergency access problems

2005-09-30 Thread Chris Withers

michael nt milne wrote:
 Anyway I've followed all the instructions in security.txt, telnetting 


stop right there... you should be using ssh...


in as
the user that made the zopeinstance and running
  python zpasswd.py access
 using SHA-1 and then entering nothing for domains ( I presumed that this
would give access for all domains etc)


correct.


 I then get an access denied message on running this and the access file is
not created.


well, maybe you could show us the error rather than not quite giving us 
enough information to be able to help you ;-)


guesses:

- your user didn't have permission to read or maybe execute python or 
zpasswd.py


- your user didn't have permissions to write to the directory where you 
were trying to create the access file.


 Yes, the access file was being created in the homeinstance.

But yet you said above it wasn't created a all?!

 One thing I
 didn't do was run the zpasswd.py file when zope was stopped though, 
as I did

 with ./zopectl

zope doesn't need to be stopped, but it does need to be restarted once 
the access file has been created...


that said, if you want zopectl to let you do things without stopping 
Zope, just get a ZEO setup up and running...


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] how to export values from a form to SPSS or Excel format?

2005-09-30 Thread Andreas Jung



--On 30. September 2005 14:21:08 +0100 Chris Withers 
[EMAIL PROTECTED] wrote:



Georgakopoulos Nicolas wrote:

I have a page that a client submit a questionnaire (multiply choices)
and I want to export the values from the answers to SPSS   logistic
format  so I can send it by mail...


No idea what SPSS is, but for excel, just do a CSV. Python has a
moderately good csv module...



Or try this:

http://sourceforge.net/projects/pyexcelerator/

-aj



pgprbZ4Bhk4ES.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] External Method Working Directory?

2005-09-30 Thread Chris Withers

jwithers wrote:

Because I need to feed the file to Mailman for evil purposes of my own
(well, fairly mundane purposes of allowing my zope app to manipulate
mailman list memberships, really) that the prototype mailman adapter I
found doesn't meet. 


When I've needed to do simple stuff with this is the past, I just 
manipulate mailmain by send email from Zope to mailman's admin interface...



And yeah, tempfile would work, although, I have to
admit I really don't see the point of it when you are only storing one
file. I am probably missing some usecase or good programming practice
here, but it seems like it saves you a single line for the delete in
return for an extra module import. 


What happens when two users do something that creates one of these temp 
files at exactly the same time? ;-)


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] Zope Debugger lets WingDbg fail to connect to client

2005-09-30 Thread Chris Withers

Hi Peter,

Frey, Peter wrote:

there seems to be an incompatibility between zdb and WingIDE.


Likely, I don't use WingIDE at all, so I can't test...

When the WingIDE Zope-Product WingDbg is installed (and working), 


Does WingDbg ship with its source code? If so, I'd be interested to see 
it to see how the two products are treading on each other...
If it doesn't perhaps you could try and persuade the WingIDE people to 
contact me?



after installing zdb
I am unable to connect from a WinDbg configuration/server to my WingIDE client


What happens? (errors messages would be great ;-)


after removing the zdb product and restarting the server, debugging with Wing 
works again.


Well, that's a good thing :-)

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] cutpaste from one mounted storage to another

2005-09-30 Thread Chris Withers

M. Krainer wrote:

Am I doing something wrong or is this simply not possibly resp. is there a
workaround to do a cutpaste between storage boundaries?


It's not reall a supported operation. I wonder if the multidatabase work 
currently being done on ZODB will help with this?


I'd ask on zodb-dev@zope.org if you can...

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: ZEO clients eating up / filesystem

2005-09-30 Thread Reinoud van Leeuwen
On Fri, Sep 30, 2005 at 09:03:29AM -0400, Tres Seaver wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Reinoud van Leeuwen wrote:
  On Fri, Sep 30, 2005 at 02:13:34PM +0200, Andreas Jung wrote:
  
  
 Perhaps your FS grows because ZEO write the cache files to /tmp (which is 
 on your root filesystem)?
  
  
  No I checked that. Nothing in /tmp (and that would have been listed by 
  lsof)
 
 Unless you make them persistent, ZEO cache files are unlinked from
 their directory immediately after creation.  Try looking at
 /proc/zope's PID/fd, and see if there aren't a couple of otherwise
 inaccessible, and *large*, files there.

Thanks. 

Setting zeo-client-name in the main section of 
zope.conf and client in the zodb_db main section seems to have solved 
this.


-- 
__
Nothing is as subjective as reality
Reinoud van Leeuwen[EMAIL PROTECTED]
http://www.xs4all.nl/~reinoud
__
___
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] how to send a mail attachment with python (ZPT) ?

2005-09-30 Thread Georgakopoulos Nicolas
I want to send values from a form by mail but I want to make this values 
a file and then send that file as an attachment.

1.How can I make the values of the form to a file (maybe text file) ?
2.If I make that file how can I send it by mail as an attachment ?

My code for simple mail message  is (mailAction.py) :

# locate the mailhost
mailhost=container['mailhost']

# email message settings
recipient='[EMAIL PROTECTED]'
sender='[EMAIL PROTECTED]
subject='This is a test mail'

# format the email message
message='this is my message body...'

# send the message
mailhost.simple_send(recipient, sender, subject, message)

# return a confirmation message
page=container['thanks.html']
return page()

___
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: Aquisition, UserFolder and security

2005-09-30 Thread Florent Guillaume

bruno modulix wrote:

Dieter, I didn't misunderstood your proposed solution. But some users
exist in different CPMs with different roles in each CPM. So - unless
I'm totally at lost with how Zope's security works - if User1 has role
RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
any CPM could gain access to any other CPM just by faking url.


As Tres mentionned, that should not be possible, as it's contrary to the 
Zope Security Policy.


Can you reproduce it within a blank CPS instance using standard CPS 
products? If yes, could you explain the steps to reproduce it, and the 
versions of CPS, CMF, Zope and python you use?


Florent

--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] LDAP Directory Manager

2005-09-30 Thread Marcos Iuato
I was looking for a ldap browser for zope/plone and I found this product 
LDAP Directory Manager but it has no releases since 2004.


Somebody know if this product is stable with the latest versions of 
zope/plone? Or there is another product to browse ldap for zope/plone?


Any help would be much appreciated!

Marcos Iuato
___
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] how to send a mail attachment with python (ZPT) ?

2005-09-30 Thread Dieter Maurer
Georgakopoulos Nicolas wrote at 2005-9-30 17:25 +0300:
I want to send values from a form by mail but I want to make this values 
a file and then send that file as an attachment.

Use Python's email package to compose the email.

-- 
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] cutpaste from one mounted storage to another

2005-09-30 Thread Dieter Maurer
M. Krainer wrote at 2005-9-30 12:10 +0200:
Is there a possibility to cutpaste from one mounted storage to another?

There is no direct possibility -- but you can emulate cutpaste
by copypastedelete.

-- 
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] Aquisition, UserFolder and security

2005-09-30 Thread Dieter Maurer
bruno modulix wrote at 2005-9-30 09:38 +0200:
 ...
Dieter, I didn't misunderstood your proposed solution. But some users
exist in different CPMs with different roles in each CPM. So - unless
I'm totally at lost with how Zope's security works - if User1 has role
RoleWithMuchPrivileges in Cpm1 and role RoleWithFewPrivileges in Cpm2,
he could gain RoleWithMuchPrivileges in Cpm2 just by using faked url
cpm1/cpm2/whatever_he_should_not_access_here. Worse, anyone existing in
any CPM could gain access to any other CPM just by faking url.

In fact, this should not be the case:

  The user comes from some user folder and gets the roles
  associated with it in that user folder.

  Due to acquistion fakes the authorizing user folder may
  not be the one adequate for the object being accessed.

  However, part of the access check is the verification
  that the object is governed by the authorizing user folder
  (this means the object must be at or below the folder
  containing the authorizing user folder). If this verification
  fails and the access was protected in the first place,
  then access will be denied.

  Thus, acquisition fakes should not be able to give a user
  higher priviledges on an object than it would get by
  a user folder which governs the object.

Summary:
  Only your Portal user folder can give CPM priviledges
  higher than the one granted by the CPM user folder.
  User folders of other CPMs cannot do this.

-- 
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] External Method Working Directory?

2005-09-30 Thread jwithers

 When I've needed to do simple stuff with this is the past, I just 
 manipulate mailmain by send email from Zope to mailman's admin interface...
 

Pipes seem easier to me. Responses from the command line scripts seem
much easier to use for confirmation. And there are things you can do
easily from the cli interface that you either can't do through email,
are difficult to do through email, or possibly I just don't know how to
do through email.

  And yeah, tempfile would work, although, I have to
  admit I really don't see the point of it when you are only storing one
  file. I am probably missing some usecase or good programming practice
  here, but it seems like it saves you a single line for the delete in
  return for an extra module import. 
 
 What happens when two users do something that creates one of these temp 
 files at exactly the same time? ;-)
 

Yah, you and Tres Seaver (OL) both made this point, and thanks for
saving me from having much wailing and gnashing of teeth over my dimness
once this actually went live.

Thanks for the help,

J.P. Withers

___
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] Problem with hasattr() and Zope 2.8.1

2005-09-30 Thread Doyon, Jean-Francois
Hello,

I'm using new-style classes and properties to implement multilingual support
in my objects. I might therefore have something like:

mything = property(__get_mything)

def __get_mything:
return self.__mything_en

(Extremely simplified!)

This works fine.

Now however I'm discovering that doing a hasattr() on anything that starts
with 2 underscores always returns false!

So hasattr(self, '__thumbnail') doesn't work as expected, but hasattr(self,
'_thumbnail') DOES! (All other things being equal of course).

I've successfully tested this by replacing this code, which didn't work as
expected:

   def __get_thumbnail(self):
if not hasattr(self, '__thumbnail'):
self.setThumbnail()
return self.__thumbnail
else:
return self.__thumbnail

With this one:

   def __get_thumbnail(self):
try:
return self.__thumbnail
except:
self.setThumbnail()
return self.__thumbnail

Which DID work as expected (Though I suspect the try ... except might be
faster anyways!) ...

I checked the Collector:

http://www.zope.org/Collectors/Zope/collector_contents?searching=yepSearcha
bleText=hasattrstatus%3Alist%3Aignore_empty=Acceptedstatus%3Alist%3Aignore
_empty=Pending

Nothing jumped out at me as being relevant ...

Any ideas?

Jean-François Doyon
Internet Service Development and Systems Support / Spécialiste de
dèveloppements internet et soutien technique
Canada Centre for Remote Sensing/Centre Canadien de télédétection
Natural Resources Canada/Ressources Naturelles Canada
http://atlas.gc.ca
Tel./Tél.: (613) 992-4902
Fax: (613) 947-2410
___
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] Plone update

2005-09-30 Thread Michael Kaplan

I'm running Plone 2.0.5 with Zope 2.7.7-final and tried to
upgrade to Plone 2.1. A dry-run of portal_migration stopped
with errors :

Products/ATContentTypes/migration/common.py, line 105, in unrestricted_rename
   action ='manage_main')
Copy Error:
HTML
HEAD
TITLEInvalid Id/TITLE
/HEAD
BODY BGCOLOR=#FF
FORM ACTION=manage_main METHOD=GET 
TABLE BORDER=0 WIDTH=100% CELLPADDING=10
TR
 TD VALIGN=TOP
 BR
 CENTERBFONT SIZE=+6 COLOR=#77003B!/FONT/B/CENTER
 /TD
 TD VALIGN=TOP
 BRBR
 CENTER
 The id de_MIGRATION_ is not allowed.
 /CENTER
 /TD
/TR
TR
 TD VALIGN=TOP
 /TD
 TD VALIGN=TOP
 CENTER
 INPUT TYPE=SUBMIT VALUE=   Ok   
 /CENTER
 /TD
/TR
/TABLE
/FORM
/BODY/HTML
...
...
The upgrade path did NOT reach current version
Migration has failed


What's wrong here? Every hint is welcome.




___
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] Plone update

2005-09-30 Thread Jens Vagelpohl


On 30 Sep 2005, at 23:49, Michael Kaplan wrote:


I'm running Plone 2.0.5 with Zope 2.7.7-final and tried to
upgrade to Plone 2.1. A dry-run of portal_migration stopped
with errors :


I believe this question will get more answers on a Plone-specific  
mailing list. See plone.org for more information.


jens

___
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] ZRS Now Available for FREE 30-day Evaluation

2005-09-30 Thread Brian Lloyd

Hi all,

We are happy to announce that Zope Corporation is now 
offering Zope Replication Services (ZRS) in a 30-day 
evaluation format!

For more information and to download the evaluation 
release, visit:

http://customers.zope.com/ZRS/


About ZRS:

Zope Replication Services (ZRS) increases the reliability 
of all Zope enterprise clusters and eliminates the storage 
system as a single point of failure. 

Sites with high availability requirements must manage 
planned and unplanned downtimes. Planned outages include 
system maintenance, software / operating system upgrades, 
and backups. Unplanned outages include hardware and network
failures. ZRS reduces the downtime associated with these 
events by replicating and distributing mission-critical 
data storage across distinct physical storages (possibly 
in distinct geographic locations).

Should a primary storage fail, a secondary storage can 
take its place. Secondary servers can be taken off-line 
at any time to undergo repairs, backups, or system 
upgrades. When a secondary returns to service, it 
automatically resynchronizes with the primary server. 

ZRS also improves scalability since secondary servers can 
optionally provide additional read-only ZEO connections 
while maintaining their replication functions. ZEO client 
storages can be configured to connect to any available 
secondary, and can be load-balanced among the available 
secondary ZRS servers to implement highly-available and 
highly-scalable Zope clusters. 

ZRS is a 'battle-tested' solution that has provided the 
high-availability and disaster recovery solution critical 
to large-scale public and internal Zope deployments for 
years. Premier brands including the VIACOM radio and 
television group, AARP, Community Newspaper Holdings 
Inc. (CNHI), and the Joint Intelligence Center, Pacific 
(JICPAC) rely on ZRS to ensure reliability and scalability 
for their mission-critical Web sites. 

The 30-day evaluation release allows organizations to 
install and operate ZRS on up to five primary ZODB servers 
and on an unlimited number of secondary servers for up to 
thirty days.

The current evaluation release (ZRS 1.4.2) is compatible 
with Zope versions 2.4 - 2.7. Full releases of ZRS
compatible with Zope 2.8.x and Zope 3.x are also available.


Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716  
Zope Corporation   http://www.zope.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 )