[Zope-Checkins] SVN: Zope/branches/philikon-aq/ New branch for the Acquisition + __parent__ work, revising changes in the old branch.

2007-07-10 Thread Philipp von Weitershausen
Log message for revision 77679:
  New branch for the Acquisition + __parent__ work, revising changes in the old 
branch.
  

Changed:
  A   Zope/branches/philikon-aq/

-=-
Copied: Zope/branches/philikon-aq (from rev 77678, Zope/trunk)

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/philikon-aq/lib/python/Acquisition/ Merge r71220 from old branch:

2007-07-10 Thread Philipp von Weitershausen
Log message for revision 77680:
  Merge r71220 from old branch:
Warming up: Make acquisition wrappers have __parent__ in addition to 
aq_parent
(they point to the same thing).
  

Changed:
  U   Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
  U   Zope/branches/philikon-aq/lib/python/Acquisition/tests.py

-=-
Modified: Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-10 14:48:45 UTC (rev 77679)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/_Acquisition.c 
2007-07-10 15:49:42 UTC (rev 77680)
@@ -419,18 +419,27 @@
   char *name=;
 
   if (PyString_Check(oname)) name=PyString_AS_STRING(oname);
-  if (*name=='a'  name[1]=='q'  name[2]=='_')
-if ((r=Wrapper_special(self, name+3, oname)))
-  {
-   if (filter)
- switch(apply_filter(filter,OBJECT(self),oname,r,extra,orig))
-   {
-   case -1: return NULL;
-   case 1: return r;
-   }
-   else return r;
-  }
-else PyErr_Clear();
+  if ((*name=='a'  name[1]=='q'  name[2]=='_') ||
+  (strcmp(name, __parent__)==0))
+{
+  /* __parent__ is an alias to aq_parent */
+  if (strcmp(name, __parent__)==0)
+name = parent;
+  else
+name = name + 3;
+
+  if ((r=Wrapper_special(self, name, oname)))
+{
+  if (filter)
+switch(apply_filter(filter,OBJECT(self),oname,r,extra,orig))
+  {
+  case -1: return NULL;
+  case 1: return r;
+  }
+  else return r;
+}
+  else PyErr_Clear();
+}
   else if (*name=='_'  name[1]=='_'  
(strcmp(name+2,reduce__)==0 ||
 strcmp(name+2,reduce_ex__)==0 ||

Modified: Zope/branches/philikon-aq/lib/python/Acquisition/tests.py
===
--- Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-10 
14:48:45 UTC (rev 77679)
+++ Zope/branches/philikon-aq/lib/python/Acquisition/tests.py   2007-07-10 
15:49:42 UTC (rev 77680)
@@ -357,6 +357,11 @@
 ...
 AttributeError: aq_parent
 
+ c.__parent__
+Traceback (most recent call last):
+...
+AttributeError: __parent__
+
  Acquisition.aq_acquire(c, 'id')
 'unwrapped'
  Acquisition.aq_acquire(c, 'x')
@@ -533,6 +538,13 @@
  show(Acquisition.aq_self(a.b.c))
 c
 
+A wrapper's __parent__ attribute (which is equivalent to its
+aq_parent attribute) points to the Acquisition parent.
+
+ a.b.c.__parent__ == a.b.c.aq_parent
+True
+ a.b.c.__parent__ == a.b
+True
 
 
 def test__of__exception():

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-dev] Zope Tests: 5 OK

2007-07-10 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Mon Jul  9 12:00:00 2007 UTC to Tue Jul 10 12:00:00 2007 UTC.
There were 5 messages: 5 from Zope Unit Tests.


Tests passed OK
---

Subject: OK : Zope-2.7 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Mon Jul  9 21:23:24 EDT 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-July/008007.html

Subject: OK : Zope-2.8 Python-2.3.6 : Linux
From: Zope Unit Tests
Date: Mon Jul  9 21:24:55 EDT 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-July/008008.html

Subject: OK : Zope-2.9 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Jul  9 21:26:26 EDT 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-July/008009.html

Subject: OK : Zope-2.10 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Jul  9 21:27:59 EDT 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-July/008010.html

Subject: OK : Zope-trunk Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Jul  9 21:29:30 EDT 2007
URL: http://mail.zope.org/pipermail/zope-tests/2007-July/008011.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 )


[Zope] Re: how to install zope eggs

2007-07-10 Thread Christian Klinger

robert rottermann schrieb:

hi there,
I would like to install an egg that depends on zope eggs installed
(i18ndude)
this of course can easily be done with easy_install.
however afterwards non of my zope installations (and I have a number of
them on the system) are working anymore because python is picking up
some parts of the installed zope eggs.

with no-deps I can avoid installing the zope eggs but the i18ndude does
not work anymore.

how can I install zope eggs (or i18ndude that is) such that my zope
installations still work?
or phrased differently:
how can I install the zope eggs into a given zope instance?

