Re: [Zope-dev] brain.getObject and traversal

2005-04-01 Thread Chris Withers
Florent Guillaume wrote:
Well of course no, but I never had to check a getObject() against 
Unauthorized. Maybe it's because I only use it in a CMF setting where 
unaccessible objects are filtered anyway.
Maybe,  but CMF isn't the only use of Zope ;-)
OTOH you're a bit excessive in your "Whole array of possible distinct 
errors".
Not really. I want to know the difference between:
- unauthorized: my object has problems and probably needs its 
permissions fixing

- not found: I want to know why an object is indexed that doesn't exist 
and fix that

- other random error: damn, big problems with catalog, need to post to lists
In all three cases, knowing the type of error and getting a sensible 
traceback in my logs is infinitely more useful than a random...

AttributeError: None has no attribute x
...error at some point in the future, which may be no-where near the 
actual catalog search.

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


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread yuppie
Hi!
Andreas Jung wrote:
I am planning to make the release tomorrow (Saturday afternoon (German 
time :-)). So please make
your final fixes very soon or cry out loud STOP if there are any show 
stoppers.
I'd really like to see http://www.zope.org/Collectors/Zope/1460 resolved 
before the release:

1.) AFAICS this bug is easy to fix.
2.) It makes at least CMFDefault sites unusable, deterring CMF users 
from testing Zope 2.8.

I could merge the fix from the 2.7 branch myself, but I hate to check in 
code I don't understand completely. Maybe Tres or Jim can have a look at 
this? Or at least review the checkin if I do it myself?

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


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Andreas Jung

--On Freitag, 1. April 2005 11:43 Uhr +0200 yuppie 
<[EMAIL PROTECTED]> wrote:

I could merge the fix from the 2.7 branch myself, but I hate to check in
code I don't understand completely. Maybe Tres or Jim can have a look at
this? Or at least review the checkin if I do it myself?
Same here :-) If the patch is ok for people understanding the patch: go 
ahead and
merge it.

Andreas 

pgpgHmjXMoP5p.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] brain.getObject and traversal

2005-04-01 Thread Florent Guillaume
Florent Guillaume  <[EMAIL PROTECTED]> wrote:
> >> Unauthorized in getObject is out of the question, that would be new 
> >> behaviour.
> > 
> > Well, in 2.8, new behaviour is expected, right?
> > I really passionately believe that we should not be returnining None in 
> > Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see 
> > it fixed asap.
> > 
> > Any objections?
> 
> I'm ok for 2.8. I'll look at it.

Is everyone ok with returning
 - the object if it can be accessed
 - raise Unauthorized if it can't be accessed
 - raise NotFound if it's not there
and never return None ?

I'll change that before tomorrow, for 2.8a2.

(I'll change NotFound in Traversal.py to a real exception instead of a
string too, I thought we'd killed those.)

Florent

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

2005-04-01 Thread Dario Lopez-Kästen
Alan Milligan wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
| ZEO, multiple clients and processor affinity settings already offer
| this, and with no extra development needed...
|
What userland tools are you using to implement processor affinity??
Alan
schedutils. See recent thread on the zope-list for a brief discussion on 
the topic.

/dario
--
-- ---
Dario Lopez-Kästen, IT Systems & Services Chalmers University of Tech.
"...and click? damn, I need to kill -9 Word again..." - b using macosx
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yuppie wrote:

> Andreas Jung wrote:
> 
>> I am planning to make the release tomorrow (Saturday afternoon (German
>> time :-)). So please make
>> your final fixes very soon or cry out loud STOP if there are any show
>> stoppers.
> 
> I'd really like to see http://www.zope.org/Collectors/Zope/1460 resolved
> before the release:
> 
> 1.) AFAICS this bug is easy to fix.
> 
> 2.) It makes at least CMFDefault sites unusable, deterring CMF users
> from testing Zope 2.8.
> 
> I could merge the fix from the 2.7 branch myself, but I hate to check in
> code I don't understand completely. Maybe Tres or Jim can have a look at
> this? Or at least review the checkin if I do it myself?

Jim and I fixed this last week:

  http://svn.zope.org/Zope/?rev=29712&sortby=date&view=rev

I will resolve the issue.


