r13367 - in archetypes.schemaextender/trunk: . archetypes/schemaextender

"David Glick" <[email protected]>
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: davisagli
Date: Mon Dec 20 00:33:12 2010
New Revision: 13367

Modified:
   archetypes.schemaextender/trunk/   (props changed)
   archetypes.schemaextender/trunk/CHANGES.txt
   archetypes.schemaextender/trunk/archetypes/schemaextender/extender.py
   archetypes.schemaextender/trunk/setup.py
Log:
merge PLIP 10778 branch

Modified: archetypes.schemaextender/trunk/CHANGES.txt
==============================================================================
--- archetypes.schemaextender/trunk/CHANGES.txt	(original)
+++ archetypes.schemaextender/trunk/CHANGES.txt	Mon Dec 20 00:33:12 2010
@@ -1,10 +1,15 @@
 Changelog
 =========
 
-2.0.4 - unreleased
-------------------
+2.1 - unreleased
+----------------
+
+* Use plone.uuid to look up content UUIDs.
+  [toutpt, davisagli]
 
-* Added example how to use ordered extenders and browser layer aware extenders [miohtama]
+* Added example of how to use ordered extenders and browser layer aware
+  extenders.
+  [miohtama]
 
 2.0.3 - 2010-07-07
 ------------------

Modified: archetypes.schemaextender/trunk/archetypes/schemaextender/extender.py
==============================================================================
--- archetypes.schemaextender/trunk/archetypes/schemaextender/extender.py	(original)
+++ archetypes.schemaextender/trunk/archetypes/schemaextender/extender.py	Mon Dec 20 00:33:12 2010
@@ -10,6 +10,7 @@
 from archetypes.schemaextender.interfaces import IExtensible
 from zope.component import adapter, getAdapters
 from zope.interface import implementer
+from plone.uuid.interfaces import IUUID
 try:
     from plone.browserlayer.utils import registered_layers
     has_plone_browserlayer = True
@@ -124,7 +125,7 @@
                 # If the object is just being created, we use its id() as a
                 # fallback. Generally the id() is not stable, as it changes
                 # with Acquisition wrappers and ZODB ghosting
-                key = context.UID() or str(id(context))
+                key = IUUID(context, str(id(context)))
                 schema = cache.get(key, None)
                 if schema is None:
                     schema = cache[key] = instanceSchemaFactory(context)

Modified: archetypes.schemaextender/trunk/setup.py
==============================================================================
--- archetypes.schemaextender/trunk/setup.py	(original)
+++ archetypes.schemaextender/trunk/setup.py	Mon Dec 20 00:33:12 2010
@@ -23,6 +23,7 @@
       zip_safe=False,
       install_requires=[
           'setuptools',
+          'plone.uuid'
       ],
       entry_points="""
       [z3c.autoinclude.plugin]

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.