Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2011-03-08 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  closed  
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  fixed   
 Keywords:  |  
+---
Changes (by esteele):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Merged.

-- 
Ticket URL: 
Plone 
Plone Enterprise Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
https://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-12-17 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|   Owner:  optilude
 Type:  PLIP|  Status:  new 
 Priority:  minor   |   Milestone:  4.1 
Component:  Infrastructure  |Keywords:  
+---

Comment(by toutpt):

 Well I have developped the MutableUUID adapter but ...

 _setUID is doing many more things than just set the UID. And I don't
 understand it.
 It's about references and I really don't know how references will be
 managed.
 So I will not update the code which use _setUID at the moment.

 There are nothing more to do to implement the plip plone.uuid,
 all plone and archetypes code is plone.uuid aware.

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-12-17 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|   Owner:  optilude
 Type:  PLIP|  Status:  new 
 Priority:  minor   |   Milestone:  4.1 
Component:  Infrastructure  |Keywords:  
+---

Comment(by toutpt):

 I have branched and fixed most of the place left without IUUID patterns

 changesets:

 Plone
 [https://dev.plone.org/plone/changeset/46374 46374]
 [https://dev.plone.org/plone/changeset/46375 46375]
 [https://dev.plone.org/plone/changeset/46376 46376]
 [https://dev.plone.org/plone/changeset/46379 46379]
 [https://dev.plone.org/plone/changeset/46381 46381]
 [https://dev.plone.org/plone/changeset/46382 46382]
 [https://dev.plone.org/plone/changeset/46387 46387]

 Archetypes
 [https://dev.plone.org/archetypes/changeset/13358 13358]
 [https://dev.plone.org/archetypes/changeset/13359 13359]
 [https://dev.plone.org/archetypes/changeset/13360 13360]
 [https://dev.plone.org/archetypes/changeset/13360 13361]
 [https://dev.plone.org/archetypes/changeset/13360 13362]

 Now we have two places where the code use _setUID. Quite hard but
 plone.uuid doesn't support this at the moment. I have discussed about this
 with Martin and here is the conclusion: We need to add a IMutableUUID
 component with a set method and implements it for Archetypes and Dexterity

 I'm working on this now

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-12-07 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|   Owner:  optilude
 Type:  PLIP|  Status:  new 
 Priority:  minor   |   Milestone:  4.1 
Component:  Infrastructure  |Keywords:  
+---

Comment(by toutpt):

 This one is done:
 ./archetypes/referencebrowserwidget/browser/view.py:return
 getattr(aq_base(item), 'UID', None)

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-10-02 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by optilude):

 As a bit of a note to self, these are some other files that may need
 updating to use the IUID() pattern:

 {{{
 ./archetypes/kss/fields.py:uid = aq_inner(self.context).UID()
 ./archetypes/referencebrowserwidget/browser/view.py:return
 getattr(aq_base(item), 'UID', None)
 ./archetypes/schemaextender/extender.py:key =
 context.UID() or str(id(context))
 ./plone/app/contentrules/handlers.py:uid_method = getattr(obj,
 'UID', None)
 ./plone/app/iterate/copier.py:new_baseline._setUID( baseline.UID()
 )
 ./plone/app/iterate/relation.py:wc.addReference(
 ref.targetUID, ref.relationship, referenceClass=ref.__class__ )
 ./plone/app/linkintegrity/info.py:deleted = set([obj.UID() for obj
 in self.getDeletedItems()])
 ./plone/app/linkintegrity/info.py:deleted.update([obj.UID() for
 obj in breaches])
 ./plone/app/linkintegrity/info.py:if source.UID() in
 deleted:
 ./Products/ATContentTypes/criteria/base.py:def _uncatalogUID(self,
 *args, **kwargs): pass
 ./Products/Marshall/namespaces/atns.py:value = getattr(instance,
 atcfg.UUID_ATTR, "")
 ./Products/Marshall/namespaces/atns.py:existing =
 getattr(instance, atcfg.UUID_ATTR, _marker)
 ./Products/Marshall/namespaces/atns.py:
 instance._setUID(at_uid)
 ./Products/TinyMCE/adapters/Upload.py:return
 self.okMessage("resolveuid/%s" % (obj.UID()))
 ./Products/TinyMCE/browser/url.py:def getPathByUID(self):
 }}}

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-10-02 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---
Description changed by optilude:

Old description:

> = Motivation =
>
> Many applications require some notion of a universally unique ID. For
> example:
>
>  * Archetypes/Kupu-style link-by-uid
>  * References to content from non-content items, e.g. tiles/portlets
>  * Disambiguation of content, e.g. in export/import scenarios
>  * Effective tokenisation of content for vocabularies and selection
> widgets
>
> Archetypes has a solution its UID() attribute, but the implementation is
> AT-specific and rather heavyweight, requiring the interaction of three
> separate catalogues (portal_catalog, reference_catalog, uid_catalog).
>
> zope.intid/five.intid provide more generic integer ids, but these are not
> universally unique and so not stable across sites.
>
> CMFUId is a similar, CMF-specific solution.
>
> This PLIP proposes a lightweight, simple UUID mechanism that is
> independent of any content implementation. The aims are to have:
>
>  * A standards-based UUID implementation, with
>  * a simple, intuitive API, and
>  * standard utility views
>
> = Assumptions =
>
> Plone wants to support content not exclusively built with Archetypes.
>
> = Proposal & Implementation =
>
>  * A small package, ''plone.uuid'', with minimal dependencies
>  * An adapter interface, ''IUUID'', to obtain a UUID for a content item.
>  * A marker interface, 'IUUIDAware', which lets types opt into an on-
> create event handler, which allocates a UUID and stores it
>  * All CMF content will be marked with this interface
>  * UUIDs are generated using the standard library ''uuid'' module
>  * The default implementation stores UUIDs in an attribute on the content
> object (an annotation would be less efficient, since it'd be in a
> separate persistent object)
>  * Some utility views are registered:
> * ''@@uuid'', a view on any ''IUUIDAware'' item returning a UUID
> * ''@@resolve-uuid'', uses sub-path traversal to look up a UUID,
> returning a path
> * ''@@redirect-to-uuid'', uses sub-path traversal to look up a UUID,
> returning a 304 response
>  * In addition, Plone should register a catalogue index and metadata
> column in ``portal_catalog`` to make it possibly to search by UUID and
> obtain a UUID from a catalogue brian
>
> = Deliverables =
>
>  * The ''plone.uuid'' package
>  * Minor changes to ''Products.CMFPlone''
>  * A migration step to add UUIDs to existing content
>  * Documentation
>
> = Risks =
>
> Potential confusion between this and the Archetypes' UID implementation.
>
> = Participants =
>
> Martin Aspeli, and hopefully others :-)
>
> = Progress =
>
>  * PLIP submitted

New description:

 = Motivation =

 Many applications require some notion of a universally unique ID. For
 example:

  * Archetypes/Kupu-style link-by-uid
  * References to content from non-content items, e.g. tiles/portlets
  * Disambiguation of content, e.g. in export/import scenarios
  * Effective tokenisation of content for vocabularies and selection
 widgets

 Archetypes has a solution its UID() attribute, but the implementation is
 AT-specific and rather heavyweight, requiring the interaction of three
 separate catalogues (portal_catalog, reference_catalog, uid_catalog).

 zope.intid/five.intid provide more generic integer ids, but these are not
 universally unique and so not stable across sites.

 CMFUId is a similar, CMF-specific solution.

 This PLIP proposes a lightweight, simple UUID mechanism that is
 independent of any content implementation. The aims are to have:

  * A standards-based UUID implementation, with
  * a simple, intuitive API, and
  * standard utility views

 = Assumptions =

 Plone wants to support content not exclusively built with Archetypes.

 = Proposal & Implementation =

  * A small package, ''plone.uuid'', with minimal dependencies
  * A package ''plone.app.uuid'' for Zope 2/Plone specific stuff
  * An adapter interface, ''IUUID'', to obtain a UUID for a content item.
  * UUIDs are generated using the standard library ''uuid'' module
  * A marker interface, 'IAttributeUUID', which lets types opt into an on-
 create event handler, which allocates a UUID and stores it
  * The default implementation stores UUIDs in an attribute on the content
 object (an annotation would be less efficient, since it'd be in a separate
 persistent object)
  * Some utility views are registered:
 * ''@@uuid'', a view on any ''IUUIDAware'' item returning a UUID
 * ''@@redirect-to-uuid'', uses sub-path traversal to look up a UUID,
 returning a 304 response
  * Archetypes is updated to support t

Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-10-02 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by optilude):

 I just wanted to address a few other comments from the review:

 "- The test code is in testing.py and tests.py, I prefer this being in a
 tests
   folder to not mess up the package root." (Rob)

 testing.py is a plone.testing (and ZTK) convention. Please see
 plone.testing for rationale.

 "- The @@redirect-to-uuid view in plone.app.uuid throws an exception if
   no UUID is provided, perhaps it should return something like a 400 Bad
   Request or a 404 Not Found instead of raising a KeyError?" (Craig)

 I think it should return a 404 (doesn't it already?) if a UUID is given
 and not found. If it isn't, that's an error, so raising an exception seems
 reasonable to me. A 404 is misleading, since the view was found, it just
 wasn't used correctly. I'm not sure anyone would know what to do with a
 400 request?

 "- The @@redirect-to-uuid view causes a redirection loop to
   @@redirect-to-uuid/None if an invalid/missing UUID is provided.
   I would expect a 404 Not Found if the UUID cannot be resolved." (Craig)

 Indeed - I'll look into this.

 "- There is a failure in archetypes.referencebrowserwidget which
   appears to be caused by some change in the PLIP #9938 buildout." (Alec)

 I'll look into this too upon merging.

 "- It is not clear to me what the purpose of the IUUIDAware interface
   is. Why aren't IUUID and IAttributeUUID be sufficient?" (Alec)

 Some views are registered on IUUIDAware, so it's a nice generic implement.
 IAttributeUUID implies a specific implementation of UUID assignment and
 storage and enables an event handler for object creation. More
 specifically: IUUIDAware applies to AT objects, but IAttributeUUID does
 not.

 "- The plone.app.uuid code is straightforward and well tested.  I would
   prefer if the utility functions defined in plone.app.uuid.utils
   followed PEP8 naming conventions." (Alec)

 If you're referring to using names_with_underscores(), then I think that
 would be wrong. The Zope/Plone convention is mixedCase(). We went through
 a lot of pain in Dexterity starting with the former and having to migrate
 to the latter as the inconsistency just became too arbitrary and
 confusing.

 "- There is a test in plone.app.uuid for a browser view defined in
   plone.uuid, this is unconventional." (Alec)

 I think this was due to difficulties in coming up with a good enough test
 fixture in plone.uuid without adding too many dependencies or assumptions.
 Or laziness. Or both. :)

 "- It would be nice to see the manage_afterAdd and manage_afterCopy
   methods in AT's Referenceable class go away in favor of an event
   based system for managing uuids.  This would bring the AT IUUID
   implementation a little closer to the default one." (Alec)

 Agree, but I think this is outside the scope of the PLIP.

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-09-28 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by optilude):

 Note: the catalog.xml in plone.app.uuid was deleted, but I forgot to 'svn
 rm' it. Sorry for the confusion!

 Martin

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-09-28 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by alecm):

 (In [40410]) One more review note.  Refs #10778

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-09-27 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by davisagli):

 The test failure in archetypes.referencebrowserwidget looks really trivial
 -- it simply uses a regexp that needs to be updated to match UIDs with
 dashes in them.

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-09-27 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---

Comment(by alecm):

 (In [40362]) Added review for PLIP 10778.  Refs #10778

-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories


Re: [PLIP-Advisories] [Plone] #10778: Standalone UUID implementation

2010-09-22 Thread Change notifications for Plone PLIPs on Trac.
#10778: Standalone UUID implementation
+---
 Reporter:  optilude|Owner:  optilude
 Type:  PLIP|   Status:  new 
 Priority:  minor   |Milestone:  4.1 
Component:  Infrastructure  |   Resolution:  
 Keywords:  |  
+---
Changes (by cah190):

 * cc: plip-advisor...@lists.plone.org (added)


-- 
Ticket URL: 
Plone 
Plone Content Management System
___
PLIP-Advisories mailing list
plip-advisor...@lists.plone.org
http://lists.plone.org/mailman/listinfo/plip-advisories