Re: [Zope-dev] moment when zope was started.

2005-11-08 Thread Chris Withers

Victor Safronovich wrote:

  My Product wants to replace zpublisher_validate_hook in Zope2.__init__.


Why on earth would you want to do that?!

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 )


Re[2]: [Zope-dev] moment when zope was started.

2005-11-08 Thread Victor Safronovich
Hello Chris Withers,

Tuesday, November 8, 2005, 1:26:29 PM, you wrote:

CW Why on earth would you want to do that?!
   :) my product needs to do some specific things, right after the user
   is authenticated and becomes known. hook is hook and it may be overloaded
   as with zpublisher_exception_hook.

-- 
Best regards,
 Victor Safronovich
 NauMen.NauDoc.SoftwareDeveloper  http://www.naumen.ru

___
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] moment when zope was started.

2005-11-08 Thread Tino Wildenhain

Victor Safronovich schrieb:

Hello Chris Withers,

Tuesday, November 8, 2005, 1:26:29 PM, you wrote:

CW Why on earth would you want to do that?!
   :) my product needs to do some specific things, right after the user
   is authenticated and becomes known. hook is hook and it may be overloaded
   as with zpublisher_exception_hook.


You might want to look at userfolder implementation, for example PAS.
___
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[2]: [Zope-dev] moment when zope was started.

2005-11-08 Thread Victor Safronovich
Hello Tino Wildenhain,

Tuesday, November 8, 2005, 4:29:39 PM, you wrote:

TW You might want to look at userfolder implementation, for example PAS.
Thank you, i look at it, but this is another story ;).

-- 
Best regards,
 Victor Safronovich
 NauMen.NauDoc.SoftwareDeveloper  http://www.naumen.ru

___
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] moment when zope was started.

2005-11-08 Thread Tino Wildenhain

Victor Safronovich schrieb:

Hello Tino Wildenhain,

Tuesday, November 8, 2005, 4:29:39 PM, you wrote:

TW You might want to look at userfolder implementation, for example PAS.
Thank you, i look at it, but this is another story ;).


Now you should tell us what you are really doing here :-)
___
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[2]: [Zope-dev] moment when zope was started.

2005-11-08 Thread Victor Safronovich
Hello Tino Wildenhain,

Tuesday, November 8, 2005, 5:56:25 PM, you wrote:

TW Now you should tell us what you are really doing here :-)
Subject: Re: [Zope-dev] moment when zope was started.
   /\
 want to know   |
  -/


  
-- 
Best regards,
 Victor Safronovich
 NauMen.NauDoc.SoftwareDeveloper  http://www.naumen.ru

___
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: Re[2]: [Zope-dev] moment when zope was started.

2005-11-08 Thread Lennart Regebro
On 11/8/05, Victor Safronovich [EMAIL PROTECTED] wrote:
 Hello Tino Wildenhain,

 Tuesday, November 8, 2005, 5:56:25 PM, you wrote:

 TW Now you should tell us what you are really doing here :-)
 Subject: Re: [Zope-dev] moment when zope was started.
/\
  want to know   |

Yeah, but he asked for what you are trying to do, not what you want to
know. We can't help you if we don't know what you are trying to do.
___
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] commit(1) in ZCatalog

2005-11-08 Thread Chris Withers

Hi All,

ZCatalog still contains a commit(1) at around line 589 of ZCatalog.py, 
which is causing the familiar 'Savepoints unsupported' error for us :-(


Would there be any problem changing this to a savepoint(optimistic=True) 
on the 2.8 branch and trunk?


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 )


Re: [Zope-dev] commit(1) in ZCatalog

2005-11-08 Thread Tim Peters
[Chris Withers]
 ZCatalog still contains a commit(1) at around line 589 of ZCatalog.py,
 which is causing the familiar 'Savepoints unsupported' error for us :-(

 Would there be any problem changing this to a savepoint(optimistic=True)
 on the 2.8 branch and trunk?

There shouldn't be any problem -- go for it.  I see that the 2.8
branch already uses transaction.savepoint() here, but should probably
use transaction.savepoint(optimistic=True) instead.

In the other direction, I see that zope/app/file/file.py still
contains two subtxn commits on 2.8 branch, but not anymore on the
trunk.  That should also be changed on 2.8 branch.
___
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] commit(1) in ZCatalog

2005-11-08 Thread Chris Withers

Tim Peters wrote:

[Chris Withers]


ZCatalog still contains a commit(1) at around line 589 of ZCatalog.py,
which is causing the familiar 'Savepoints unsupported' error for us :-(

Would there be any problem changing this to a savepoint(optimistic=True)
on the 2.8 branch and trunk?


There shouldn't be any problem -- go for it.  I see that the 2.8
branch already uses transaction.savepoint() here, but should probably
use transaction.savepoint(optimistic=True) instead.


Done.


In the other direction, I see that zope/app/file/file.py still
contains two subtxn commits on 2.8 branch, but not anymore on the
trunk.  That should also be changed on 2.8 branch.


Hmm, that smells Zope 3-ish to me, and my Zope checkout links that in by 
svn:externals, so I'll leave that for someone more Zope 3-savy...


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] buildbot failure in Zope trunk 2.4 Windows 2000 fred-win

2005-11-08 Thread buildbot
The Buildbot has detected a failed build of Zope trunk 2.4 Windows 2000 
fred-win.

Buildbot URL: http://buildbot.zope.org/

Build Reason: changes
Build Source Stamp: 1423
Blamelist: benji_york,chrisw,hdima,jens,jim,sidnei,tseaver,yuppie

BUILD FAILED: failed test

sincerely,
 -The Buildbot

___
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] commit(1) in ZCatalog

2005-11-08 Thread Tim Peters
[Chris Withers]
 ZCatalog still contains a commit(1) at around line 589 of ZCatalog.py,
 which is causing the familiar 'Savepoints unsupported' error for us :-(

 Would there be any problem changing this to a savepoint(optimistic=True)
 on the 2.8 branch and trunk?

[Tim Peters]
 There shouldn't be any problem -- go for it.  I see that the 2.8
 branch already uses transaction.savepoint() here, but should probably
 use transaction.savepoint(optimistic=True) instead.

[Chris]
 Done.

Looks good.  Thanks!

 In the other direction, I see that zope/app/file/file.py still
 contains two subtxn commits on 2.8 branch, but not anymore on the
 trunk.  That should also be changed on 2.8 branch.

 Hmm, that smells Zope 3-ish to me, and my Zope checkout links that in by
 svn:externals, so I'll leave that for someone more Zope 3-savy...

Ah, yes.  That should go away by magic then if/when someone stitches
in a newer version of whichever Zope3 2.8 branch is using.  Or not
wink.
___
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] commit(1) in ZCatalog

2005-11-08 Thread Chris Withers

Tim Peters wrote:

Ah, yes.  That should go away by magic then if/when someone stitches
in a newer version of whichever Zope3 2.8 branch is using.  Or not
wink.


...which can then cause svn:externals to blow up all our checkouts when 
we update ;-)


*wry grinz*

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] i18n:translate and tal:content should not use template domain

2005-11-08 Thread Jim Fulton


IMO, if a template an element with both i18n:translate and tal:content
and the value inserted is not a message id, the template's domain will
be used.  This seems like a bad idea.  It can hide failures to provide
message ids because everything ultimately gets a domain.  I'm working on
tools to help people see when text hasn't been internationalized and the
implicit use of of the template's domain makes these tools less useful.

Basically, the domain given in the template source applies to the source
only and shouldn't be used for data coming from elsewhere.

I propose that we should never use the templates domain when inserting data
via tal:content.  Note however, if the tal expression results in the use of the
template's example text, the templates domain should be used.

Thoughts?

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
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[4]: [Zope-dev] moment when zope was started.

2005-11-08 Thread Victor Safronovich
Hello Lennart Regebro,

Tuesday, November 8, 2005, 6:43:23 PM, you wrote:

LR Yeah, but he asked for what you are trying to do, not what you want to
LR know. We can't help you if we don't know what you are trying to do.
  Ok, i need to replace zpublisher_validate_hook with my hook.
  my hook:

def zpublisher_validated_hook( REQUEST, user ):
Zope._nau_zpublisher_validated_hook( REQUEST, user ) # old validate hook

published = self.PUBLISHED
published = getattr(published, 'im_self', published)
portal = published.getPortalObject()
if hasattr( portal, '_afterValidateHook' ):
portal._afterValidateHook( user, published, REQUEST )

_afterValidateHook do many thinks specific to the portal such as
1. Sets response charset according to the user's selected language.
2. Replaces HTML-encoded entities with their corresponding characters in the 
POST form data.
3. Changes system locale according to the portal language.

Ok, 2. and 3. can be moved to UserFolder.validate method, which PAS used.
But  1.  uses getSecurityManager through
Products.CMFCore.utils._getAuthenticatedUser   through
MembershipTool.{isAnonymousUser,getAuthenticatedMember}, and must be
executed  after  the  Zope`s  zpublisher_validate_hook  hook,  which  setted new
security manager.

-- 
Best regards,
 Victor Safronovich
 NauMen.NauDoc.SoftwareDeveloper  http://www.naumen.ru

___
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 )