Re: [Zope-dev] 2.9.4? reStructuredText support?

2006-07-16 Thread Richard Jones
On Sunday 09 July 2006 22:56, Jim Fulton wrote:
> Whoever integrated reST didn't even read the documentation, much less
> the code.

FWIW.

The ZReST product was originally released by me around 2002 - before those 
directives existed. According to the docutils HISTORY file, the directives 
themselves added in 2003. The *warning* about them was added in 2004.
The configuration to *disable* them appears to have been added in 2005.

What the hell docutils was doing turning this feature on by default...


Richard
___
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] Puzzling change to guarded_getitem in Zope 2.8

2005-08-25 Thread Richard Jones
On Fri, 26 Aug 2005 10:00 am, Richard Jones wrote:
> I'm migrating our 2.7-developed Product to 2.8. The following change has me
> puzzled. In 2.7,  AccessControl.ZopeGuards guarded_getitem has the
> following code:

OK, Tres made the change, with the relevant bit of the log message being:

Iteration over sequences could in some cases fail to check access
to an object obtained from the sequence. Subsequent checks (such
as for attributes access) of such an object would still be
performed, but it should not have been possible to obtain the
object in the first place.

List and dictionary instance methods such as the get method of
dictionary objects were not security aware and could return an
object without checking access to that object. Subsequent checks
(such as for attributes access) of such an object would still be
performed, but it should not have been possible to obtain the
object in the first place.

So I presume that the change *intended* to move the onus of validation from 
the guarded_getitem method to the __getitem__ method of the container? No 
more trusted access to custom (ie. not builtin) sequence/mapping objects?


 Richard


pgp0vUWOLplhT.pgp
Description: PGP signature
___
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] Puzzling change to guarded_getitem in Zope 2.8

2005-08-25 Thread Richard Jones
I'm migrating our 2.7-developed Product to 2.8. The following change has me 
puzzled. In 2.7,  AccessControl.ZopeGuards guarded_getitem has the following 
code:

def guarded_getitem(object, index):
[ snip handling of slices ]
...
v = object[index]
if Containers(type(object)) and Containers(type(v)):
# Simple type.  Short circuit.
return v
if getSecurityManager().validate(object, object, index, v):
return v
raise Unauthorized, 'unauthorized access to element %s' % `i`

note the use of "index" in the validate call. In 2.8, this appears as:

def guarded_getitem(object, index):
[ snip handling of slices ]
...
v = object[index]
if Containers(type(object)) and Containers(type(v)):
# Simple type.  Short circuit.
return v
if getSecurityManager().validate(object, object, None, v):
return v
raise Unauthorized, 'unauthorized access to element %s' % `i`

where "index" has become "None". This would appear to imply that we can't 
perform access controls on a per-item basis in sequences or mappings, unless 
we do so in the actual __getitem__ method, which implies there's no such 
thing as trusted code. We have an access policy implementation of:

def _checkAccess(self, name, value):
if name.startswith('CG'):
return 1
if self.isValidAggregateName(name):
return 1
return 0
security.setDefaultAccess(_checkAccess)

which obviously doesn't work any more, since "name" is never a item name, it's 
always None.


Richard


pgpj6UDo2aBsA.pgp
Description: PGP signature
___
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] I want Zope 2.9 to use Zope 3's security architecture.

2005-04-06 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, 7 Apr 2005 02:49 am, Jim Fulton wrote:
> Paul Winkler wrote:
> > i.e. will I still write:
> >
> > security.declareProtected(SomePermission, 'foo')
> > def foo(self):
> > ...
>
> That will work, and I don't see a need to deprecate it.
> Eventually, though, I expect products to migrate to
> ZCML-based security declarations.

Is this a general trend for Zope 2? I'd rather see Zope 2 kinda avoid ZCML if 
possible. It's just one of those personal preference things, I suppose, but I 
know I'm not the only one who isn't that enamored of the ZCML approach. I 
actually like having the declarations all in the python code like it is in 
Zope 2.

I'd like to see the declarative style that Zope 2 move to using decorators. I 
was sitting in a presentation at PyCon talking about MetaClasses, and I 
finally *got* them. I realised that the security declarations in Zope 2 are a 
perfect fit for metaclasses and decorators. If only I had the time to 
actually implement this dream ;)

Note that this all comes from the perspective of someone whose only exposure 
to Zope 3 has been through two sprints. I've not actually tried to develop 
any sort of application using it. My day job is very firmly fixed in Zope 2, 
and isn't likely to change for a long time. So I'm definitely speaking from 
ignorance of real-world application development in Zope 3.


 Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCVIIirGisBEHG6TARAowSAKCGSgaIkZeLJfg1NFlnzKdhOZDa3QCePu30
f5MPM1sUwbBEVykehbyNH7o=
=v736
-END PGP SIGNATURE-
___
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] More on [Removal of aq_acquire from guarded_getattr]

2005-02-06 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 7 Feb 2005 05:26 pm, Richard Jones wrote:
> That is, there's no acquisition context on the simple string. To "fix" the
> problem, I changed secure_url to be a ComputedAttribute which looked up the
> instance attribute _secure_url. This then gave the value a valid
> acquisition chain and everything "works" now.

Please ignore this message. Everything does *not* work. I am at a loss as to 
why it worked *briefly*. Must've just been some other artifact introduced 
during the hours of messing with the code. Back to the code-mine.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCBwrgrGisBEHG6TARAn57AJ9wnws/1GxZ7iMWUlqeWI8/8YNi9QCghqu9
pWtsieWTzWArDN1jZuam1L8=
=BwJH
-END PGP SIGNATURE-
___
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] More on [Removal of aq_acquire from guarded_getattr]

2005-02-06 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 25 Jan 2005 10:30 am, Stefan H. Holek wrote:
>- declaring object security on the acquiree via
> declareObjectProtected(foo)

For me, the problem arises when the acquiree is a Python builtin object - a 
string instance attribute in my case. Hence I can't make any useful statement 
like the above. I have a statement::

   security.setDefaultAccess({'secure_url': 1})

on the class, but with the change discussed here, that assertion is never 
looked up. I attempted to::

   security.declarePublic('secure_url') 

but of course that didn't change anything, as I mentioned the class assertions 
weren't being looked at.

After poking around some more, I realised that validate() 
(VerboseSecurityPolicy's) was being invoked with::

   aq_chain(container) = [
 ,
 ,
 ,
 ,
 ,
 ,
 ]

   context = 

   aq_chain(value) = ['http://secure.cgpublisher.localhost']

That is, there's no acquisition context on the simple string. To "fix" the 
problem, I changed secure_url to be a ComputedAttribute which looked up the 
instance attribute _secure_url. This then gave the value a valid acquisition 
chain and everything "works" now.

I'm really sorry I can't be more helpful and produce a useful test case, but 
I've a bazillion deadlines falling on the floor. Maybe in a few months. For 
now I just needed a work-around that will let me run in an un-patched Zope.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCBwoerGisBEHG6TARAqRIAJwOOCtEccg2RqsjqjzlTLkEVfvn2gCeMYRw
qwFvrTuk5xxhYi0pAU+UcUo=
=SOlC
-END PGP SIGNATURE-
___
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] SOAP Support for ZOPE

2004-12-14 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 15 Dec 2004 06:54 am, Aruna Kathiria wrote:
> I did some work regarding SOAP support on ZOPE and published this
> document on zope.org.

Is there really no interest in getting SOAP support into the Zope core?

I've got a guy working on some Microsoft Word stuff at the moment, and he was 
dumbfounded when he discovered that Zope doesn't support SOAP. In his words, 
"everyone supports SOAP". Sigh :)

Are there any objections to getting Aruna's patches into the 2.8 codebase? I'd 
be willing to do the work - but note I know practically nothing about SOAP - 
I just want to be able to use it.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBv2oRrGisBEHG6TARAgCuAJ0fVQoVsme1ShzPYT3rpw6mE6etXgCfb6Uf
sp8baNmBJP1rV7yF/CfikMQ=
=olB3
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: Was: Re: 2.7.3 beta attribute permission problems

2004-10-24 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, 23 Oct 2004 10:29 pm, Stefan H. Holek wrote:
> On 22.10.2004, at 14:38, Tres Seaver wrote:
> > Given that the change was required to implement a security fix, and
> > without a reproducible test case for the reported breakage, I don't
> > think we can credit the rumors.  We *definitely* don't want to defer
> > the security fix.
>
> I still don't know what the security fix actually fixes, but that may
> well be my ignorance ;-). Your checkin message just mentions the
> removal of DWIMy code...

Actually, this is a point I wanted to make a long time ago. I believe there 
would have been less confusion all around (and some still lingers) if there 
had have been more information in the checkin message than "DWIMy code". DWIM 
only really has meaning to certain sets of "I".


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD4DBQFBfCFgrGisBEHG6TARAkyNAJ43FD5zX6JLNfCsrEJ48jn3eKfyTwCY+HVT
FzEaLBC9VAJHUDrC+Se/yw==
=Oehq
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: Was: Re: 2.7.3 beta attribute permission problems

2004-10-23 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, 24 Oct 2004 08:03 am, Tres Seaver wrote:
> Richard Jones reported an issue with the patch, but couldn't give us a
> simple case.  Users who *have* such weird applications can reverse the
> patch, find workarounds, or whatever, until they can help us isolate the
> bug.

I find this to be totally acceptable, BTW.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBew74rGisBEHG6TARApyMAJ0W0dWgYvxcFUV6A9ovkFZb1y3ckACaAmL+
at+laIWFFCbxI+DycJdYQkw=
=jdDA
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] session error

2004-10-19 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 20 Oct 2004 04:23 am, Gerry Kirk wrote:
> A user got this error trying to edit content. It only happened once, and
> on second try she was ok. Using Zope 2.7.0:

2.7.3 (currently beta, but live on our production server) fixes errors of this 
sort.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBdcksrGisBEHG6TARAvDvAJ4oHmYvLcZG+ltfW7+CIyemzVHimACfc3lP
0g5TiJFRGSB5LFEn2qK27hM=
=KedN
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7.3 beta attribute permission problems