Tres
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCTWYcGqWXf00rNCgRAmJ7AJ9Z9pwnCROMi52HPj/Zu/PCrP6Z7gCfYpOy
js/ESXDFYzn4mdoiLKiXGz4=
=q4fr
-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-Coders] RE: [Zope-dev] [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Tim Peters
[Andreas Jung]
> I am planning to make the release tomorrow (Saturday afternoon
> (German time :-)). So please make your final fixes very soon or cry out loud
> STOP if there are any show stoppers.

Barring an unexpected heart attack, an alpha-quality ZODB will be in
place for you by then.

Jim will not be able to merge his ZClasses changes in, so those will
have to wait for a later release.

All the substantive changes I needed to make were completed last
night, and the overnight test runs were successful.  I still need to
write up ZODB NEWS, fiddle the version numbers, make a 3.4a1 release
tag, and edit the svn:externals in Zope trunk to point at that tag. 
That's all very low risk, so just assume it's been done if I don't say
anything else later.
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: brain.getObject and traversal

2005-04-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Florent Guillaume wrote:
> Florent Guillaume  <[EMAIL PROTECTED]> wrote:
> 
Unauthorized in getObject is out of the question, that would be new 
behaviour.
>>>
>>>Well, in 2.8, new behaviour is expected, right?
>>>I really passionately believe that we should not be returnining None in 
>>>Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see 
>>>it fixed asap.
>>>
>>>Any objections?
>>
>>I'm ok for 2.8. I'll look at it.
> 
> 
> Is everyone ok with returning
>  - the object if it can be accessed
>  - raise Unauthorized if it can't be accessed
>  - raise NotFound if it's not there
> and never return None ?
> 
> I'll change that before tomorrow, for 2.8a2.
> 
> (I'll change NotFound in Traversal.py to a real exception instead of a
> string too, I thought we'd killed those.)

We really need to follow a deprecation-style model here:  the risk of
breaking major third party components is pretty high.

Could we use a module-scope global, settable from zope.conf, to indicate
which strategy to use?  It should (for 2.8) default to raising, but we
need to be prepared for an onslaught of breakage reports.

The CHANGELOG should highlight the change, and include the zope.conf
snippet required to restore the old behavior.  We could add a
deprecation warning (if that entry is activated), that the old-style
option would be removed in 2.10.


Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCTWhlGqWXf00rNCgRAsZ8AKChKf3YvASZ1jmJGeeN4Y3PN9/0rACbBRgi
nGNOyVocQywRINr8FnyNTHg=
=cUAs
-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 )


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread yuppie
Hi Tres!
Tres Seaver wrote:
I'd really like to see http://www.zope.org/Collectors/Zope/1460 resolved
before the release:
1.) AFAICS this bug is easy to fix.
2.) It makes at least CMFDefault sites unusable, deterring CMF users
from testing Zope 2.8.
I could merge the fix from the 2.7 branch myself, but I hate to check in
code I don't understand completely. Maybe Tres or Jim can have a look at
this? Or at least review the checkin if I do it myself?

Jim and I fixed this last week:
  http://svn.zope.org/Zope/?rev=29712&sortby=date&view=rev
I will resolve the issue.
Can't confirm that. I'm afraid you fixed something different. At least 
the changes in ZopeGuards.py didn't make it into the trunk and I see 
still the same errors.

Please test it yourself with the small script in Entry #1 of 
http://www.zope.org/Collectors/Zope/1460 or with a CMF 1.5/HEAD 
CMFDefault site.

Cheers,
Yuppie
___
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] post publishing hook

2005-04-01 Thread Florent Guillaume
I really could use a post publishing hook.
Standard use case: delay indexing at the end of the request to only do 
it once per object even if the object has been modified 4 times.

Today there's the REQUEST._hold() hack with an instance having a 
__del__, but this gets executed outside the main transaction, and 
REQUEST is already dying.

I'd like a post-publishing hook that's called in the initial REQUEST and 
transaction.

Open issues are:
1. what if there's an exception in the hook? I'd say log it but that's all.
2. what if there's a Conflicterror? That's tougher to deal with... The 
transaction has to be retried, without the user being aware of it, so it 
means the hook should probably be called *before* things are sent to the 
browser.

What do you think?
Florent
--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] post publishing hook

2005-04-01 Thread Chris McDonough
When do you think it should be called?  I just had to override
zpublisher_validated_hook to do some stuff that would have been a bit
easier if a different hook existed, but that might be a different use
case...


On Fri, 2005-04-01 at 10:48, Florent Guillaume wrote:
> I really could use a post publishing hook.
> Standard use case: delay indexing at the end of the request to only do 
> it once per object even if the object has been modified 4 times.
> 
> Today there's the REQUEST._hold() hack with an instance having a 
> __del__, but this gets executed outside the main transaction, and 
> REQUEST is already dying.
> 
> I'd like a post-publishing hook that's called in the initial REQUEST and 
> transaction.
> 
> Open issues are:
> 1. what if there's an exception in the hook? I'd say log it but that's all.
> 2. what if there's a Conflicterror? That's tougher to deal with... The 
> transaction has to be retried, without the user being aware of it, so it 
> means the hook should probably be called *before* things are sent to the 
> browser.
> 
> What do you think?
> 
> Florent