thanks
robert


Hi Robert,

try to add i18ndude with an virtual-python install environment.
http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python
This works fine for me.

Cheers
Christian




___
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 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] APE - are there plans for a new version for higher Zopes ?

2007-07-10 Thread michael nt milne

Hi

Have been looking into running a script which would export all the file
objects and folder structure of a site out onto an area on the filesystem.
This would be a management requirement as once a week they would like to
take a copy of all the assets separate from the ZODB.

This product looks good but I realise that it only runs with Zope 2.7. Just
wondering if there is a plan at all to upgrade it simply for file system
export?

http://plone.org/products/ape/

Thanks

--
michael
___
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] grabbing the url query string

2007-07-10 Thread Jonathan


- Original Message - 
From: David Bear [EMAIL PROTECTED]

To: zope Zope@zope.org
Sent: Monday, July 09, 2007 9:05 PM
Subject: [Zope] grabbing the url query string



I would like to have a url that I can use to address a zope object
where I grab the query string and 'do something with it'. The issue is
I want to be able to do this for any/all zope objects. For example
lets say I have a zpt in my site called http://mzope.edu/zopeobject

I would like to be able to do http://mzope.edu/zopeobject?id=129292

and have a way to capture the value of 'id'..

The use case I have in mind is a set of emails where I hand out a url to a
page in a zope or plone zie that has a key or tag on it like the id
above. In one set of email id=abc, in another set the id=xyz. I want
to track 'clicks' based on which mailing generated the click. But I
want to be able to apply the 'method' to any/all zope objects.


I have heard of a pre-traversal hook called before_publishing_traverse, 
but I have never investigated or tried it (others may have more info on 
this) - I think it is used in skinning and may be adaptable to your needs.


Using 'known' methods I would approach your use case (if I understand it 
correctly) as follows:


1) set up a python script 'cntr', which tracks your clicks and then does a 
redirect to the required zope object
2) set up your urls like: 
http://mzope.edu/cntr/129292/targetfolder/targetobject


In the 'cntr' python script you will have access to a list variable, in 
REQUEST, called traverse_subpath.  Each element of the traverse_subpath 
list will be one of the url parameters that follows 'cntr' in the url.  For 
example, for the url above:


traverse_subpath = ['129292', 'targetfolder', 'targetobject']

It will be a trivial exercise to extract the counter 'id' (first element of 
list) and then reconstruct a url, for the redirect, from the remaining list 
elements.


hth

Jonathan 


___
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] APE - are there plans for a new version for higher Zopes ?

2007-07-10 Thread michael . milne

Hi

thinking along the lines of exporting file objects onto the filesystem
as their original file type so file system storage isn't quite right.
This type of issue must have come up before as it's a big managerial
concern to be able to extract all files from a site.

On 7/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

APE is dead.  Your best options are FileSystemSite, or using the CMFCore
portion of the CMF.  Both are somewhat easy to use, but neither is at all
well documented.


[EMAIL PROTECTED] wrote on 07/10/2007 06:03:15 AM:

 Hi

 Have been looking into running a script which would export all the
 file objects and folder structure of a site out onto an area on the
 filesystem. This would be a management requirement as once a week
 they would like to take a copy of all the assets separate from the ZODB.


 This product looks good but I realise that it only runs with Zope 2.
 7. Just wondering if there is a plan at all to upgrade it simply for
 file system export?

 http://plone.org/products/ape/

 Thanks

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





--
michael
___
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] APE - are there plans for a new version for higher Zopes ?

2007-07-10 Thread michael . milne

Hi

thinking along the lines of exporting file objects onto the filesystem
as their original file type so file system storage isn't quite right.
This type of issue must have come up before as it's a big managerial
concern to be able to extract all files from a site.

On 7/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

APE is dead.  Your best options are FileSystemSite, or using the CMFCore
portion of the CMF.  Both are somewhat easy to use, but neither is at all
well documented.


[EMAIL PROTECTED] wrote on 07/10/2007 06:03:15 AM:

 Hi

 Have been looking into running a script which would export all the
 file objects and folder structure of a site out onto an area on the
 filesystem. This would be a management requirement as once a week
 they would like to take a copy of all the assets separate from the ZODB.


 This product looks good but I realise that it only runs with Zope 2.
 7. Just wondering if there is a plan at all to upgrade it simply for
 file system export?

 http://plone.org/products/ape/

 Thanks

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





--
michael
___
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] Where is zope.app.workflow now?

2007-07-10 Thread Yuan HOng

Hi,

I am reading the chapter on workflow in Stephan's Zope3 developers'
handbook and would like to try the samples. However the server
wouldn't start due to the missing zope.app.workflow package. This
package seems no longer existing in the latest stable release of
zope3.

What happened to the package? How does zope3 support workflow now?

--
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
___
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 )