[Zope-Checkins] SVN: Zope/branches/andig-compositeindex/src/Products/ZCatalog/Catalog.py uniqueValuesFor check by IUniqueValueIndex.providedBy

2010-10-05 Thread Andreas Gabriel
Log message for revision 117256:
  uniqueValuesFor check by IUniqueValueIndex.providedBy
  

Changed:
  U   Zope/branches/andig-compositeindex/src/Products/ZCatalog/Catalog.py

-=-
Modified: Zope/branches/andig-compositeindex/src/Products/ZCatalog/Catalog.py
===
--- Zope/branches/andig-compositeindex/src/Products/ZCatalog/Catalog.py 
2010-10-05 18:24:36 UTC (rev 117255)
+++ Zope/branches/andig-compositeindex/src/Products/ZCatalog/Catalog.py 
2010-10-05 22:44:35 UTC (rev 117256)
@@ -24,6 +24,7 @@
 from Missing import MV
 from Persistence import Persistent
 from Products.PluginIndexes.interfaces import ILimitedResultIndex
+from Products.PluginIndexes.interfaces import IUniqueValueIndex
 from Products.PluginIndexes.interfaces import ITransposeQuery
 
 import BTrees.Length
@@ -395,11 +396,17 @@
   'attempted to uncatalog an object '
   'with a uid of %s. ' % str(uid))
 
-
 def uniqueValuesFor(self, name):
  return unique values for FieldIndex name 
-return self.getIndex(name).uniqueValues()
 
+indexes = self.indexes.keys()
+for idx in indexes:
+x = self.getIndex(idx)
+if IUniqueValueIndex.providedBy(x) and x.hasUniqueValuesFor(name):
+return x.uniqueValues(name=name)
+
+return []
+
 def hasuid(self, uid):
  return the rid if catalog contains an object with uid 
 return self.uids.get(uid)

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


[Zope-Checkins] SVN: Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/ tests added

2010-10-05 Thread Andreas Gabriel
Log message for revision 117257:
  tests added
  

Changed:
  A   
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/
  A   
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/__init__.py
  A   
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py

-=-
Added: 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/__init__.py
===
--- 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/__init__.py
  (rev 0)
+++ 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/__init__.py
  2010-10-05 22:45:20 UTC (rev 117257)
@@ -0,0 +1,15 @@
+##
+#
+# Copyright (c) 2003 Zope Foundation 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.
+#
+##
+
+# This file is needed to make this a package.