___
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] post publishing hook

2005-04-01 Thread Florent Guillaume
I didn't know about that hook, but from reading the code it seems it 
takes place before publishing, not after.

There's the recent post_traverse hook too, but that's not what I want.
Florent
Chris McDonough wrote:
When do you think it should be called?  I just had to override
zpublisher_validated_hook to do some stuff that would have been a bit
easier if a different hook existed, but that might be a different use
case...
On Fri, 2005-04-01 at 10:48, Florent Guillaume wrote:
I really could use a post publishing hook.
Standard use case: delay indexing at the end of the request to only do 
it once per object even if the object has been modified 4 times.

Today there's the REQUEST._hold() hack with an instance having a 
__del__, but this gets executed outside the main transaction, and 
REQUEST is already dying.

I'd like a post-publishing hook that's called in the initial REQUEST and 
transaction.

Open issues are:
1. what if there's an exception in the hook? I'd say log it but that's all.
2. what if there's a Conflicterror? That's tougher to deal with... The 
transaction has to be retried, without the user being aware of it, so it 
means the hook should probably be called *before* things are sent to the 
browser.

What do you think?
Florent


--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] post publishing hook

2005-04-01 Thread Florent Guillaume
Chris McDonough  <[EMAIL PROTECTED]> wrote:
> When do you think it should be called?

I should have answered that clearly:

I'd put it in ZPublisher.publish, like this:


result=mapply(object, request.args, request,
  call_object,1,
  missing_name,
  dont_publish_class,
  request, bind=1)

# INSERT HOOK CALL HERE

if result is not response:
response.setBody(result)

# OR MAYBE HERE but above is probably better

if transactions_manager:
transactions_manager.commit()

Florent


> I just had to override
> zpublisher_validated_hook to do some stuff that would have been a bit
> easier if a different hook existed, but that might be a different use
> case...
> 
> 
> On Fri, 2005-04-01 at 10:48, Florent Guillaume wrote:
> > I really could use a post publishing hook.
> > Standard use case: delay indexing at the end of the request to only do 
> > it once per object even if the object has been modified 4 times.
> > 
> > Today there's the REQUEST._hold() hack with an instance having a 
> > __del__, but this gets executed outside the main transaction, and 
> > REQUEST is already dying.
> > 
> > I'd like a post-publishing hook that's called in the initial REQUEST and 
> > transaction.
> > 
> > Open issues are:
> > 1. what if there's an exception in the hook? I'd say log it but that's all.
> > 2. what if there's a Conflicterror? That's tougher to deal with... The 
> > transaction has to be retried, without the user being aware of it, so it 
> > means the hook should probably be called *before* things are sent to the 
> > browser.
> > 
> > What do you think?
> > 
> > Florent
> 
> ___
> 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 )
> 


-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: post publishing hook

2005-04-01 Thread Christian Heimes
Florent Guillaume wrote:
I really could use a post publishing hook.
Standard use case: delay indexing at the end of the request to only do 
it once per object even if the object has been modified 4 times.
Using a post publishing hook for this use case isn't a good idea - IMO. 
The Publisher has nothing to with indexing. It's a completly different 
part of the architecture.

You want to bind some actions to the transaction system because you want 
to execute some code at the end of the first phase of the 2 phase 
commit. That's a completly different story than the post publishing 
hook. Hooking into the transaction machinery of ZODB is very easy. Write 
your own DateManager implementing the IDateManager interface and 
register it into the current transaction using get_transaction.register(DM).

For your use case overwrite the tpc_vote() method of the data manager to 
do the indexing at the boundary between the two phases.

Jens Vagenpohl's mail host and Chris McD's blob have example code for you.
Christian
___
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] post publishing hook

2005-04-01 Thread Dieter Maurer
Florent Guillaume wrote at 2005-4-1 17:48 +0200:
> ...
>Open issues are:
>1. what if there's an exception in the hook? I'd say log it but that's all.

I prefer: fail in the usual way.

>2. what if there's a Conflicterror? That's tougher to deal with... The 
>transaction has to be retried, without the user being aware of it, so it 
>means the hook should probably be called *before* things are sent to the 
>browser.

As you do it in the same transaction, you usually do it
before anything is sent to the browser (unless someone
uses "RESPONSE.write").

I would handle the post publishing hook identical to
the main request action.