2004-10-18 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 19/10/2004, at 4:33 PM, Santi Camps wrote:
Yes, meta_type is an attribute of type string, but I don't understand 
your reasons.   Acquisition, obviously, is not implemented in strings, 
but if the object containing meta_type attribute inherits from 
Acquisition.Implicit it should work.  In fact, it works for Zope 2.7.0 
to 2.7.2.   The problem appears in Zope 2.7.3, and I think that the 
problem is the change I mentioned in AccessControl/cAccessControl.c 
and AccessControl/ImplPython.py. I suppose this change is for some 
reasonable reason, but if it breaks security validations throught 
implicit acqusition I think the change should be considered.
AFAIK Tres is working on this. I was unable to produce a simple example 
case, but more recently Stefan Holek (I think) was. The last I saw was 
Tres saying "Aargh!" on the 13th, then on the 14th saying he's unable 
to produce good test cases.

And that's the problem. Tres' patch removed "DWIM" code. I'm not sure 
what that meant (I know what DWIM stands for ;) ... and I'm unable to 
state exactly (in a test case) what it is that my code does that 
invokes the DWIM'y code.

Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBdLffrGisBEHG6TARAlEZAJ46betsryQklXpFxPFK1EuxozGZxwCghtGG
+XdZTjWsgdahMh6qqGrwPL4=
=v/LZ
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-22 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 22 Sep 2004 11:14 pm, Chris McDonough wrote:
> Alright, well, in the meantime, I think we're going to release the beta
> with the aq_acquire DWIM removed and if it causes other folks problems
> we'll be able to tell from folks using the beta

Yep, fair enough.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBUffArGisBEHG6TARAni2AJ91sSfjNfzMQcEoG4U6zeiAc7GJ9wCeMzY4
10Ol8uSnIojUvCWbl4c9Mqg=
=cWQn
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-22 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 22 Sep 2004 12:40 am, Chris McDonough wrote:
> Would you be able to write a short test case that demonstrates the
> failure mode that you're seeing in your existing code?  It would be nice
> to understand the failure before blindly reenabling the old behavior
> because it really is DWIM.

Yes, and I have to try to produce a test case that shows up the 
ComputedAttribute issues I've been having too. I'm flat out at work (now that 
I'm no longer spending most of my time fixing ZODB corruptions and their 
fallout, I have a huge backlog of work to catch up on ;)


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBUVJorGisBEHG6TARAkPXAJ9ZPiTqzqwWT9ziPsobk0PzMm1eRACbB6ah
gHxjiD/alPSmQiTzENXJCeA=
=Ly80
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-20 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 15/09/2004, at 1:00 PM, Chris McDonough wrote:
I'd just stick the code back in there for now and we'll see what Tres
says.
No word from Tres, 2.7 branch release coming up...
Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBT34orGisBEHG6TARAsnUAJ9AFw/zOZ5gpXJIKNR837OcGiv62ACfRzXU
+4k+jkEV0WFzU7RuiMXnScE=
=mH5+
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-14 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 15 Sep 2004 01:00 pm, Chris McDonough wrote:
> I'd just stick the code back in there for now and we'll see what Tres
> says.

This is what I've done to speed up my testing, rather than fixing all the 
places stuff is broken. I'll be testing for the rest of today, and if all 
goes well I'll get the 2.7 branch installed tomorrow.

Thanks for all your help and support, Chris!


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBR7vhrGisBEHG6TARAi59AKCAXYGiOWm5vVek8YJrWeKls0UhdACfXGFq
D3QaJdBpgpNAx7WYLpleiOA=
=I274
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-14 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 15 Sep 2004 12:36 pm, Chris McDonough wrote:
> > Yep, that's the situation. It appears to look for the security assertions
> > for "secure_url" on A instead of B. Note that "secure_url" is an
> > attribute of B.
>
> Yup.  IOW, it looks like it used to find the first "secure_url" it could
> access and return that, even if there were other acquirable "secure_url"
> attrs before that one in the acquisition path.  I'm sure the fact that
> it ignores any intermediate (but inaccessible) "secure_url" attrs is
> what Tres meant by DWIM.

I *think* you're implying that there might be more than one secure_url 
attribute in the acquisition path? If so, that's not the case. There is only 
one, and it's on B.

Or perhaps what you're saying is that in the pre-patch days, if there *was* an 
attribute on A, then validate() would do the Wrong Thing, or something 
otherwise bad would happen.

I'm a little confused about why I'm the only person seeing this, BTW...


> But I'm not sure that he intended for the patch to have this effect.
> I'm not even sure why it does have this effect; the "validate" function
> is just too byzantine to understand without taking it through the
> debugger.

You can say that again. My head hurts every time I need to look into 
validate() and friends ;)


 Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBR63CrGisBEHG6TARAs2WAJwK2fKlW5KQvPj/LGDT2sGY93q46gCdFRN0
ZsQlTMxX/PHuRN4XZ9Uxq9I=
=2gJy
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-14 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, 15 Sep 2004 12:15 pm, Chris McDonough wrote:
> On Tue, 2004-09-14 at 21:18, Richard Jones wrote:
> > On the "proposals" object though, we don't have any delaration for the
> > "secure_url" attribute. If I add one, or a general
> > security.setDefaultAccess("allow"), then the error goes away. This
> > doesn't seem correct to me.
>
> It sure doesn't sound right.  Just to be pedantic:  You have an object A
> that has no security assertion for "secure_url".  You have an object "B"
> that does.  When you access the aq context a.__of__(b) and ask it for
> "secure_url" in restricted code, it refuses access.  Is that a
> reasonable characterization or am I reading it wrong?

Yep, that's the situation. It appears to look for the security assertions for 
"secure_url" on A instead of B. Note that "secure_url" is an attribute of B.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBR6aJrGisBEHG6TARAgw+AJsFrHNQ7cSs+d4baUjcp6WMznJ83wCfXtVi
anfvnB2Gi2xUwQWLVTfoAUk=
=BHr1
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] 2.7 branch: attribute permission problems

2004-09-14 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[might dupe - sent the first copy of this from the wrong address, sorry!]

I've just upgraded to use the bleeding-edge 2-7 branch (from 2.7.2, running in
py 2.3.3) and I've started getting permission problems with attributes. The
cause appears to be acquired attributes. With VerboseSecurity installed
(note: behaviour not dependent on VS - I checked), I get told:

 Error Type: Unauthorized
 Error Value: The container has no security assertions. Access to 'secure_url'
   of (CG Conference Proposals proposals at 0x41387b40) denied.

The "secure_url" attribute is defined at a much higher object, where we have a
declaration including:

security.setDefaultAccess({'secure_url': 1})

On the "proposals" object though, we don't have any delaration for the
"secure_url" attribute. If I add one, or a general
security.setDefaultAccess("allow"), then the error goes away. This doesn't
seem correct to me.

The relevant change in CVS appears to be:

*** ../../../../Zope-2.7.2/lib/python/AccessControl/ImplPython.py 2004-02-10
17:46:02.0 +1100
- --- AccessControl/ImplPython.py 2004-09-15 09:59:41.617423171 +1000
***
*** 551,560 
  return v

  validate = SecurityManagement.getSecurityManager().validate
- - # Filter out the objects we can't access.
- - if hasattr(inst, 'aq_acquire'):
- - return inst.aq_acquire(name, aq_validate, validate)
- - # Or just try to get the attribute directly.
  if validate(inst, inst, name, v):
  return v
  raise Unauthorized, name
- --- 551,556 

The change note being "- Removed DWIM'y attempt to filter
acquired-but-not-aceessible results from 'guarded_getattr'." and I'm not sure
what that means :)


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBR5hnrGisBEHG6TARAuucAJ42D8pU6kuPQ+mBwadqJq8uQbG12gCggN2u
AzBBhs5eCekTdl6bYtyBrCk=
=aUXn
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] More POSKeyErrors than I know what to do with

2004-08-03 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Our 2.7.1-based production server has started throwing up a lot of 
POSKeyErrors recently. Forcing regeneration of the Data.fs.index didn't fix 
it. Packing didn't fix it or generate any new errors - we haven't packed the 
database since it went live. fsrecover.py doesn't do anything. Running 
fsrefs.py on the Data.fs gives *scary* long output (attached both unpacked 
and packed ouput). I haven't been able to get checkbtrees.py to produce any 
useful output (it doesn't appear to want to poke into the Application). I'm 
not sure it'll tell me any more than fsrefs.py though.

- From my reading of the fsrefs.py output, it looks like the corruption is the 
result of a single transaction.

I'm more than happy to look into this further, and also to supply the Data.fs 
(200Mb unpacked, 20Mb packed) to help analyse it.


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBEDKUrGisBEHG6TARAo4cAJ9xuXtYf95uJf/oj+95CfdFJ9qNTgCfaRT7
xETqjHTNProIG6n1Yr1vjp8=
=moPK
-END PGP SIGNATURE-


oid 0xCB7BL BTrees.OOBTree.OOBTree
last updated: 2004-08-03 15:00:37.447816, tid=0x356E7649FC70044L
refers to invalid objects:
oid 0x12442L missing: 'Products.CGPublisher.messages.Messages.Message'
oid 0x12464L missing: 'Products.CGPublisher.messages.Messages.Message'
oid 0x12472L missing: 'Products.CGPublisher.messages.Messages.Message'

oid 0xDE49L BTrees.OOBTree.OOBTree
last updated: 2004-08-03 15:00:37.447816, tid=0x356E7649FC70044L
refers to invalid objects:
oid 0x1245BL missing: 
'Products.CGPublisher.publisher.conference.Proposal.Proposal'
oid 0x1246DL missing: 
'Products.CGPublisher.publisher.conference.Proposal.Proposal'
oid 0x1243DL missing: 
'Products.CGPublisher.publisher.conference.Proposal.Proposal'

oid 0x11729L BTrees.OOBTree.OOBucket
last updated: 2004-08-03 15:00:37.447816, tid=0x356E7649FC70044L
refers to invalid object:
oid 0x11D10L missing: 'BTrees.IIBTree.IITreeSet'

oid 0x12446L BTrees.IOBTree.IOBucket
last updated: 2004-08-03 15:00:37.447816, tid=0x356E7649FC70044L
refers to invalid objects:
oid 0x12447L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12448L missing: 'BTrees.OOBTree.OOBTree'

oid 0x124BAL BTrees.IOBTree.IOBucket
last updated: 2004-08-03 15:00:37.447816, tid=0x356E7649FC70044L
refers to invalid objects:
oid 0x12449L missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244AL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244BL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244CL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244DL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244EL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1244FL missing: 'BTrees.OOBTree.OOBTree'
oid 0x12450L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12451L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12452L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12453L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12454L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12455L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12476L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12477L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12478L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12479L missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247AL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247BL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247CL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247DL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247EL missing: 'BTrees.OOBTree.OOBTree'
oid 0x1247FL missing: 'BTrees.OOBTree.OOBTree'
oid 0x12480L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12481L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12482L missing: 'BTrees.OOBTree.OOBTree'
oid 0x12483L missing: 'BTrees.OOBTree.OOBTree'
oid 0x8255L failed to load
oid 0x8256L failed to load
oid 0x8257L failed to load
oid 0x8258L failed to load
oid 0x8259L failed to load
oid 0x825AL failed to load
oid 0x825BL failed to load
oid 0x825CL failed to load
oid 0x825DL failed to load
oid 0x825EL failed to load
oid 0x825FL failed to load
oid 0x8260L failed to load
oid 0x8261L failed to load
oid 0x8262L failed to load
oid 0x8263L failed to load
oid 0x8264L failed to load
oid 0x8265L failed to load
oid 0x8266L failed to load
oid 0x8267L failed to load
oid 0x8268L failed to load
oid 0x8269L failed to load
oid 0x826AL failed to load
oid 0x826BL failed to load
oid 0x826CL failed to load
oid 0x826DL failed to load
oid 0x826EL failed to load
oid 0x826FL failed to load
oid 0x8270L failed to load
oid 0x8271L failed to load
oid 0x8272L failed to load
oid 0x8273L failed to load
oid 0x8274L failed to load
oid 0x8275L failed to load
oid 0x8276L failed to load
oid 0x8277L failed to load
oid 0x8278L failed to load
oid 0x8279L failed to load
oid 0x827AL failed to load
oid 0x827BL failed to load
oid 0x827CL failed to load
oid 0x827DL failed to load
oid 0

Re: [Zope-dev] [Zope Enhancement Proposal] Sanitizing local roles

2004-07-22 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, 23 Jul 2004 03:30 am, Dieter Maurer wrote:
> Moreover, I propose to change the local role management pages.
> When setting local roles, information about "acquired"
> local role definitions is very helpful.
> I therefore propose to display this information on the local
> role edit page.

I have implemented a "security information" page that details this and more
info. I've always found the default security edit pages to be less than
useful since they inherently use acquisition, but don't tell you what would
be or is currently acquired.

The code is attached. We mix it in with every object. A sample output is also
attached.

I have found it invaluable when debugging permissions problems.

Would this be a useful thing to add to 2.8?


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBAKsMrGisBEHG6TARAiwuAJ9n7wLGWzhDa7kGyr/5q8zwi3SV0QCfXX1f
JAcHE9s71y9N/4oyNgRiRg4=
=ATJ2
-END PGP SIGNATURE-


ManageViewAccess.py
Description: application/python



Access permissions dump



Valid Roles:

User Defined Roles:

Local Roles:



At ObjectLocal Roles Defined




'.join(['%s: %s'%(i[0], ', '.join(i[1])) for i in 
_['sequence-item']])">





Permission Usage:



PermissionAssigned To


&dtml-sequence-key;

&dtml-perm; from &dtml-from;





Permission Settings:



PermissionHas Roles Assigned




'.join([', '.join(d['roles']) + ' from %(from)s'%d for d in 
_['sequence-item']])">








Title: CGPublisher




  



   
  › Zope › CGPublisher › publishers › 1 (Jane's Books) › products › 2 (Jane's test book 2) › details
 
 




  



  





 Jane's Books

 
 
  
  Works
  About
  Security
  Messages
  People
  Products
  Orders
  Work Templates
  Web Space
 
 




   
 
  


  
  
  Product Information 
  ·
  
  Availability 
  ·
  
  Subject 
  ·
  
  Book Information 
  ·
  
  Cover Images 
  
  
  



Access permissions dump



Valid Roles:
Actioner, Anonymous, Authenticated, Contributor, Creator, Manager, Owner, Publisher, System RPC, Visitor
User Defined Roles:

Local Roles:



At ObjectLocal Roles Defined

details




2




products

admin: Owner


1

2: Publisher


publishers

admin: Owner


CGPublisher

admin: Owner









Permission Usage:



PermissionAssigned To

DELETE

Delete objects from webdav.Resource.Resource


HEAD

View from webdav.Resource.Resource


LOCK

WebDAV Lock items from webdav.Resource.Resource


PROPFIND

WebDAV access from webdav.Resource.Resource


PROPPATCH

Manage properties from webdav.Resource.Resource


UNLOCK

WebDAV Unlock items from webdav.Resource.Resource


ac_inherited_permissions

Change permissions from AccessControl.Role.RoleManager


acquiredRolesAreUsedBy

Change permissions from AccessControl.Role.RoleManager


addStorageData

Manage properties from Products.CGPublisher.storage.Storage.Storage


addStorageDataForm

Manage properties from Products.CGPublisher.storage.Storage.Storage


asCGXML

View public storage metadata from Products.CGPublisher.storage.Storage.Storage


countRepetitions

Access contents information from Products.CGPublisher.storage.Storage.Storage


dummy_public

View public storage metadata from Products.CGPublisher.storage.Storage.Storage


dummy_shared

View shared storage metadata from Products.CGPublisher.storage.Storage.Storage


dump

View private storage metadata from Products.CGPublisher.storage.Storage.Storage


editPane

View from Products.CGPublisher.storage.Storage.Storage


editPaneHelper

View from Products.CGPublisher.storage.Storage.Storage


genericSchemaForm

View from Products.CGPublisher.storage.Storage.Storage


getAttribute

Access contents information from OFS.ZDOM.Element


getAttributeNode

Access contents information from OFS.ZDOM.Element


getAttributes

Access contents information from OFS.ZDOM.Node


getChildNodes

Access contents information from OFS.ZDOM.Node


getElementsByTagName

Access contents information from OFS.ZDOM.Element


getFirstChild

Access contents information from OFS.ZDOM.Node


getLastChild

Access contents information from OFS.ZDOM.Node


getNextSibling

Access contents information from OFS.ZDOM.Node


getNodeName

Access contents information from OFS.ZDOM.Node


getNodeValue

Access contents information from OFS.ZDOM.Node


getOntology

Access contents information from Products.Ontology.UsesOntology.UsesOntology


getOntologyRealm

Access contents information from Products.Ontology.UsesOntology.UsesOntology


getOwnerDocument

Access contents information from OFS.ZDOM.Node


getParentNode

Access contents information from OFS.ZDOM.Node


getPreviousSibling

Access contents information from OFS.ZDOM.Node


getSchemasForPaneSelect

View from Products.CGPublisher.storage

Re: [Zope-dev] How should an ideal Zope IDE look like?

2004-04-24 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Saturday 24 Apr 2004 09:13, Andre Meyer wrote:
> - Commenting/uncommenting code (any hope Python will ever offer
> multi-line comments?).

'''
this_code_is_commented_out()
so_is_this()
'''


> Well, there is certainly more, but this is a start... ;-)

That's quite a list.


> One could start from Eclipse/PyDev (http://pydev.sourceforge.net/) and
> add features.

Or start with IDLE which already has a lot of Python support (duh :)


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAic9HrGisBEHG6TARAtP8AJ41V8zaDAJx8L/RpJ84ziJM8UWg/ACcD16z
nboFegABcSSSE8nbt0Lj9bc=
=6e86
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: ZPT for CSS, anyone?

2004-04-02 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 02 Apr 2004 18:44, Chris Withers wrote:
> Ah, okay, I think building something purely for CSS would REALLY suck.
>
> Something which could generically build SQL, CSS, Emails I would be less
> lielyl to vomit about...
>
>[snip] 
>
> So persuade the Python guys to make string interpolation as powerful as you
> need it to be ;-)

Why don't we have a good, long look at:

  http://www.python.org/cgi-bin/moinmoin/WebProgramming

under the "Templating Systems" heading and make sure that someone else hasn't 
already come up with a good system that templates SQL, CSS, email, etc 
nicely.

There's an awful lot of templating systems there...


Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbTr0rGisBEHG6TARApGiAJ4z7ZTRh/hsg87UnUP1yaoePpil0ACfTtrH
tAkw1jDdFJfaE9sjkI5Ri5I=
=0Ked
-END PGP SIGNATURE-

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: Zope 2.7 and objects turning into None

2004-02-22 Thread Richard Jones
On Saturday 21 February 2004 06:04, Casey Duncan wrote:
> This is indeed possible. getObject swallows all errors and returns None
> when one occurs. This would make it return None on busy systems if the
> traversal during getObject raised a read ConflictError.

This would indeed result in the behaviour I was seeing.


> I consider this a bug and I will look into what the *real* desired
> semantics are. I've been bitten myself by this in applications which
> naively assumed getObject would always return a Zope object.

You say "naively", I say "rightly". I could be wrong though :)


> For Zope 2.8 it might be reasonable to consider also making the case
> where accessing objects that have been removed without uncataloging is
> also an exception.

I think this is a good policy.


 Richard


pgp0.pgp
Description: signature
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Zope 2.7 and objects turning into None

2004-02-19 Thread Richard Jones
On Friday 20 February 2004 05:52, Dieter Maurer wrote:
> We have a report for Zope 2.7 about an object magically turning
> into "None" (1 or 2 weeks ago).

Sorry, I haven't been following this thread, but I will note that I've seen 
(repeatably) in my test Zope environment this behaviour.

This is probably unrelated though...

For me, the situation comes about when I am loading up my fresh (ie. clean 
ZODB) test Zope with a thousand users. While the load script is running (it 
runs on the command-line and goes TTW using urllib to register the users) if 
I access a page which summarises all users, I *sometimes* get None for some 
of the users. The page uses a Catalog to find basic user info, and sometimes 
uses getObject() to find the real user object. The getObject() appears to 
return None sometimes.

Once the load is complete, I don't see any errors. So I blame some mechanism 
failing under load. I also often see ReadConflictErrors, but I understand 
they're going away soon :)


 Richard


pgp0.pgp
Description: signature
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] How to make Zope fail nicely under high load?

2004-02-11 Thread Richard Jones
On Thursday 12 February 2004 01:23, Casey Duncan wrote:
> What kinds of requests are these? Do they all require a dynamic output?
> If not, then you should put better caching in front of Zope, or at a
> minimum tweak you caching headers so that some could be served as 304s
> for instance.
>
> If they are all dynamic, how dynamic? How different is the page for one
> session than another? If much of the page is the same then you might
> benefit from an ESI approach where you cache parts of pages and assemble
> them in the cache, serving only small pieces from Zope.
>
> I'm a bit surprised that you have not (from what I can see), used the
> most common Zope speedup (and often the cheapest overall): Buy more
> hardware and use ZEO.

I was going to suggest these things too. And a bunch of other stuff. A while 
ago, I wrote a page about making Zope go faster - it might help.

  http://zope.org/Members/richard/docs/zope_optimisation.html


 Richard


pgp0.pgp
Description: signature
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Very fast requests beating ZODB commits...

2003-10-14 Thread Richard Jones
On Tue, 14 Oct 2003 02:25 pm, Richard Jones wrote:
> 1. request comes in which modifies ZODB
> 2. code handling request replies with REQUEST.RESPONSE.redirect()
> 3. redirected page uses data input at step 1 (specifically, it's auth info)
>but that info hasn't been committed yet, so we get errors

Ehem. Operator error (confusion) ... nothing to see, move along.


   Richard


pgp0.pgp
Description: signature
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Very fast requests beating ZODB commits...

2003-10-13 Thread Richard Jones
I'm seeing the following behaviour in Zope2.7b2 (python 2.3.2) on a relatively 
fast computer (Athlon 1.8GHz):

1. request comes in which modifies ZODB
2. code handling request replies with REQUEST.RESPONSE.redirect()
3. redirected page uses data input at step 1 (specifically, it's auth info)
   but that info hasn't been committed yet, so we get errors

So I've modified the method at step #1 to get_transaction().commit() before 
doing the redirect(), but I'm usually a little concerned when I have to 
invoke the transaction machinery directly like this...

Any thoughts? Is there some way to hold the redirect off until after the 
transaction is committed normally?


Richard


pgp0.pgp
Description: signature
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Re: TALES idea: tuple unpacking

2003-07-29 Thread Richard Jones
On Wed, 30 Jul 2003 06:16 am, Evan Simpson wrote:
> OK, I've checked in a sample implementation on "evan-pathprefix-branch".
>   It allows for registering prefixes with:

This seems very nice. I'm not likely to actually have a chance to play with it 
any time soon though, so I can't really comment on how it works in 
practise...


   Richard


pgp0.pgp
Description: signature


[Zope-dev] TALES idea: tuple unpacking

2003-07-22 Thread Richard Jones
During the Melbourne Zope3 Sprint, someone ran up against a situation where 
they'd have liked to have TALES perform a tuple unpacking like Python can. 
I've just run into a similar situation :)

Say a method listFilesByUser returns a list of (user, [files]) it'd be nice to 
be able to::

   tal:repeat="user,files here/listFilesByUser"

or similar. Currently we would have to use a python: expression to manually 
unpack the tuple. Kinda yucky.

Any comments?


   Richard


pgp0.pgp
Description: signature


Re: [Zope-dev] More on the getId issue...

2003-07-04 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Saturday, July 5, 2003, at 04:50  AM, Dieter Maurer wrote:
Richard Jones wrote at 2003-7-1 12:03 +1000:
...
PageTemplateFile (via Script and SimpleItem) inherits Item. This class
has an attribute "id" set to '' by default. PageTemplateFiles don't 
use
"id" though, they use __name__. The getId implementation that
PageTemplateFiles use has some mention of __name__ in it, but it'll
never get used because:

 id = ''
 def getId(self):
 name=getattr(self, 'id', None)
 if callable(name):
 return name()
 if name is not None:
 return name
 if hasattr(self, '__name__'):
 return self.__name__
 raise AttributeError, 'This object has no id'
This is funny code indeed...

   Obviously, the code starting with line 4 in the function
   can only be executed by hackers.
Please file a bug report.
Or I could just fix it with the modified version I posted :)

   Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE/BiGSrGisBEHG6TARAqEbAJ405Vv/bmCRwRygT1pOAv0CxsEd3gCfZGc6
WQOJT0xo3TElzmeU1gRLLkk=
=eYtw
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] More on the getId issue...

2003-06-30 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
In my last email, I said "Also, is there a reason why Item_w__name__ 
doesn't define getId() when it does define _setId()?" This question 
doesn't really capture the essence of the problem. In a nutshell, the 
following happened...

PageTemplateFile (via Script and SimpleItem) inherits Item. This class 
has an attribute "id" set to '' by default. PageTemplateFiles don't use 
"id" though, they use __name__. The getId implementation that 
PageTemplateFiles use has some mention of __name__ in it, but it'll 
never get used because:

id = ''
def getId(self):
name=getattr(self, 'id', None)
if callable(name):
return name()
if name is not None:
return name
if hasattr(self, '__name__'):
return self.__name__
raise AttributeError, 'This object has no id'
Note the default value of "None" in the getattr at the start, and then 
the test for None later on. Oh, hang on, except we've got a *class* 
level default value for "id" of ''. Ehem. I suspect that the "if name 
is not None" test *should* read
"if name". And there doesn't need to be the default value for the 
getattr.

I have no idea how much code that assumes that objects will at least 
have an id of '' will break.

My proposed new getId() method:

def getId(self):
name = self.id
if callable(name):
return name()
if name:
return name
if hasattr(self, '__name__'):
return self.__name__
raise AttributeError, 'This object has no id'
Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE/AOvurGisBEHG6TARAsXQAJsGEri4RIIWpjrSTbjQUZKU37hfLgCfVZTp
jax496YYNjtVosNZHpv8VGc=
=lzBT
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] PageTemplateFiles considered anonymous?

2003-06-30 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
PageTemplateFiles don't have an "id" attribute set when they're created 
- - they have a __name__ instead. This causes functions like 
getPhysicalPath (and the related absolute_url) to break in fun ways :)

The SimpleItem.Item_w__name__ mixin was created for pretty much this 
situation. Any objections to adding that mixin to PageTemplateFile by 
default instead of the vanilla SimpleItem.Item?

Also, is there a reason why Item_w__name__ doesn't define getId() when 
it does define _setId()?

Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE/AOgYrGisBEHG6TARAi6NAJ9MUwVfWo4p0tCRQd2TviUHGGV7xACfW+Vq
dewj4ut3nC7HXx3hp83A2HQ=
=chPE
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: FHS, zopectl, #925, Re: [Zope-dev] 2.7 installation

2003-06-20 Thread Richard Jones
On Friday 20 June 2003 04:57 pm, PieterB wrote:
> > On Friday 20 June 2003 01:19 am, Jean Jordaan wrote:
> > > There's only one possible way! A-A-P! (A good match for Ape, Shane ;)
> > > It's a replacement for make by Bram Moolenaar, the author of Vim, and
> > > it looks like it does a lot of things Right.
> >
> > Sorry, I haven't really been paying attention so this might be completely
> > OT. It *sounds* like it's being suggested that we replace "make" (given
> > the above statement). Has anyone used SCons? http://www.scons.org/
> > Richard
>
> I think the default Zope install should not have dependencies other
> than that Python is required and the user has some shell system
> (bash/sh/MS batchfiles).

... and aap apparently ;)


> About Scons: I never heard of it before

It's been around for quite a while. It's based on the winning design for 
software construction tools (ie. "make" replacement) in the Software 
Carpentry contest (the website of which has vanished from the web now so 
you'll have to rely on the info at scons.org). It's certainly been around for 
longer than aap :)


> but it's not suitable for my
> task. I want to create something that can easily interact with FreeBSD
> ports

Fair enough - as I mentioned, I haven't been paying close attention to the 
thread. My virtual ears pricked up when mention was made of replacing "make" 
;)


> , and is more stable than 0.14 alpha

I note with a grin that up until this month aap was at release 0.150 :)



Richard


pgp0.pgp
Description: signature


Re: FHS, zopectl, #925, Re: [Zope-dev] 2.7 installation

2003-06-19 Thread Richard Jones
On Friday 20 June 2003 01:19 am, Jean Jordaan wrote:
> There's only one possible way! A-A-P! (A good match for Ape, Shane ;)
> It's a replacement for make by Bram Moolenaar, the author of Vim, and
> it looks like it does a lot of things Right.

Sorry, I haven't really been paying attention so this might be completely OT. 
It *sounds* like it's being suggested that we replace "make" (given the above 
statement). Has anyone used SCons? http://www.scons.org/



Richard


pgp0.pgp
Description: signature


Re: [Zope-dev] Re: DBtab and BDBStorage

2003-06-06 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Friday, June 6, 2003, at 06:17 AM, Shane Hathaway wrote:
- Use ZEO.  It makes starting/stopping Zope much faster and isolates 
the application from the database.
I've noticed that this pattern doesn't hold with Zope 2.7 as it 
currently stands. Even on a powerful machine the ZEO clients can take 
quite some time to start up. Does anyone know why this might be? I'm 
talking here about a brand-new ZEO server with practically empty ZODB. 
No additional Products.

   Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+38vorGisBEHG6TARAiG5AJ0XBcUZkMnOX/4ECk/JChEu1NUhZgCeLs+a
kvn9GuVvOswbWOplJr04WIc=
=xlTW
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] ZEO install/runtime issues

2003-05-29 Thread Richard Jones
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Wednesday, May 28, 2003, at 04:38 AM, Jeremy Hylton wrote:
[Please followup to zodb-dev.]

You made some changes to the mkzeoinst.py script in April.  I was busy
then, and I've just had a chance to look at the changes now.  I'd like
to discuss some of the changes, and I'm including a wider discussion
list to make sure we include anyone else who is interested.
A number of the changes are Zope specific.  (For example, you can't 
even
run mkzeoinst.py without having a directory named "Zope" hanging off of
sys.path.)  ZEO and ZODB are intended for use separately from the rest
of Zope, so we need to find a way to factor this out into a generic
configuration and a Zope-specific configuration.
Go for it :)  [I'm in hard-core product development mode for a few 
months, so apart from critical Zope bugfixes along the way I'll not 
really be much use, sorry ... even Roundup is taking the back seat for 
a while ;)]

Perhaps Zope's mkzeoinstance should have all that Zope-specific stuff, 
and only hook into the mkzeoinst module for some of the generic 
functions. there may even be some more potential for sharing of code 
between mkzeoinstance and mkzopeinstance.


The other question I have is about the organization of software into a
Zope home and an instance home.  I'm not sure what the history of this
arrangement is, but I recommend that people do not configure their ZEO
servers to share software with their Zope app servers.  It can cause
fairly severe problems!
I was completely unaware of this, and have always run ZEO servers with 
the full complement of Products. I have no immediate suggestion for a 
solution to this problem. The big issue is really how are (potentially 
"dumb", point-n-click) users to know that they need to install product 
X in their ZEO server but not product Y? Dieter's solution of some 
configuration variable controlling this sounds like a really good idea, 
if possible.

Richard
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE+1ZI4rGisBEHG6TARApA1AJ9V5Vy/FD8Dx7Nyp2lcXhTgDuAokwCeJqLJ
gbubTTKmtV/Heyush75rW44=
=qVyG
-END PGP SIGNATURE-
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Creating a fully stand-alone Zope Page Templates

2003-02-25 Thread Richard Jones
On Wed, 26 Feb 2003 1:53 am, Guido van Rossum wrote:
> > Hurm. I can't answer this directly, but I have done the same as you and
> > divorced ZPT completely from Zope for Roundup. See http://roundup.sf.net/
> > in the roundup.cgi.[PageTemplates|TAL|ZTUtils] packages.
>
> I wonder if it would be worth our while to make sure that ZPT is
> separately usable, just like we do for ZODB?

I've made that suggestion numerous times on the ZPT mailing list, with zero 
response.


> Just how much did you have to change to divorce ZPT from Zope?

I've fully documented it (as required by the ZPT license). In a nutshell:

- implemented MultiMapping as simple python modules
- changed the way macros are handled to remove the computed attribute stuff 
(since it's an acquisition trick)
- removed all references to acquisition (for cleanliness, no other reason) 
including some ZTUtils that won't work without it (ie. tree stuff)
- altered the import statements so that I wouldn't clash with another version 
of ZPT if it were installed (or if Roundup was installed as a Zope Product)
- significantly improved error reporting :)

The critical change is the way that the macros are handled. The 
ComputedAttribute stuff just doesn't make sense (and is horribly complicated) 
when you're not using acquisition. The good news is that TAL requires no 
changes if you implement a dummy zLOG. I ended up removing the dependency.


 Richard



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Creating a fully stand-alone Zope Page Templates

2003-02-25 Thread Richard Jones
On Wed, 26 Feb 2003 1:26 am, Kevin Smith wrote:
> This works!!  Thank you!  Do you keep your Page Templates up-to-date
> with Zope's, or is this version going to stay the way it is from now
> on?  It looks like you did what I was trying to do (i.e. put a wrapper
> around the existing code) so that updates only required you to get the
> newest version of Page Templates from Zope and plug them in.

I keep track of bug fixes, but nothing else. ZPT is a stable product, so bug 
reports are rare. The multilingual implementation (which I'm not completely 
up to speed with) was happening while I was doing my port, so I don't have 
any of that. I also can't just update from the ZPT CVS any more.


Richard


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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] Creating a fully stand-alone Zope Page Templates

2003-02-24 Thread Richard Jones
On Tue, 25 Feb 2003 11:07 am, Kevin Smith wrote:
> I am trying to make a stand-alone Page Templates packages that doesn't
> have any Zope dependencies.  I was able to short circuit security and
> acquisition.  I re-implemented MultiMapping in plain Python and made
> the Base class just an empty class.
>
> This is passing most of the regression tests, but there is one big
> issue left.  When a page template invokes something that is a function,
> it prints the equivalent of 'repr(function)' instead of 'function()'.
> What magic that goes on within Zope am I missing in my wrapper?

Hurm. I can't answer this directly, but I have done the same as you and 
divorced ZPT completely from Zope for Roundup. See http://roundup.sf.net/ in 
the roundup.cgi.[PageTemplates|TAL|ZTUtils] packages.


Richard


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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: Reports of CallProfiler not working with Zope 2.5.x were greatly exagerated :-) (was Re: CallProfiler?)

2002-10-17 Thread Richard Jones
On Fri, 18 Oct 2002 6:07 am, Leonardo Rochael Almeida wrote:
> CallProfiler wasn't profiling ZPTs because they've been renamed/moved
> from Products.PageTemplates.PageTemplates.PageTemplates to
> Products.PageTemplates.ZopePageTemplate.ZopePageTemplate. Here's a patch
> to make it work again.

I'll see about patching it and release a new version for 2.5 (not supporting 
2.4 any more).


> BTW, does anyone know what a MLDTMLMethod from a MLDTML product (in
> CallProfiler/CallProfiler.py:124-125) is?

It's our in-house multilingual support ;)


> Anyway, I'm still wondering whatever happened to the CallProfiler
> integration plans. I see there are anthony-CallProfiler-something
> branches in CVS, but I couldn't make anything of them (probably my CVS
> inexperience). Anyone knows anything about this?

Sorry, both Anthony and I ran out of tuits before the 2.6 release. I believe 
the final integration was simply lost somewhere between Anthony and Brian - 
but they'd know what the exact situation is.


> PS: Richard, I'm CCing this to you because you mentioned you're
> accepting patches and I don't know if you subscribe to zope-dev.

Thanks, but I'm on -dev ;)


Richard



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



[Zope-dev] Re: Future of StructuredText

2002-09-05 Thread Richard Jones

On Thu, 5 Sep 2002 1:23 pm, Simon Michael wrote:
> Simon Michael <[EMAIL PROTECTED]> writes:
> > The doc I read listed a large number of rules, including many that seemed
> > to want to exert more control over my text than they should.  (I had a
>
> I tracked it down - it was the example rST PEP posted in comp.lang.python.
> So that would explain it. I read stuff like the below as being part of
> rST, when presumably they are a PEP thing.

You are correct - the formatting restrictions have been carried over from PEP 
9 to PEP 12.


Richard


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



Re: [Zope-dev] Re: Future of StructuredText

2002-09-04 Thread Richard Jones

On Thu, 5 Sep 2002 2:24 am, Simon Michael wrote:
> Andreas Jung wrote:
> > I would be fine to have reStructuredText inside the Zope core (for 2.7)
> > and to deprecate the current StructuredText in the long run.
>
> My two cents - there are some things in rST I would like to have but I
> think it has gone too far with it's rules.

This seems to be a common argument, and I honestly can't understand it. I'm 
not going argue it here, I'll just point you all to the "primer" document 
which outlines the basics of ReST:

http://docutils.sourceforge.net/docs/rst/quickstart.html


   Richard


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



Re: [Zope-dev] Future of StructuredText

2002-09-04 Thread Richard Jones

[courtesy cc send to David G, so if I make any blatantly errneous statements 
 he can come chase me with the Big Stick :)]

On Wed, 4 Sep 2002 8:01 pm, Max M wrote:
> Andreas Jung wrote:
> >I would be fine to have reStructuredText inside the Zope core (for 2.7)
> >and to deprecate the current StructuredText in the long run.
>
> +1

+1 but with the reservations below :)


> >Open points: how to migrate exisiting STX documents to reStructuredText
>
> Wouldn't the simplest solution be:
>
>   ???
>
> Then we could use both interchangably.

One of the big issues is that rest isn't optimised. I don't know what the 
scope is for optimising rest, nor have I got any real benchmark numbers. The 
emphasis so far has been to build it to spec. It's potentially much slower 
than stx because the latter has been around for longer and therefore is 
potentially more tweaked. The ReStructuredText Document works because I 
compile the source text into HTML when it's written. Nice and fast, and works 
well in content management environments. In the above DTML tag usage though, 
you'd want "content" to be quite small or the performance hit could be large. 

I believe migration may be possible - that is, the parser half of rest might 
be mutable enough to make it handle stx blocks and other syntax 
eccentricities. That's a question for David Goodger to answer really. As I 
understand it though, there's ambiguities in stx that the rest parser might 
not interpret in the same manner as the stx parser. The docutils/rest project 
has an analysis of the stx format:

http://docutils.sourceforge.net/spec/rst/problems.html


  Richard


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



Re: [Zope-dev] Re: [OT] digital signature

2002-04-25 Thread Richard Jones

On Fri, 26 Apr 2002 02:02, Lennart Regebro wrote:
> I want a *good* mail program. :-/

I recommend KMail for those who prefer a GUI reader.

   http://kmail.kde.org/

It boasts an impressive list of features, including the invaluable SSL POP and 
SMTP connections and really well-integrated Identity support.


Richard



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



Re: [Zope-dev] Call Profiler strangeness - lots of ZODB transactions

2002-04-08 Thread Richard Jones

On Tue, 9 Apr 2002 09:27, Richard Jones wrote:
> On Tue, 26 Mar 2002 21:29, Toby Dickenson wrote:
> > On Tue, 26 Mar 2002 15:30:56 +1100, Richard Jones
> >
> > <[EMAIL PROTECTED]> wrote:
> > >I'm investigating why our product ZODB is growing when it shouldn't.
> > > I've found that the undo log has entries in it every five minutes
> > > saying "Installed product CallProfiler by Zope". More infrequently (not
> > > regularly) we also have "Installed product ZOracleDA by Zope".
> >
> > Was zope restarting (or being restarted) every five minutes?
>
> No, but it is being pinged. By that, I mean that we have a script that
> tries to access the ZEO server every five minutes to make sure it's all OK.
> The script does the following::
>
>   import sys, os
>   sys.path.append('/app/zope/zopecontrol_code/')
>   sys.path.insert(0, '/app/zope/zopecontrol_code/lib/python')
>   os.environ['ZEOPORT'] = '8076'
>   os.environ['ZEOHOST'] = 'devhost1.off.ekorp.com'
>   import Zope
>   # now do stuff with the Zope.app() (we don't actually have to do anything
>   # to trigger the ZODB note generation - the import is enough)

Setting the environment var ZEO_CLIENT stops the message - but I guess I'd 
like to know why this product is causing the message when none of the others 
are. It's all due to the code in installControlPanel, and I'd rather it not 
be dodgy :)


Richard


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



Re: [Zope-dev] Call Profiler strangeness - lots of ZODB transactions

2002-04-08 Thread Richard Jones

On Tue, 26 Mar 2002 21:29, Toby Dickenson wrote:
> On Tue, 26 Mar 2002 15:30:56 +1100, Richard Jones
>
> <[EMAIL PROTECTED]> wrote:
> >I'm investigating why our product ZODB is growing when it shouldn't. I've
> >found that the undo log has entries in it every five minutes saying
> >"Installed product CallProfiler by Zope". More infrequently (not
> > regularly) we also have "Installed product ZOracleDA by Zope".
>
> Was zope restarting (or being restarted) every five minutes?

No, but it is being pinged. By that, I mean that we have a script that tries 
to access the ZEO server every five minutes to make sure it's all OK. The 
script does the following::

  import sys, os
  sys.path.append('/app/zope/zopecontrol_code/')
  sys.path.insert(0, '/app/zope/zopecontrol_code/lib/python')
  os.environ['ZEOPORT'] = '8076'
  os.environ['ZEOHOST'] = 'devhost1.off.ekorp.com'
  import Zope
  # now do stuff with the Zope.app() (we don't actually have to do anything
  # to trigger the ZODB note generation - the import is enough)

Now, the problem lies in the way that the CallProfiler gets itself into the 
Control Panel. This code was copied from the LeakFinder product, so I assume 
it'll have the same problem. The code is::

 def installControlPanel(context, panelClass):
from App.ApplicationManager import ApplicationManager
from Acquisition import aq_base
app = context._ProductContext__app
cp = app.Control_Panel
id = panelClass.id
if 0: # Enable to clean up the control panel.
try: del cp._objects
except: pass
cp.id # Unghostify.
if hasattr(cp, id):
return cp._getOb(id)
if cp.__dict__.has_key('_objects'):
# _objects has been overridden.  We have to persist.
existing = getattr(aq_base(cp), id, None)
if existing is None or existing.__class__ != panelClass:
cp._setObject(id, panelClass())
else:
# Don't persist what we don't have to.
objects = ApplicationManager._objects
objects = filter(lambda o, id=id: o['id'] != id, objects)
ApplicationManager._objects = objects + (
{'id':id, 'meta_type':panelClass.meta_type},)
try: delattr(cp, id)
except: pass
setattr(ApplicationManager, id, panelClass())
return cp._getOb(id)

Where panelClass is my Product's class.

When the ping script imports Zope, the product is installed. If it's 
installed as a "regular" product, using context.registerClass, all is OK. If 
it is installed using the above function, I get ZODB transaction notes of the 
form "Installed product CallProfiler by Zope   2002-04-08 11:14:10 PM".

It's all a bit black magic for me though. I honestly don't know why half of 
the function above actually exists. I'm going to keep looking though, but if 
someone could help, I'd be extremely grateful.


Richard


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



[Zope-dev] Call Profiler strangeness - lots of ZODB transactions

2002-03-25 Thread Richard Jones

I'm investigating why our product ZODB is growing when it shouldn't. I've 
found that the undo log has entries in it every five minutes saying 
"Installed product CallProfiler by Zope". More infrequently (not regularly) 
we also have "Installed product ZOracleDA by Zope".

The Call Profiler was designed specifically not to hit the ZODB - it's 
in-memory only with. Our setup consists of seven ZEO clients talking to the 
one ZEO server - the one that's getting all these hits in the ZODB.

Does anyone else see this happening?

Anyone have any ideas why we're seeing this behaviour?


Richard

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



Re: [Zope-dev] Structured text issues (again?)

2002-03-20 Thread Richard Jones

On Thu, 21 Mar 2002 08:40, [EMAIL PROTECTED] wrote:
> How extensively is STX actually used? I've been looking at it myself
> recently, and the whole system seem rather simplistic to me in how it
> parses the text. I'm talking specifically  of the STX version currently
> standard in Zope 2.5 (and 2.4 I think), which I believe is STXNG; 
>
> [snip]
>
> I explain the problems I see next, followed by a proposed algorithm
> change and some rough code to make things "better".

Please also see the ReStructureText effort which addresses a lot of the 
problems that STXNG is perceived to have. It's really very nice, and one of 
these days I hope to get it wrapped in a Zope Product.

   http://structuredtext.sf.net/

Note specifically:

   http://structuredtext.sourceforge.net/spec/problems.txt

If something you see as being a problem in STXNG isn't addressed there, I'm 
sure the author of ReST would love to hear about it!


Richard


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



[Zope-dev] CallProfiler (was: MonkeyPatching in the Core (was: Zope 2.6 planning))

2002-03-04 Thread Richard Jones

On Tue, 5 Mar 2002 10:54, Adrian Hungate wrote:
> The call profiler seems to be a very popular feature, and it seems to
> provide very useful information. It's not rock solid yet (I am sure I even
> remember it's author saying this a day or so ago)

Any idea what I might have been referring to? I don't recall having said 
anything about the profiler in any forums except these about any topic other 
than integrating it into the core. And certainly nothing about stability.

Mind you, I was quite ill late last week, and I might have unwittingly sent 
some email off in my delerious state... :)


Richard

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



Re: [Zope-dev] MonkeyPatching in the Core (was: Zope 2.6 planning)

2002-03-04 Thread Richard Jones

On Tue, 5 Mar 2002 07:20, Brian Lloyd wrote:
> Seb wrote:
> >  Pros - a tiny performance gain
> >  Cons - unpredictable interaction with future products; not a well-known
> > method of distributing products; not easily discoverable
>
> What if, instead of the static list of callable info that the CP
> currently uses, Zope objects could register themselves as profilable?
> We would then make sure that the object types that CP handles now
> register themselves, but other products that we don't know (or
> have to know) about could register themselves too if they wanted.

This doesn't really address the concern I have with regard to the con given 
above. The main reason is that the call profiler's monkeypatching is done 
potentially many times, and it performs an unpatch as well as a patch. This 
muckery can potentially really stuff over other components that also 
monkeypatch the same methods. Especially if they _also_ perform unpatching.

I'm not sure the consentual monkeypatch approach really solves this issue... 
and if the product has to be modified to make it register itself with the 
profiler, why not just have it include the (very simple) calls to the 
profiler instead?


Richard

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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-03 Thread Richard Jones

On Mon, 4 Mar 2002 14:40, Casey Duncan wrote:
> I agree, monkey patches are perfect for this. That
> makes them totally transparent to the application and
> Zope for that matter. There's nothing wrong with them
> in the right application.

My main concern is the use of monkeypatching in the core makes it difficult 
for someone else to release a product that also MPs without them worrying 
about whether something has already patched code. Especially when we're 
talking about MP'ing so many core Zope objects (yes, I count >1 as "so many" 
:)

I think the performance hit is really quite minimal for two if statements at 
the entry and exit point(s) of a function to turn the behaviour on and off.


   Richard

ps. don't forget Anthony, our first reaction when we both thought of this 
approach was *shudder* :)

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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-03-03 Thread Richard Jones

On Fri, 1 Mar 2002 21:25, seb bacon wrote:
> > > Absolutely ... and I would also like to see Richards excellent Call
> > > Profiler service become part of the core.
> >
> > I'm definitely putting the profiler into 2.6 - there's just an open
> > question of where it gets put. The question was asked on zope-coders, and
> > got no response. I figure if no-one answers within a week of my original
> > posting, I'll just check it in as a product.
>
> FWIW, my own opinion is that it should not take the 'MonkeyPatch'
> approach.

That's my opinion too, but I have had no feedback from zope-coders...


   Richard

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



Re: [Zope-dev] Zope 2.6 planning - call for contributors!

2002-02-28 Thread Richard Jones

On Fri, 1 Mar 2002 15:17, Eric Roby wrote:
> > > > Let's get a discussion
> > > >
> >  >> started to define 2.6
> >
> > I'd like to see the ZSyncer Product, or a variant thereof, included in
> > Zope by default.  That is, I'd like "Synchronization", to a be a default
> > property of Zope objects, so that objects/content can be pushed and
> > pulled between two Zope installations.
> >
> > I venture a guess that the development/production model is common,
> > and this helps quite a bit in maintaining this model.
> >
> > Ziniti
>
> Absolutely ... and I would also like to see Richards excellent Call
> Profiler service become part of the core.

I'm definitely putting the profiler into 2.6 - there's just an open question 
of where it gets put. The question was asked on zope-coders, and got no 
response. I figure if no-one answers within a week of my original posting, 
I'll just check it in as a product.


Richard


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



Re: [Zope-dev] Benchmarks: DTML vs. ZPT?

2002-02-07 Thread Richard Jones

On Thu, 7 Feb 2002 20:53, seb bacon wrote:
> Hi!
>
> It wouldn't surprise me - ZPT has the roughly the same overheads as DTML
> for the language parsing, but a presentation template goes through an
> HTML parser in addition - which is always going to be quite slow in
> python.

That's only during parsing - the result of the ZPT parse is a highly 
optimised rendering structure.


Richard

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



Re: [Zope-dev] Call Profiler

2002-02-04 Thread Richard Jones

On Mon, 4 Feb 2002 21:42, seb bacon wrote:
> On Sun, 2002-02-03 at 21:58, Richard Jones wrote:
> > On Fri, 1 Feb 2002 21:53, seb bacon wrote:
> > > I wrote:
> > > > I've just announced our Call Profiler product on zope.org and the
> > > > zope announce list (waiting for people in different timezones to
> > > > authorise them :) ( http://www.zope.org/Members/richard/CallProfiler/
> > > >  for the impatient)
> > >
> > > This is absolutely excellent, well done and thanks :)  I added various
> > > FSObjects to the profiled modules list and have been looking at my CMF
> > > systems - it's really instructive.
> >
> > Please send me the config entries for them. Also, if anyone has used ZPT
> > with it, let me know if my guess of the config for them is correct :)
>
> in profileable_modules:
>
> 'FSPythonScript': Profileable('Products.CMFCore.FSPythonScript',
> 'FSPythonScript', '__call__'),
> 'FSDTMLMethod': Profileable('Products.CMFCore.FSDTMLMethod',
> 'FSDTMLMethod', '__call__'),
> 'FSPageTemplate': Profileable('Products.CMFCore.FSPageTemplate',
> 'FSPageTemplate', '__call__'),

Thanks!


> > > - the trace for a complete template could be slightly clearer.  The
> > > colour coding for the start and end of a module could have a clear
> > > legend, for example.
> >
> > I'll put a legend in. Is the colour coding what you meant by "clearer" or
> > is there something else?
>
> Yes, that's what I meant.

OK, it's done. Will be in the next release (probably today :)


>  Actually, another thing just occurred to me:
> the meaning of the "..." ellipsis is not clear - I think you need a
> different symbol to emphasise the hierarchy (perhaps a vertical bar?)

OK, I'll look into it. The '...' is definitely a placeholder :)


Richard

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



Re: [Zope-dev] Call Profiler

2002-02-03 Thread Richard Jones

On Sat, 2 Feb 2002 02:49, Zopista wrote:
> Doesnt seem to like being refreshed and some event items arent in the time
> dict, I noticed these were items that I had got in a ram cache. So i just
> stuck an if at line 496. Other than that its a great product. Most
> important tool since refresh if you ask me...

Yeah, as the README states - the profiling data is memory-only - I'm going to 
look into a post-publish hook that stuffs the result from a single run into 
the ZODB.


Richard

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



Re: [Zope-dev] Call Profiler

2002-02-03 Thread Richard Jones

On Fri, 1 Feb 2002 21:53, seb bacon wrote:
> I wrote:
> > I've just announced our Call Profiler product on zope.org and the zope
> > announce list (waiting for people in different timezones to authorise
> > them :) ( http://www.zope.org/Members/richard/CallProfiler/  for the
> > impatient)
>
> This is absolutely excellent, well done and thanks :)  I added various
> FSObjects to the profiled modules list and have been looking at my CMF
> systems - it's really instructive.

Please send me the config entries for them. Also, if anyone has used ZPT with 
it, let me know if my guess of the config for them is correct :)


> > On one hand, the performance hit when dynamically patching the methods is
> > zero when the product is not "active", but it does mean diddling with
> > methods that really probably should be left alone. On the other hand,
> > having changes to the core code to test for profiling being enabled
> > introduces a small performance hit even when profiling is not activated.
>
> You could do this check only if zope is being run in debug mode; then
> there would be zero perormance hit in production sites.

No, there's still the performance check for "am I in debug mode?" which is 
equivalent to "am I in profiling mode?". Sure, it's small, but it's there.


> > Any comments?
>
> I think the reporting could do with some usability improvements.  It's
> good now, but takes a while to navigate round.

Yep, I know :)


> - All the reports could benefit from being sortable by column.

In the works already :)


> - the trace for a complete template could be slightly clearer.  The
> colour coding for the start and end of a module could have a clear
> legend, for example.

I'll put a legend in. Is the colour coding what you meant by "clearer" or is 
there something else? 


> - there needs to be some solution for really long URLs, which require
> lots of horizontal scrolling - just displaying the final parts of the
> path, with the rest of the url hidden somehow?

Yep, that's a good idea.


> I can't think of exactly what else I would do to improve it right now

I've already got some more code in place that I'm testing right now which 
does aggregation of matching result profiles. That is, if a request results 
in the same call profile, the timings are aggregated into min/average/max. 
Really neat :)

Thanks for the feedback!


Richard

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



Re: [Zope-dev] Call Profiler

2002-01-31 Thread Richard Jones

On Fri, 1 Feb 2002 14:10, Anthony Baxter wrote:
> >>> Richard Jones wrote
> >
> > I've just announced our Call Profiler product on zope.org and the zope
> > announce list (waiting for people in different timezones to authorise
> > them :) ( http://www.zope.org/Members/richard/CallProfiler/  for the
> > impatient)
>
> ... Richard had made my initial vile hack actually work in a way that
> didn't cause bleeding from the brain) 

No comment ;)


> Unfortunately, the existing python profiling stuff is at too low a
> level to be useful - this stuff really fills a need.

Although being able to tie this into the python profiler would _rock_ in 
terms of profiling websites that use a mix of DTML/ZPT and Python products. 
Even it it's just to get the timing marks where the higher level stuff like 
DTML/ZPT calls out to the python code (ie. getting timing for the python 
calls at the highest level)


> Plus, if it's integrated into Zope, Richard doesn't have to spend work
> time on maintaining it :)

But I do have time for screenshots - there's some up on the product page now 
for those who have a short curiosity span :)


Richard

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



[Zope-dev] Call Profiler

2002-01-31 Thread Richard Jones

I've just announced our Call Profiler product on zope.org and the zope 
announce list (waiting for people in different timezones to authorise them :)
  ( http://www.zope.org/Members/richard/CallProfiler/  for the impatient)

In a nutshell, it patches the rendering guts of DTMLMethod, ZSQL, etc. and 
the ZPublisher so that we can get timing marks for requests as the calls are 
made. The patching is quite simple (once I got the hang of it ;) and 
reversible, and means that there's no changes required to the Zope core to 
enable the testing (which our initial versions did).

It does pose a question though: would it be better to have support for this 
stuff in the core, or is it OK for a product like this to dynamically patch 
the call methods when it needs to?

On one hand, the performance hit when dynamically patching the methods is 
zero when the product is not "active", but it does mean diddling with methods 
that really probably should be left alone. On the other hand, having changes 
to the core code to test for profiling being enabled introduces a small 
performance hit even when profiling is not activated.

Any comments?


Richard

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



Re: [Zope-dev] Roundup?

2001-12-04 Thread Richard Jones

On Wednesday 05 December 2001 04:01, Chris Withers wrote:
> Richard Jones wrote:
> > 
> >
> >   http://roundup.sf.net/
> >
> >   ... is in heavy development, but is also being used right now.
> >
> > 
>
> Well, it's written in Python, so probably a good candidate.
>
> Could it be integrated into Zope?

Roundup has complete flexibility in the front and back ends.

It comes with a web, command-line and e-mail interface and it shouldn't be 
too hard to add a Zope front-end. Modifying the existing web interface to be 
a Zope front-end would probably be quite simple.

It comes with anydbm and bsddb back-ends (and a dormant, not-quite-working 
bsddb3 back-end), and defining more is pretty simple.


   Richard

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



Re: SV: [Zope-dev] Fishbowl?

2001-12-03 Thread Richard Jones

On Saturday 01 December 2001 02:29, Magnus Heino wrote:
> > 3. We could use another open source tool. Bugzilla springs to
> > mind. Yes, it's not Zope, or even python, but it does
> > work, certainly better than anything we, as a community, have
> > right now or could build in the time it would take to
> > install and set up.
>
> Well, I'm not too sure about that. Bugzilla is an undocumented, hacked,
> run-at-one-place-but-dont-try-to-move-it-beast. imho. Just like
> sourceforge...
>
> I gave it a try a while ago, but threw it away.



  http://roundup.sf.net/

  ... is in heavy development, but is also being used right now.




Richard

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



Re: [Zope-dev] compilezpy (compileall)

2001-11-21 Thread Richard Jones

On Wednesday 21 November 2001 19:49, Danny William Adair wrote:
> On Wednesday 21 November 2001 18:41, Richard Jones wrote:
> > On Wednesday 21 November 2001 16:34, Danny William Adair wrote:
> > > As from what I know (leaving aside for a moment that I basically know
> > > nothing), Zope should be _started_ as root, but then be _running_ as
> > > nobody. This does make sense to me, in a couple of ways. :-)
> > >
> > > Do you know when or where this "switch" to nobody is performed?
> >
> > in z2[s].py   (lines 831 onwards in z2s.py)
>
> Cool!
> This sounds like a really cool answer - just the kind I love - but...
> I have never seen a "z2s.py", and "z2.py" has less than 800 lines.
> Please tell me where I'm being thick here...

You're not - z2s is from M2Crypto and is a modified z2.py that's used to 
control the SSL-enabled Zope.


Richard

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



Re: [Zope-dev] compilezpy (compileall)

2001-11-20 Thread Richard Jones

On Wednesday 21 November 2001 16:34, Danny William Adair wrote:
> As from what I know (leaving aside for a moment that I basically know
> nothing), Zope should be _started_ as root, but then be _running_ as
> nobody. This does make sense to me, in a couple of ways. :-)
>
> Do you know when or where this "switch" to nobody is performed?

in z2[s].py   (lines 831 onwards in z2s.py)



Richard

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



Re: [Zope-dev] compilezpy (compileall)

2001-11-20 Thread Richard Jones

On Wednesday 21 November 2001 15:12, Danny William Adair wrote:
> I wondered if this (see subject) was totally necessary during the
> installation. My Zope installation seems to run fine when I delete all the
> *.pyc and just start it. Obviously it runs slower the first time, but
> that's all I can see.

If the server is run as nobody, that user probably won't have permission to 
write the compiled bytecodes to disk.


Richard

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



Re: [Zope-dev] HELP PLEASE

2001-10-14 Thread Richard Jones

On Monday 15 October 2001 17:09, Andre Schubert wrote:
> > Hi all,
> >
> > i have serious problems with my zope.
> > Last time he dies very often with error code 13,and since to today he
> > slows down extremly.
> > To view the Control_Panel/DebugForm it takes up to 1 minute and thats
> > not acceptable.
> >
> > How can i track down these problems.
> >
> > I run Zope-2.2.4 on Immunix-RedHat 6.2
>
> Hi, all
>
> Is there anybody, who can help me tracking down where the Error Code: 13
> comes from,
> it is very important for my Zope Installation.

You probably need to give more information - like where this error code 13 
appears. If it's an OSError or IOError, it's probably an Access Error (as 
defined in the errno module, EACCES). What _that_ means depends entirely on 
the _rest_ of the error, which you haven't supplied. A full traceback of the 
error will go a long way to helping you.


 Richard

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



[Zope-dev] PropertyManager bug: long int truncation

2001-10-08 Thread Richard Jones

Under python 2.1.1, zope 2.4.1, long in properties get truncated by exactly 
one character each time they are saved. This most likely results from the 
Good Old Days when long int representations had a trailing 'L', which no 
longer exists.


Richard

ps. how's the collector going? Wanna maybe use Roundup? :)

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



[Zope-dev] Proposal: have install_product detect __init__.pyo too

2001-10-08 Thread Richard Jones

I'd like to run python in its optimised mode (to try to squeeze that extra 
1-5% of performance out of it ;). The only real barrier to doing this is that 
install_product doesn't check for __init__.pyo (just .py and .pyc).

Would there be serious problems if it was modified to detect the .pyo as well?


   Richard

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



Re: [Zope-dev] file descriptors on Solaris - IT'S A BUG, PEOPLE!

2001-10-03 Thread Richard Jones

[cc'ed to zope-dev so people can check this information]

On Thursday 04 October 2001 13:47, Joseph Wayne Norton wrote:
> One related question that I have regarding cgi.py and zope.
>
> Would there be any compatibility problem of applying the following
> older cgi hotfix to python's cgi.py file and usage with Zope 2.4.1 and
> higher?
>
>   python cgi hotfix:
> http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=4
>43120
>
>   zope hotfix:
> http://www.zope.org/Products/Zope/Hotfix_2001-07-25/README.txt
>
> My understanding is that the zope hotfix is not required for version
> 2.4.1 and higher.

Zope 2.4.1 includes the hotfix. The hotfix does not fix the "too many open 
files" problem. I don't believe there's any compatibility problems (we're 
using both OK here).


Richard

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



Re: [Zope-dev] file descriptors on Solaris - IT'S A BUG, PEOPLE!

2001-10-03 Thread Richard Jones

On Wednesday 03 October 2001 22:00, R. David Murray wrote:
> On Tue, 2 Oct 2001, John Ziniti wrote:
> > Yeah ... something tells me it's a little more complicated than that.
>
> Like recompiling the kernel, quite possibly.  On FreeBSD there's
> a sysctl, although you may still have to recompile the kernel in
> some cases I think; on Linux you can zap a variable in proc.  On
> solariswho knows .
>
> > Any advice on the other front?  If I can reduce the number of files
> > Zope needs to process this request, I'd grumpily agree to do that,
> > is Zope opening a file for every ?
> > Will using  help?
>
> I don't see why zope should need so many file descriptors.  But
> you may have to start tracing code .

As I mentioned yesterday, this is a _bug_ in cgi.py which is fixable by 
getting the patch from:

http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=231249


Richard

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



Re: [Zope-dev] file descriptors on Solaris [SUMMARY]

2001-10-02 Thread Richard Jones

On Wednesday 03 October 2001 04:50, John Ziniti wrote:
> DIAGNOSIS:
> It appears that this only happens when the form is specified with
> "enctype=multipart/form-data".  In that case, Zope (or, more accurately,
> the cgi module), tries to create temporary file for each form ,
> no matter what type the input has ... (I think but I can't be 100%
> sure about that).  This seems a little weird.  Why do we have to open
> a file for each "part" just because it *may* contain a file?

This is a bug in python's cgi module that has been patched (but not in python 
2.1.1). There's a patch on sourceforge for it in any case. 

http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=231249

No fiddling with max open files required.


Richard

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



Re: [Zope-dev] Zope on Windows/Mac OS X: BatteriesIncludedDistribution

2001-09-30 Thread Richard Jones

On Friday 28 September 2001 22:05, Paul Everitt wrote:
> Whew, what a proposal and what a good sign!
>
> As several have noted, there are quite a few proposals in the fishbowl
> that deal with different aspects of the problems.  There's also a draft
> proposal that we had here in ZC that expands on the items.  Finally,
> there appear to be a few pieces of software (yours, zctl, zopectl, etc.)
> that try to address aspects.
>
> I suggest that we all spend some time trying to revisit all the
> proposals, obsolete the ones that are covered elsewhere, and try to find
> the common ground.  There is a dorman zope-packagers mailing list we
> could hijack for these purposes:
>
>http://lists.zope.org/pipermail/zope-packagers/
>
> I think, with all the various efforts, it is time to agree on some
> standards regarding where configuration data lives and how it looks.

OK, I've joined that list. I did not realise the worm can was this big :)


   Richard

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



[Zope-dev] Zope on Windows/Mac OS X: BatteriesIncludedDistribution

2001-09-26 Thread Richard Jones

I've just created the follwing fishbowl proposal:

  http://dev.zope.org/Wikis/DevSite/Proposals/BatteriesIncludedDistribution

Please read and comment.


Richard

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



Re: [Zope-dev] Distributing Zope & one of our products

2001-09-26 Thread Richard Jones

On Thursday 27 September 2001 00:37, Simon Coles wrote:
> But of course at the moment we have to get them to:
>   - install Zope
>   - get, expand, and install the CMF (which is distributed as a .tgz,
> rather confounding Windows users)
>   - get our product and expand/install it
>   - then log in as the inituser, create a normal user, log out, log back
> in, create an ELN, then log out, then access the ELN, and join in the
> normal CMF fashion

What you're describing is exactly the issues (well, some of them :) that 
we've addressed in making Zope a viable out-of-the-box product for our 
commercial product. A result of our efforts are the two GUIs that we're 
making available - the Mac OS X and Windows Zope Controllers.

  http://www.bizarsoftware.com.au/resource_centre/articles/open_source.html

Note, the screenshots are a little different to the current version - but the 
general idea is still the same.

I hope to make a "batteries included" Zope distribution for both platforms 
that include the controllers and some pre-installed products. We don't know 
which products they'll be yet because the idea's still very young :)

Fishbowl proposal has been created - I'm announcing it in another thread.


Richard

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



Re: [Zope-dev] Zope on Windows: enhancements proposed

2001-09-24 Thread Richard Jones

On Tuesday 25 September 2001 16:41, Adrian Hungate wrote:
> I edit the registry... One of my many favourite pass-times, right up there
> with running out in traffic.
>
> Seriously though, once an instance is configured, why would you want to
> change it? (Assuming you get it right that is)

Mostly the interface is for stopping/starting the server, accessing the log, 
accessing the management screen, adding a manager user (yes, those last two 
are buttons which just open a URL with the default browser), changing the 
emergency user password and generally reporting information about the 
instance.

The "(Assuming you get it right that is)" is also spot on - people will do 
strange things, and we need a simple interface that we can walk them through 
on the phone, and also an interface that they're unlikely to cause damage 
with (as opposed to editing z2.py or the *gak* registry!)

This interface is _specifically_ targetted at a "new breed" of zope user. 
Someone who was brought up on a diet of IIS or some other plug-n-play web 
server. Someone who just wants it to work, no registry editing, no config 
file editing. That's who this stuff is targetted at.

I'd say that adding a multi-instance ability would be possible - we'd just 
have to be able to handle multiple config files. We're just not sure how it 
should be handled in the UI :)


 Richard

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



Re: [Zope-dev] Zope on Windows: enhancements proposed

2001-09-24 Thread Richard Jones

On Tuesday 25 September 2001 16:26, Adrian Hungate wrote:
> I have to disagree about the Zope (%s), I have been known to run 2 or 3
> Zope services, for different instances, and I always know that I can find
> them all huddled together at the bottom of the Service Manager - Very
> useful.

So does that mean they have different names in the service manager? How do 
you configure the instances?


 Richard

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



Re: [Zope-dev] Zope on Windows: enhancements proposed

2001-09-24 Thread Richard Jones

On Tuesday 25 September 2001 14:23, Andy wrote:
> > We'd like to propose that the service distributed with Zope move over to
> > using our code.
>
> Great, Im really looking forward to an improved Windows installation. But
> lets get it out there play with it before anything major happens like
> shipping Zope with it :)

Fer sure :)


> It is annoying but Zope wins there because OReilly isnt making WebSite
> anymore.

Yeah, they seem to have sold it to someone else...


> Its just a name, I find the Zope (%s) bit more annoying than
> anything :)

Agreed.


> > ps. happy to put this up as a project if required.
>
> Thats probably a good idea. What about other issues such as install and
> removing service easily later, STDERR logging not going to /dev/null, lack
> of start menu icons and other windows issues...

These are all things we've addressed, but it'd be good to note them 
somewhere. We've tried to make the process of using Zope (and hence our 
product) as painless to the average Windows user (and Mac user) as possible.


Richard

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



[Zope-dev] Zope on Windows: enhancements proposed

2001-09-24 Thread Richard Jones

We've got a wonderful zope control panel (which installs into the standard 
windows Control Panel) and zope service which we'll be making available in 
binary and source form this week. Like the Mac OS X controller, this is 
simply a trivial re-branding extension of our work in supporting the 
usability of our Bizar Shop product.

The windows controller works on win95/win98/NT/win2k. It controls a "real" 
windows service on platforms were services are run (NT/win2k), and otherwise 
controls a "service daemon" which stays in the system tray. We'll call this 
service "Zope", and its job is to lauch "python [script] [args]" with some 
Zope-specific environment fiddling (INSTANCE_HOME env, cd ${SOFTWARE_HOME}, 
STUPID_LOG_FILE env).

The current method of starting Zope as a windows service using 
PythonService.exe is kludgy, mostly because of the unnecessary layer of 
python. The Zope binary distribution's use of PythonService.exe does the same 
thing that our Zope service does (in the end), which is to lauch "python 
z2.py [args]".

We'd like to propose that the service distributed with Zope move over to 
using our code.

Our control panel will be able to control "Zope (WebSite)", but we probably 
won't offer the ability to configure it (editing the z2[s].py file in-place 
is possible - we do that now - but it's rather hackish).

So, best scenario is that Zope ships with the controller and our service. 
Worst scenario is that the controller is downloaded separately and can only 
stop/start PythonService. In the second case, we'd still ship our service and 
install it - meaning that there'd be two Zope services in the service 
manager, but at least the controller, which appears in the control panel, 
would still be able to fully control Zope.


As a separate issue - we're curious about the naming of the Zope installation 
- why is it called WebSite (and the Zope service "Zope (WebSite)")? The name 
clashes with another product that's fairly well-known in the windows 
community originally from O'Reilly: http://www.oreilly.com/software/index.html
... and since Zope is a fairly distinctive name ...


Richard

ps. happy to put this up as a project if required.

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



Re: [Zope-dev] ZPL and GPL

2001-06-25 Thread Richard Jones

On Tue, 26 Jun 2001 05:22, Michael "R." Bernstein wrote:
> On 25 Jun 2001 10:26:10 -0400, Shane Hathaway wrote:
> > According to management, there's a zope-license list somewhere and we
> > expect to move to a GPL compatible license. Paul says:
> >
> > "I think the goal should be for Zope and Python to converge on the same
> > license, with perhaps the new license being some off-the-shelf license
> > like Apache's."
>
> Hmm. So a BSD style license, then. Are there currently any Zope-derived
> distributions that are proprietary (third-party or DC's)?

Absolutely! We use Zope as a core component in our product that's about to 
"hit the shelves".


> If not, does DC anticipate there being this kind of third-party
> proprietary derived distribution in the future?

Absolutely! We have several products in mind that are based on Zope.


> Other than keeping the door open for this eventuality, is there any
> other reason to choose a BSD style license over the GPL?

I think I've answered that question.

We will be distributing the entirety of the source code of all open-source 
components of our product. We cannot distribute the source code of our 
product - that would be sheer foolishness. We've invested about 2 man-years 
in the code, and we're not about to just give that away. Our investors would 
string us up!


Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

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



Re: [Zope-dev] Zope Server hanging :-(

2001-06-06 Thread Richard Jones

On Wednesday 06 June 2001 18:03, Erik Enge wrote:
> On Wed, 6 Jun 2001 [EMAIL PROTECTED] wrote:
> > ... at least then we know what the exception is.
> >
> > Again - try that code in an interactive interpreter if you really want to
> > find out what's going on...
>
> Yeah, thanks, that would work as a workaround, but isn't this buggish
> behaviour?

Absolutely - along with dozens of other places that Zope squashes exceptions. 
Anthony Baxter actually wrote a script that finds instances of bare except: 
clauses in the Zope source...

 http://www.zope.org/Members/anthony/BarewordExcepts

Feel free to find the bad except: and submit a patch...


Richard

-- 
Richard Jones
[EMAIL PROTECTED]
Senior Software Developer, Bizar Software (www.bizarsoftware.com.au)

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