Added: 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py
===
--- 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py
(rev 0)
+++ 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/tests/testCompositeIndex.py
2010-10-05 22:45:20 UTC (rev 117257)
@@ -0,0 +1,178 @@
+import unittest
+import Zope2
+Zope2.startup()
+
+import string, random
+
+from time import time
+
+from OFS.SimpleItem import SimpleItem
+from DateTime import DateTime
+from BTrees.IIBTree import weightedIntersection
+from Products.PluginIndexes.FieldIndex.FieldIndex import FieldIndex
+from Products.PluginIndexes.KeywordIndex.KeywordIndex import KeywordIndex
+from Products.PluginIndexes.CompositeIndex.CompositeIndex import CompositeIndex
+
+
+
+states = ['published','pending','private','intranet']
+types  = ['Document','News','File','Image']
+default_pages = [True,False,False,False,False,False]
+
+
+class TestObject(object):
+
+def __init__(self, id, portal_type, review_state,is_default_page=False):
+self.id = id
+self.portal_type = portal_type
+self.review_state = review_state
+self.is_default_page = is_default_page
+
+def getPhysicalPath(self):
+return ['',self.id,]
+
+def __repr__(self):
+return  %s, %s, %s, %s  % 
(self.id,self.portal_type,self.review_state,self.is_default_page)
+
+class RandomTestObject(TestObject):
+
+def __init__(self, id):
+
+i = random.randint(0,len(types)-1)
+portal_type = types[i]
+
+i = random.randint(0,len(states)-1)
+review_state = states[i]
+
+i = random.randint(0,len(default_pages)-1)
+is_default_page = default_pages[i]
+
+
super(RandomTestObject,self).__init__(id,portal_type,review_state,is_default_page)
+
+
+class CompositeIndexTests( unittest.TestCase ):
+
+def setUp(self):
+
+self._index = CompositeIndex('comp01',extra = {'indexed_attrs': 
'is_default_page,review_state,portal_type'})
+
+self._field_indexes = ( FieldIndex('review_state'), 
FieldIndex('portal_type'), FieldIndex('is_default_page'))
+
+
+
+def _defaultSearch(self, req, expectedValues=None ):
+
+rs = None
+for index in self._field_indexes:
+r = index._apply_index(req)
+if r is not None:
+r, u = r
+w, rs = weightedIntersection(rs, r)
+if not rs:
+break
+return rs
+
+
+def _compositeSearch(self, req, expectedValues=None):
+query = self._index.make_query(req)
+rs = None
+r =  self._index._apply_index(query)
+if r is not None:
+r, u = r
+w, rs = weightedIntersection(rs, r)
+return rs
+
+
+def _populateIndexes(self, k , v):
+self._index.index_object( k, v )
+for index in self._field_indexes:
+index.index_object( k, v )
+
+
+def _clearIndexes(self):
+self._index.clear()
+for index in self._field_indexes:
+index.clear()
+
+def testPerformance(self):
+
+lengths = [10,100,1000,1,10]
+
+queries = [{  'portal_type' : { 'query': 'Document' } , 
+ 

[Zope-Checkins] SVN: Zope/branches/andig-compositeindex/ make_query, full IUniqueValueIndex support added

2010-10-05 Thread Andreas Gabriel
Log message for revision 117258:
  make_query, full IUniqueValueIndex support added
  

Changed:
  U   Zope/branches/andig-compositeindex/buildout.cfg
  U   
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/CompositeIndex.py

-=-
Modified: Zope/branches/andig-compositeindex/buildout.cfg
===
--- Zope/branches/andig-compositeindex/buildout.cfg 2010-10-05 22:45:20 UTC 
(rev 117257)
+++ Zope/branches/andig-compositeindex/buildout.cfg 2010-10-05 22:47:25 UTC 
(rev 117258)
@@ -98,6 +98,7 @@
 zope.structuredtext
 zope.tal
 zope.tales
+zope.testing
 zope.traversing
 zope.viewlet
 

Modified: 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/CompositeIndex.py
===
--- 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/CompositeIndex.py
  2010-10-05 22:45:20 UTC (rev 117257)
+++ 
Zope/branches/andig-compositeindex/src/Products/PluginIndexes/CompositeIndex/CompositeIndex.py
  2010-10-05 22:47:25 UTC (rev 117258)
@@ -16,10 +16,8 @@
 
 from Acquisition import aq_parent
 
-from Globals import DTMLFile
+from App.special_dtml import DTMLFile
 
-from time import time
-
 from BTrees.IIBTree import IIBTree, IITreeSet, IISet, union, intersection, 
difference
 from BTrees.OOBTree import OOBTree
 from BTrees.IOBTree import IOBTree
@@ -32,6 +30,7 @@
 from Products.PluginIndexes.interfaces import ITransposeQuery
 from Products.PluginIndexes.interfaces import IUniqueValueIndex
 from Products.PluginIndexes.KeywordIndex.KeywordIndex import KeywordIndex
+
 from Products.PluginIndexes.common.util import parseIndexRequest
 
 from util import PermuteKeywordList
@@ -75,7 +74,7 @@
 self._cindexes[i] = OOBTree()
 
 
-def _apply_index(self, request, cid='', type=type):
+def _apply_index(self, request, resultset=None):
  Apply the index to query parameters given in the request arg. 
 
 record = parseIndexRequest(request, self.id, self.query_options)
@@ -86,7 +85,7 @@
 for i,k in enumerate(record.keys):
 record.keys[i] = hash(k)
 
-return super(CompositeIndex,self)._apply_index(request, cid=cid, 
type=type)
+return super(CompositeIndex,self)._apply_index(request, 
resultset=resultset)
  
 operator = self.useOperator
 
@@ -113,7 +112,7 @@
 # sort from short to long sets
 rank.sort()
 
-k = None
+k = None
 for l,res in rank:
 
 k = intersection(k, res)
@@ -121,7 +120,6 @@
 if not k:
 break
 
-
 # if any operator of composite indexes is set to and
 # switch to intersecton mode
 
@@ -129,10 +127,10 @@
 set_func = union
 else:
 set_func = intersection
-
 
 rank=[]
 if set_func == intersection:
+res = None
 for key in k:
 set=self._index.get(key, IISet())
 rank.append((len(set),key))
@@ -141,13 +139,13 @@
 rank.sort()
 
 else:
+res = None
 # dummy length
 if k:
 rank = enumerate(k)
 
-res = None
+
 # collect docIds
-
 for l,key in rank:
 
 set=self._index.get(key, None)
@@ -445,6 +443,45 @@
 # This method is superceded by documentToKeyMap
 logger.warn('keyForDocument: return hashed key')
 return super(CompositeIndex,self).keyForDocument(id)
+
+
+def hasUniqueValuesFor(self, name):
+has unique values for column name
+if name in self.getComponentIndexNames():
+return 1
+else:
+return 0
+
+def uniqueValues(self, name=None, withLengths=0):
+returns the unique values for name
+
+if withLengths is true, returns a sequence of
+tuples of (value, length)
+
+
+# default: return unique values from first component
+
+if name is None:
+name = self.getComponentIndexNames()[0]
+
+if self._cindexes.has_key(name):
+index = self._cindexes[name]
+else:
+return []
+
+if not withLengths:
+return tuple(index.keys())
+else:
+rl=[]
+for i in index.keys():
+set = index[i]
+if isinstance(set, int):
+l = 1
+else:
+l = len(set)
+rl.append((i, l))
+return tuple(rl)
+
 
 def documentToKeyMap(self):
 logger.warn('documentToKeyMap: return hashed key map')
@@ -466,56 +503,43 @@
 
 cquery = query.copy()
 
-catalog = aq_parent(self)
-
-indexes = catalog.indexes

Re: [Zope-dev] Developer meeting next Tuesday at 15:00 UTC

2010-10-05 Thread Charlie Clark
Am 05.10.2010, 07:44 Uhr, schrieb Christian Theune c...@gocept.com:

 Me bad. My scheduling isn't good enough it seems. I need to be on the
 road at 3pm UTC today and won't be there. :/
 Charlie?

Shit. I have a doctor's appointment at 13:00 UTC. I hope I am back in time  
but if not can I ask Adam to step in?

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope Tests: 40 OK, 8 Failed

2010-10-05 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list.
Period Mon Oct  4 12:00:00 2010 UTC to Tue Oct  5 12:00:00 2010 UTC.
There were 48 messages: 6 from Zope Tests, 4 from buildbot at pov.lt, 20 from 
buildbot at winbot.zope.org, 11 from ccomb at free.fr, 7 from jdriessen at 
thehealthagency.com.


Test failures
-

Subject: FAILED : winbot / ztk_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 16:19:23 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021072.html

Subject: FAILED : winbot / ztk_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 16:28:28 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021073.html

Subject: FAILED : winbot / ztk_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct  4 16:37:59 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021074.html

Subject: FAILED : winbot / ztk_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 16:47:29 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021075.html

Subject: FAILED : winbot / ztk_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Mon Oct  4 16:56:38 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021076.html

Subject: FAILED : winbot / ztk_10 py_244_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:06:19 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021077.html

Subject: FAILED : Zope Buildbot / ztk_win slave-win
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:37:55 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021085.html

Subject: FAILED : winbot / zc_buildout_dev py_244_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:43:26 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021088.html


Tests passed OK
---

Subject: OK : winbot / ztk_10 py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:15:03 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021078.html

Subject: OK : winbot / ztk_10 py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:23:15 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021079.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:30:54 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021080.html

Subject: OK : winbot / ztk_10 py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:31:46 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021081.html

Subject: OK : Zope Buildbot / zope2 slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:32:47 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021082.html

Subject: OK : Zope Buildbot / zope2.12 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:36:19 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021083.html

Subject: OK : Zope Buildbot / ztk slave-ubuntu64
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:36:43 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021084.html

Subject: OK : Zope Buildbot / zope2 slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:38:10 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021086.html

Subject: OK : Zope Buildbot / ztk slave-ubuntu32
From: jdriessen at thehealthagency.com
Date: Mon Oct  4 17:42:40 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021087.html

Subject: OK : winbot / zc_buildout_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 17:54:05 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021089.html

Subject: OK : winbot / zc_buildout_dev py_265_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 18:05:33 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021090.html

Subject: OK : winbot / zc_buildout_dev py_265_win64
From: buildbot at winbot.zope.org
Date: Mon Oct  4 18:16:53 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021091.html

Subject: OK : winbot / zc_buildout_dev py_270_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 18:28:22 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021092.html

Subject: OK : winbot / zc_buildout_dev py_270_win64
From: buildbot at winbot.zope.org
Date: Mon Oct  4 18:39:38 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021093.html

Subject: OK : winbot / ZODB_dev py_254_win32
From: buildbot at winbot.zope.org
Date: Mon Oct  4 19:36:17 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021094.html

Subject: OK : ZTK 1.0 / Python2.4.6 Linux 64bit
From: ccomb at free.fr
Date: Mon Oct  4 19:42:08 EDT 2010
URL: http://mail.zope.org/pipermail/zope-tests/2010-October/021095.html

Subject: OK : ZTK 1.0 / 

Re: [Zope-dev] Developer meeting next Tuesday at 15:00 UTC

2010-10-05 Thread Christian Theune
On 10/05/2010 01:51 PM, Charlie Clark wrote:
 Am 05.10.2010, 07:44 Uhr, schrieb Christian Theunec...@gocept.com:

 Me bad. My scheduling isn't good enough it seems. I need to be on the
 road at 3pm UTC today and won't be there. :/
 Charlie?

 Shit. I have a doctor's appointment at 13:00 UTC. I hope I am back in time
 but if not can I ask Adam to step in?

Sure thing.


-- 
Christian Theune · c...@gocept.com
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Developer meeting next Tuesday at 15:00 UTC

2010-10-05 Thread Adam GROSZER
Hello Charlie,

Tuesday, October 5, 2010, 1:51:52 PM, you wrote:

CC Am 05.10.2010, 07:44 Uhr, schrieb Christian Theune c...@gocept.com:

 Me bad. My scheduling isn't good enough it seems. I need to be on the
 road at 3pm UTC today and won't be there.  
 Charlie?

CC Shit. I have a doctor's appointment at 13:00 UTC. I hope I am back in time
CC but if not can I ask Adam to step in?

Not good, renovation works are going on here...

-- 
Best regards,
 Adam GROSZERmailto:agros...@gmail.com
--
Quote of the day:
Turn your face to the sun and the shadows fall behind you. 
- Maori proverb 

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


Re: [Zope-dev] adapter registry in other systems

2010-10-05 Thread Alan Runyan
 i've read martin's article
 http://www.martinaspeli.net/articles/a-java-component-architecture,
 where he mentions that java doesn't have an equivalent of zca's adapter
 registry. The article was written in 2007, so I was wondering if this
 still holds true? What about other platforms, maybe .NET?

jure,

my understanding is that OSGi comes pretty close to the ZCA
in spirit.

http://en.wikipedia.org/wiki/OSGi

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


Re: [Zope-dev] Developer meeting next Tuesday at 15:00 UTC

2010-10-05 Thread Charlie Clark
Am 05.10.2010, 13:51 Uhr, schrieb Charlie Clark  
charlie.cl...@clark-consulting.eu:

 Shit. I have a doctor's appointment at 13:00 UTC. I hope I am back in  
 time
 but if not can I ask Adam to step in?

Okay, I made it back in one piece. In addition to any post-summit  
follow-up - and there have been very few additions to the task list(
http://wiki.zope.org/ztk/ZopeSummit2010Summary) - I'd like to talk about  
the next bug day.

See you all in half-an-hour.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting  Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] z3c.recipe.compattest

2010-10-05 Thread Jan-Jaap Driessen
Version 0.12.2 of z3c.recipe.compattest is not compatible with recent
versions of it's dependencies zc.buildout (v1.5.1), zc.recipe.egg
(v1.3.2) and z3c.recipe.scripts.

I fixed this in revision 117253. Is it OK with you to drop
compatibility with zc.buildout versions  1.5 in the next release of
z3c.recipe.compattest?

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


[Zope-dev] z3c.recipe.i18n

2010-10-05 Thread Jan-Wijbrand Kolman
Hi,

This afternoon I merged the gary-0.8.0 branch for z3c.recipe.i18n. The 
recipe now uses and depends on zc.buildout-1.5.1 features. I'd like to 
release this merge as 0.8.0 as this make it possible to move grok and 
the groktoolkit over to zc.buildout-1.5.1. I guess this is also useful 
in the light of moving the ZTK itself to zc.buildout 1.5.1 at some point.

Unless there are objections of course :)

regards, jw

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


[Zope-dev] (re)moving browser subpackage from zc.catalog?

2010-10-05 Thread Jan-Wijbrand Kolman
Hi,

Today I fixed a small bug in zc.catalog (the ftesting.zcml depended on a 
permission name that has been removed from zope.dublincore). This made 
me realize that zc.catalog contains ZMI code in the browser subpackage.

Are people still using this ZMI code from zc.catalog? Would it be an 
idea to move the ZMI code out of the package (a bit similar to how 
various zope.app.* package have been refactored)? It would make 
maintaining this package in respect to the ZTK easier.

Kind regards, jw

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


Re: [Zope-dev] (re)moving browser subpackage from zc.catalog?

2010-10-05 Thread Gediminas Paulauskas
I would like the ZMI views and zope.app dependencies be removed as
well. I think I remember even some tests fail with ztk1.0?

2010/10/5, Jan-Wijbrand Kolman janwijbr...@gmail.com:
 Hi,

 Today I fixed a small bug in zc.catalog (the ftesting.zcml depended on a
 permission name that has been removed from zope.dublincore). This made
 me realize that zc.catalog contains ZMI code in the browser subpackage.

 Are people still using this ZMI code from zc.catalog? Would it be an
 idea to move the ZMI code out of the package (a bit similar to how
 various zope.app.* package have been refactored)? It would make
 maintaining this package in respect to the ZTK easier.

 Kind regards, jw

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

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


Re: [Zope-dev] (re)moving browser subpackage from zc.catalog?

2010-10-05 Thread Gediminas Paulauskas
2010/10/5, Jan-Wijbrand Kolman janwijbr...@gmail.com:
 Hi,

 Today I fixed a small bug in zc.catalog (the ftesting.zcml depended on a
 permission name that has been removed from zope.dublincore). This made
 me realize that zc.catalog contains ZMI code in the browser subpackage.

 Are people still using this ZMI code from zc.catalog? Would it be an
 idea to move the ZMI code out of the package (a bit similar to how
 various zope.app.* package have been refactored)? It would make
 maintaining this package in respect to the ZTK easier.

 Kind regards, jw

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

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


[Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
I have a table and I am putting data into the cells using tal. I want to
bold the data under a certain condition. I tried this, but it didn't work:

td tal:content=string:${player/name}b
tal:condition=python:str(player['name']) == 'Team'name/b/td

The data (player/name) appears correctly, but when player/name='Team', the
text is not bold. After some reading, I believe what is happening is that
the tal:content tag is replacing everything between the td and the /td
tags. Is this correct? I tried this, and no bold either:

td tal:content=string:${player/GP}bGP/b/td

which supports my hypothesis about the tal:content tag.

How do I add some conditional bold effect in my table data?

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


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/05/2010 01:20 PM, Mark Phillips wrote:
 I have a table and I am putting data into the cells using tal. I want to
 bold the data under a certain condition. I tried this, but it didn't work:
 
 td tal:content=string:${player/name}b
 tal:condition=python:str(player['name']) == 'Team'name/b/td
 
 The data (player/name) appears correctly, but when player/name='Team', the
 text is not bold. After some reading, I believe what is happening is that
 the tal:content tag is replacing everything between the td and the /td
 tags. Is this correct? I tried this, and no bold either:
 
 td tal:content=string:${player/GP}bGP/b/td
 
 which supports my hypothesis about the tal:content tag.
 
 How do I add some conditional bold effect in my table data?

You are correct that 'tal:content' on a wrapper element replaces any
markup in the children.  You want to use 'tal:content' on the 'b' tag
itself, and then 'tal:omit-tag' to drop the element (but not its
contents).  See:

http://wiki.zope.org/ZPT/TALSpecification14#omit-tag


Tres.
- -- 
===
Tres Seaver  +1 540-429-0999  tsea...@palladion.com
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyrX78ACgkQ+gerLs4ltQ4tRQCfU0DN0AVeBSRg/wYjYFGcbAJL
8pUAn3x/KD8/qXdp4acpcIluuVnWvtrv
=l0+r
-END PGP SIGNATURE-

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


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Chris Withers
On 05/10/2010 18:20, Mark Phillips wrote:
 I have a table and I am putting data into the cells using tal. I want to
 bold the data under a certain condition. I tried this, but it didn't work:

 td tal:content=string:${player/name}b
 tal:condition=python:str(player['name']) == 'Team'name/b/td

 The data (player/name) appears correctly, but when player/name='Team',
 the text is not bold. After some reading, I believe what is happening is
 that the tal:content tag is replacing everything between the td and
 the /td tags. Is this correct? I tried this, and no bold either:

 td tal:content=string:${player/GP}bGP/b/td

tdb tal:content=player/GP
tal:omit-tag=python:str(player['name']) != 'Team'GP/b/td

cheers,

Chris

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


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Mark Phillips ]--
| I have a table and I am putting data into the cells using tal. I want to bold 
the data under a certain condition. I tried this,
| but it didn't work:
| 
| td tal:content=string:${player/name}b 
tal:condition=python:str(player['name']) == 'Team'name/b/td

Try using css

tddiv tal:replace=string:${player/name} tal:attributes=class 
python:test(player['name'] == 'Team', 'someboldcss', '') //td



-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Andrew Milton ]--
| +---[ Mark Phillips ]--
| | I have a table and I am putting data into the cells using tal. I want to 
bold the data under a certain condition. I tried this,
| | but it didn't work:
| | 
| | td tal:content=string:${player/name}b 
tal:condition=python:str(player['name']) == 'Team'name/b/td
| 
| Try using css
| 
| tddiv tal:replace=string:${player/name} tal:attributes=class
|  python:test(player['name'] == 'Team', 'someboldcss', '') //td