-- 
Dieter
___
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] Re: brain.getObject and traversal

2005-04-01 Thread Dieter Maurer
Max M wrote at 2005-3-31 14:48 +0200:
> ...
>Most of my queries, where I need to wake up objects, has the form::
>
> brains = catalog(portal_type='Document')
> objects = []
> for brain in brains:
> try:
> obj = brain.getObject()
> if not obj is None:
> objects.append(obj)
> except:
> pass
>
>So it will not break any of my code, and I guess that most do something
>similar.

Hopefully not:

   "try: ... except: ..." is a powerful receipe to hide
   problems and to get low quality code.

   They should be used *very* rarely...

-- 
Dieter
___
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] brain.getObject and traversal

2005-04-01 Thread Dieter Maurer
Florent Guillaume wrote at 2005-4-1 13:21 +0200:
>Florent Guillaume  <[EMAIL PROTECTED]> wrote:
>> >> Unauthorized in getObject is out of the question, that would be new 
>> >> behaviour.
>> > 
>> > Well, in 2.8, new behaviour is expected, right?
>> > I really passionately believe that we should not be returnining None in 
>> > Zope 2.8, and since 2.8 hasn't quite hit beta yet I'm very keen to see 
>> > it fixed asap.
>> > 
>> > Any objections?
>> 
>> I'm ok for 2.8. I'll look at it.
>
>Is everyone ok with returning
> - the object if it can be accessed
> - raise Unauthorized if it can't be accessed
> - raise NotFound if it's not there
>and never return None ?

Remapping exceptions is a bad idea.
Usually, valuable information is lost in the process.

If you change the "returning None", then you should let
through whatever exception is caused.

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


[Zope-dev] Re: ZPT: defer expression fix

2005-04-01 Thread Evan Simpson
Christian Heimes wrote:
 * DeferWrapper didn't cache the result of the expression like ordinary 
vars do.
This was intended, though you couldn't know that since I never 
documented this.  Consider the following terrible example:


  

This should evaluate to:

  x is 0
  x is 1
  x is 2

Why??  I don't remember why I wanted this behavior; it was an 
experiment, and I can't find any code of mine that uses it.

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


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

yuppie wrote:

> Tres Seaver wrote:
> 
>>> I'd really like to see http://www.zope.org/Collectors/Zope/1460 resolved
>>> before the release:
>>>
>>> 1.) AFAICS this bug is easy to fix.
>>>
>>> 2.) It makes at least CMFDefault sites unusable, deterring CMF users
>>> from testing Zope 2.8.
>>>
>>> I could merge the fix from the 2.7 branch myself, but I hate to check in
>>> code I don't understand completely. Maybe Tres or Jim can have a look at
>>> this? Or at least review the checkin if I do it myself?
>>
>>
>>
>> Jim and I fixed this last week:
>>
>>   http://svn.zope.org/Zope/?rev=29712&sortby=date&view=rev
>>
>> I will resolve the issue.
> 
> 
> Can't confirm that. I'm afraid you fixed something different. At least
> the changes in ZopeGuards.py didn't make it into the trunk and I see
> still the same errors.
> 
> Please test it yourself with the small script in Entry #1 of
> http://www.zope.org/Collectors/Zope/1460 or with a CMF 1.5/HEAD
> CMFDefault site.

Please try the patch I just checked in:

  http://svn.zope.org/Zope/?rev=29821&sortby=date&view=rev

There may be additional issues (e.g., Stuart Bishop's "checked
__getitem__" use case), but this makes the test script and the CMF work
for me.

Tres.
- --
===
Tres Seaver[EMAIL PROTECTED]
Zope Corporation  "Zope Dealers"   http://www.zope.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCTdtEGqWXf00rNCgRAreSAJ4joVm4DHkIk5uBj6nEGqtH1jza4wCgjYf4
bfHieizFRq1pejtLWQaiN3I=
=d3ni
-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 )


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Tim Peters
[Tim Peters]
> ...
> All the substantive changes I needed to make were completed last
> night, and the overnight test runs were successful.  I still need to
> write up ZODB NEWS, fiddle the version numbers, make a 3.4a1 release
> tag, and edit the svn:externals in Zope trunk to point at that tag.
> That's all very low risk, so just assume it's been done if I don't say
> anything else later.

Still, explicit is better than implicit:  that's all been done, are
there are no remaining ZODB issues holding up release of Zope 2.8a2.
___
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] Re: post publishing hook

2005-04-01 Thread Florent Guillaume
Christian Heimes  <[EMAIL PROTECTED]> wrote:
> Florent Guillaume wrote:
> > I really could use a post publishing hook.
> > Standard use case: delay indexing at the end of the request to only do 
> > it once per object even if the object has been modified 4 times.
> 
> Using a post publishing hook for this use case isn't a good idea - IMO. 
> The Publisher has nothing to with indexing. It's a completly different 
> part of the architecture.
> 
> You want to bind some actions to the transaction system because you want 
> to execute some code at the end of the first phase of the 2 phase 
> commit. That's a completly different story than the post publishing 
> hook. Hooking into the transaction machinery of ZODB is very easy. Write 
> your own DateManager implementing the IDateManager interface and 
> register it into the current transaction using get_transaction.register(DM).
[note: s/IDateManager/IDataManager/ above]
> 
> For your use case overwrite the tpc_vote() method of the data manager to 
> do the indexing at the boundary between the two phases.
> 
> Jens Vagenpohl's mail host and Chris McD's blob have example code for you.

Ok, Tres also recommended something like that.

I was a bit concerned that there would be problems in case of conflicts,
or if there was a need to tweak the body returned to the user, but after
reading transaction's code and MailDropHost and re-re-reading
Publisher.py, I'm confident I can do everything I need.

Thanks a lot, this together with events will make things much easier in
our framework.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
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] Re: brain.getObject and traversal

2005-04-01 Thread Florent Guillaume
Tres Seaver  <[EMAIL PROTECTED]> wrote:
> > Is everyone ok with returning
> >  - the object if it can be accessed
> >  - raise Unauthorized if it can't be accessed
> >  - raise NotFound if it's not there
> > and never return None ?
> > 
> > I'll change that before tomorrow, for 2.8a2.
> > 
> > (I'll change NotFound in Traversal.py to a real exception instead of a
> > string too, I thought we'd killed those.)
> 
> We really need to follow a deprecation-style model here:  the risk of
> breaking major third party components is pretty high.
> 
> Could we use a module-scope global, settable from zope.conf, to indicate
> which strategy to use?  It should (for 2.8) default to raising, but we
> need to be prepared for an onslaught of breakage reports.
> 
> The CHANGELOG should highlight the change, and include the zope.conf
> snippet required to restore the old behavior.  We could add a
> deprecation warning (if that entry is activated), that the old-style
> option would be removed in 2.10.

Ok, thanks a lot to Tres for having gone ahead and done that. I just
merged his branch. All 5645 tests pass (man, with Zope 3 included that's
way more than before!)

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: [Zope2.8a2] ...to be released by tomorrow....

2005-04-01 Thread Andreas Jung

--On Freitag, 1. April 2005 18:44 Uhr -0500 Tim Peters 
<[EMAIL PROTECTED]> wrote:

[Tim Peters]
...
All the substantive changes I needed to make were completed last
night, and the overnight test runs were successful.  I still need to
write up ZODB NEWS, fiddle the version numbers, make a 3.4a1 release
tag, and edit the svn:externals in Zope trunk to point at that tag.
That's all very low risk, so just assume it's been done if I don't say
anything else later.
Still, explicit is better than implicit:  that's all been done, are
there are no remaining ZODB issues holding up release of Zope 2.8a2.

Excellent!
Thanks,
Andreas


pgpIUdc1BkvOR.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] OS X 10.3.8 + mount_webdav + Zope all on powerbook

2005-04-01 Thread Pavel Zaitsev
Good evening(or morning?);-),
I am just wondering if any of you have such installation, I am having 
problems with OS X because of Zope behaviour of HTTPRequest and cgi.py 
it uses for FieldStorage which in turn uses TemporaryFile. I need 
responses only from people that have OS X 10.3.8, zope 2.7+ mounted via 
mount_webdav... I wish to cross notes before nuking my installation and 
redoing the install, testing for the bug and filing it with apple.
Problem is that when using mount_webdav agains zope, mount_webdav is 
much too verbose and requests status for every entity in the directory, 
invoking HTTPRequest and thus creating at least one temporary file per 
listed. When sporradically browsing the mount point, zope comes in 
conflict with some internal locks on the filesystem access that webdav 
places...
that is speculation from my experience. Open call never returns, I have 
made tracebacks when the system stalls. Zope administrator process kill 
the instance that does not respond to however it is being queried being 
alive .. but its gone into the kernel and no threads are running, so it 
is killed off and new instance of zope satisfies the webdav request 
minuetes later ... everything comes back to life...
I think I will modify cgi.py and release a patch so it does not use disk 
based files maybe just pseudo memory files.

So please post if you run zope and os x  with webdav mount in tandem 
please...
much thanks,
pavel
___
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 )