[Zope-Checkins] SVN: Zope/trunk/ Revert to the standard Zope 3 provider-expression; this is reasonable and required after the sane acquisition branch has been merged.

2008-11-28 Thread Malthe Borch
Log message for revision 93423:
  Revert to the standard Zope 3 provider-expression; this is reasonable and 
required after the sane acquisition branch has been merged.

Changed:
  U   Zope/trunk/doc/CHANGES.txt
  D   Zope/trunk/lib/python/Products/Five/browser/providerexpression.py
  U   Zope/trunk/lib/python/Products/PageTemplates/Expressions.py

-=-
Modified: Zope/trunk/doc/CHANGES.txt
===
--- Zope/trunk/doc/CHANGES.txt  2008-11-28 12:59:43 UTC (rev 93422)
+++ Zope/trunk/doc/CHANGES.txt  2008-11-28 14:06:04 UTC (rev 93423)
@@ -223,6 +223,11 @@
 
 Bugs Fixed
 
+  - After the proper introduction of parent-pointers, it's now
+wrong to acquisition-wrap content providers. We will now use
+the classic content provider expression from Zope
+3. [malthe]
+
   - Testing.ZopeTestCase: Remove quota argument from DemoStorage calls in
 preparation for ZODB 3.9.
 

Deleted: Zope/trunk/lib/python/Products/Five/browser/providerexpression.py
===
--- Zope/trunk/lib/python/Products/Five/browser/providerexpression.py   
2008-11-28 12:59:43 UTC (rev 93422)
+++ Zope/trunk/lib/python/Products/Five/browser/providerexpression.py   
2008-11-28 14:06:04 UTC (rev 93423)
@@ -1,63 +0,0 @@
-##
-#
-# Copyright (c) 2006 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED AS IS AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##
-Provider expression.
-
-import zope.event
-import zope.interface
-import zope.component
-
-from zope.tales import expressions
-from zope.contentprovider import interfaces, tales
-from zope.location.interfaces import ILocation
-
-from Acquisition.interfaces import IAcquirer
-
-class Z2ProviderExpression(expressions.StringExpr):
-zope.interface.implements(interfaces.ITALESProviderExpression)
-
-# This is mostly a copy of
-# zope.contentprovider.tales.TALESProviderExpression's __call__
-# method.
-def __call__(self, econtext):
-name = super(Z2ProviderExpression, self).__call__(econtext)
-context = econtext.vars['context']
-request = econtext.vars['request']
-view = econtext.vars['view']
-
-# Try to look up the provider.
-provider = zope.component.queryMultiAdapter(
-(context, request, view), interfaces.IContentProvider, name)
-
-# Provide a useful error message, if the provider was not found.
-if provider is None:
-raise interfaces.ContentProviderLookupError(name)
-
-# add the __name__ attribute if it implements ILocation
-if ILocation.providedBy(provider):
-provider.__name__ = name
-
-# ATTN: This is where we are different from
-# TALESProviderExpression: We support Acquisition wrapping.
-if IAcquirer.providedBy(provider):
-provider = provider.__of__(context)
-
-# Insert the data gotten from the context
-tales.addTALNamespaceData(provider, econtext)
-
-# Stage 1: Do the state update.
-zope.event.notify(interfaces.BeforeUpdateEvent(provider, request))
-provider.update()
-
-# Stage 2: Render the HTML content.
-return provider.render()

Modified: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py
===
--- Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2008-11-28 
12:59:43 UTC (rev 93422)
+++ Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2008-11-28 
14:06:04 UTC (rev 93423)
@@ -36,7 +36,7 @@
 from Acquisition import aq_base
 from zExceptions import NotFound, Unauthorized
 
-from Products.Five.browser.providerexpression import Z2ProviderExpression
+from zope.contentprovider.tales import TALESProviderExpression
 from Products.PageTemplates import ZRPythonExpr
 from Products.PageTemplates.DeferExpr import LazyExpr
 from Products.PageTemplates.GlobalTranslationService import 
getGlobalTranslationService
@@ -334,7 +334,7 @@
 e.registerType('not', NotExpr)
 e.registerType('defer', DeferExpr)
 e.registerType('lazy', LazyExpr)
-e.registerType('provider', Z2ProviderExpression)
+e.registerType('provider', TALESProviderExpression)
 e.registerBaseName('modules', SecureModuleImporter)
 return e
 

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org

Re: [Zope-dev] SVN: Sandbox/malthe/chameleon.core/src/chameleon/core/utils.py Catch all exceptions; it's not required to be able to determine length.

2008-11-28 Thread Chris Withers
Tres Seaver wrote:
 Hmm, some exceptions should never be caught (KeyboardInterrupt,
 SystemExit, ConflictError).

indeed, changing to:

except Exception:

...will do the right thing for Python = 2.5

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] deprecate http://download.zope.org/distribution

2008-11-28 Thread Martijn Faassen
Hey,

On Fri, Nov 28, 2008 at 12:12 PM, Chris Withers [EMAIL PROTECTED] wrote:
 Martijn Faassen wrote:

 It's clearly the case that people who are reading this thread know how
 to avoid download.zope.org. The people who are not reading this thread
 just get tough luck from the Zope community when their software
 doesn't work anymore.

 No, that's not quite what I said. I'm pretty sure if someone came to any
 Zope list and said download.zope.org gives me errors the nthey'd get the
 help they need.

They wouldn't, as they'd need to figure out which versions of which
packages that they depend on that are on download.zope.org should be
replaced with what other versions. That can be quite a list and costs
even experts a quite few hours to work through - we've done this with
Grok.

 Someone gettign subtle bugs because http://download.zope.org/distribution
 still exists but is filled with cruft may well not.

I'm talking about a scenario where you have *existing* software that
has been tested to work, and we suddenly break it by shutting down the
URL.

Regards,

Martijn
___
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] z3c.indexer 0.5.1

2008-11-28 Thread Dan Korostelev
Can someone release z3c.indexer 0.5.1, or give me rights to do so
myself? It has some important bugfixes and seems to be stable. Or is
there any work on this package planned to do soon? :-)

-- 
WBR, Dan Korostelev
___
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] z3c.indexer 0.5.1

2008-11-28 Thread Roger Ineichen
Hi Dan

 Betreff: [Zope-dev] z3c.indexer 0.5.1
 
 Can someone release z3c.indexer 0.5.1, or give me rights to 
 do so myself? It has some important bugfixes and seems to be 
 stable. Or is there any work on this package planned to do soon? :-)

Thanks a lot, any improvment is welcome.

I have some important changes in my workplace. I'll 
merge your changes into this work an release it
this weekend.

Regards
Roger Ineichen

 --
 WBR, Dan Korostelev

___
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] deprecate http://download.zope.org/distribution

2008-11-28 Thread Chris Withers
Martijn Faassen wrote:
 It's clearly the case that people who are reading this thread know how
 to avoid download.zope.org. The people who are not reading this thread
 just get tough luck from the Zope community when their software
 doesn't work anymore. 

No, that's not quite what I said. I'm pretty sure if someone came to any 
Zope list and said download.zope.org gives me errors the nthey'd get 
the help they need.

Someone gettign subtle bugs because 
http://download.zope.org/distribution still exists but is filled with 
cruft may well not.

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] Zope Tests: 4 OK, 2 Failed

2008-11-28 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Thu Nov 27 12:00:00 2008 UTC to Fri Nov 28 12:00:00 2008 UTC.
There were 6 messages: 6 from Zope Tests.


Test failures
-

Subject: FAILED (failures=3) : Zope-trunk Python-2.4.5 : Linux
From: Zope Tests
Date: Thu Nov 27 20:39:40 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010566.html

Subject: FAILED (failures=3) : Zope-trunk Python-2.5.2 : Linux
From: Zope Tests
Date: Thu Nov 27 20:41:10 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010567.html


Tests passed OK
---

Subject: OK : Zope-2.8 Python-2.3.7 : Linux
From: Zope Tests
Date: Thu Nov 27 20:33:39 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010562.html

Subject: OK : Zope-2.9 Python-2.4.5 : Linux
From: Zope Tests
Date: Thu Nov 27 20:35:10 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010563.html

Subject: OK : Zope-2.10 Python-2.4.5 : Linux
From: Zope Tests
Date: Thu Nov 27 20:36:40 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010564.html

Subject: OK : Zope-2.11 Python-2.4.5 : Linux
From: Zope Tests
Date: Thu Nov 27 20:38:10 EST 2008
URL: http://mail.zope.org/pipermail/zope-tests/2008-November/010565.html

___
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] How to get all URL's

2008-11-28 Thread Chris Withers
Andreas Jung wrote:
 
 huh? You have to walk through the whole folder hierarchy?1

So? With a catalog query you'll have return the *whole* catalog contents.
And if you're stupid enough to get getObject involved, then you drag 
them all into memory *and* the catalog anyway...

Chris

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


Re: [Zope] How to get all URL's

2008-11-28 Thread Chris Withers
Andreas Jung wrote:
 There is a difference pulling 500k brains out-of-the catalog compared to 
 traversing a ZODB with 500k object. I assume that the catalog solution 
 is slightly faster :)

Yes, well, you kno what they say about assumptions...

Chris

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


Re: [Zope] How to get all URL's

2008-11-28 Thread Andreas Jung

On 28.11.2008 12:56 Uhr, Chris Withers wrote:

Andreas Jung wrote:

There is a difference pulling 500k brains out-of-the catalog compared
to traversing a ZODB with 500k object. I assume that the catalog
solution is slightly faster :)


Yes, well, you kno what they say about assumptions...


ok, you want the hard facts :-)

CMF Site with subfolder containing 87k objects:

Obtaining the brains from the catalog: 25 seconds (uncached, basically 
only ZODB load operations)

Same with the ZCatalog within the ZODB cache: 1 milli second

Using ZopeFind: I stopped after 10 minutes...

ANdreas
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


Re: [Zope] How to get all URL's

2008-11-28 Thread Chris Withers
Andreas Jung wrote:
 This is a *VERY EXPENSIVE* operation  unless you use something like
 Plone or CMF and ask the portal_catalog for all objects.

How is that any less expensive?

Chris

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


Re: [Zope] How to get all URL's

2008-11-28 Thread Andreas Jung

On 28.11.2008 12:21 Uhr, Chris Withers wrote:

Andreas Jung wrote:


huh? You have to walk through the whole folder hierarchy?1


So? With a catalog query you'll have return the *whole* catalog contents.


There is a difference pulling 500k brains out-of-the catalog compared to 
traversing a ZODB with 500k object. I assume that the catalog solution 
is slightly faster :)


Andreas

--
ZOPYX Ltd.  Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK

E-Publishing, Python, Zope  Plone development, Consulting

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


Re: [Zope] How to get all URL's

2008-11-28 Thread Andreas Jung

On 28.11.2008 12:15 Uhr, Chris Withers wrote:

Andreas Jung wrote:

This is a *VERY EXPENSIVE* operation unless you use something like
Plone or CMF and ask the portal_catalog for all objects.


How is that any less expensive?




huh? You have to walk through the whole folder hierarchy?1

-aj
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[EMAIL PROTECTED]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

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


[Zope] Anyone know of a tool to restore/cleanup/reset security/role settings?

2008-11-28 Thread Ross Patterson
Does anyone know of an existing tool for restoring all security
settings/rolemaps from the ground up?  Obviously I can use rolemap.xml
where applicable and update workflow security.  I want to first restore
the Zope root to code defaults and restore the whole hierarchy to just
acquire.

I'm going to write something myself if not, but I thought I'd see if
there was anything out there.

Ross

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