s/tal:replace/tal:content/

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton a...@theinternet.com.auwrote:

 +---[ Mark Phillips ]--
 | I have a table and I am putting data into the cells using tal. I want to
 bold the data under a certain condition. I tried this,
 | but it didn't work:
 |
 | td tal:content=string:${player/name}b
 tal:condition=python:str(player['name']) == 'Team'name/b/td

 Try using css

 tddiv tal:replace=string:${player/name} tal:attributes=class
 python:test(player['name'] == 'Team', 'someboldcss', '') //td


Is CSS preferred over using tal:omit for some reason? When would I use
tal:omit to add formatting to a table cell and when should I use CSS
instead?
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Andrew Milton
+---[ Mark Phillips ]--
| 
| 
| On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton a...@theinternet.com.au 
wrote:
| 
| +---[ Mark Phillips ]--
| | I have a table and I am putting data into the cells using tal. I want 
to bold the data under a certain condition. I tried
| this,
| | but it didn't work:
| |
| | td tal:content=string:${player/name}b 
tal:condition=python:str(player['name']) == 'Team'name/b/td
| 
| Try using css
| 
| tddiv tal:replace=string:${player/name} tal:attributes=class 
python:test(player['name'] == 'Team', 'someboldcss', '')
| //td
| 
| 
| Is CSS preferred over using tal:omit for some reason? When would I use 
tal:omit to add formatting to a table cell and when should
| I use CSS instead?

I think you want to use CSS. Later if you want to change from bold to
underlined or italics or rainbow, you can just change a CSS class,
instead of rebuilding your mark up.

-- 
Andrew Milton
a...@theinternet.com.au
___
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Need some newbie tal help

2010-10-05 Thread Mark Phillips
On Tue, Oct 5, 2010 at 10:42 AM, Andrew Milton a...@theinternet.com.auwrote:

 +---[ Mark Phillips ]--
 |
 |
 | On Tue, Oct 5, 2010 at 10:28 AM, Andrew Milton a...@theinternet.com.au
 wrote:
 |
 | +---[ Mark Phillips ]--
 | | I have a table and I am putting data into the cells using tal. I
 want to bold the data under a certain condition. I tried
 | this,
 | | but it didn't work:
 | |
 | | td tal:content=string:${player/name}b
 tal:condition=python:str(player['name']) == 'Team'name/b/td
 |
 | Try using css
 |
 | tddiv tal:replace=string:${player/name} tal:attributes=class
 python:test(player['name'] == 'Team', 'someboldcss', '')
 | //td
 |
 |
 | Is CSS preferred over using tal:omit for some reason? When would I use
 tal:omit to add formatting to a table cell and when should
 | I use CSS instead?

 I think you want to use CSS. Later if you want to change from bold to
 underlined or italics or rainbow, you can just change a CSS class,
 instead of rebuilding your mark up.

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


[Zope-CMF] CMF Tests: 4 OK

2010-10-05 Thread CMF Tests Summarizer
Summary of messages to the cmf-tests list.
Period Mon Oct  4 12:00:00 2010 UTC to Tue Oct  5 12:00:00 2010 UTC.
There were 4 messages: 4 from CMF Tests.


Tests passed OK
---

Subject: OK : CMF-2.1 Zope-2.10 Python-2.4.6 : Linux
From: CMF Tests
Date: Mon Oct  4 21:49:36 EDT 2010
URL: http://mail.zope.org/pipermail/cmf-tests/2010-October/013611.html

Subject: OK : CMF-2.1 Zope-2.11 Python-2.4.6 : Linux
From: CMF Tests
Date: Mon Oct  4 21:51:36 EDT 2010
URL: http://mail.zope.org/pipermail/cmf-tests/2010-October/013612.html

Subject: OK : CMF-2.2 Zope-2.12 Python-2.6.5 : Linux
From: CMF Tests
Date: Mon Oct  4 21:53:36 EDT 2010
URL: http://mail.zope.org/pipermail/cmf-tests/2010-October/013613.html

Subject: OK : CMF-trunk Zope-2.12 Python-2.6.5 : Linux
From: CMF Tests
Date: Mon Oct  4 21:55:37 EDT 2010
URL: http://mail.zope.org/pipermail/cmf-tests/2010-October/013614.html

___
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests