[Zope-dev] TreeVocabulary in zope.schema.vocabulary

Jan-Carel Brand lists at opkode.com
Tue Jan 24 11:35:49 UTC 2012


On Fri, 2012-01-20 at 13:50 +0200, Jan-Carel Brand wrote:
> Hi all
> 
> I've been working on porting the Dynatree (a dynamic tree-like) widget
> to z3c.form:
> 
> https://github.com/collective/collective.dynatree
> 
> My (temporary) fork is here:
> 
> https://github.com/syslabcom/collective.dynatree
> 
> And for this I needed a hierarchical tree-like vocabulary.
> 
> So I've created a TreeVocabulary in zope/schema/vocabulary.py, based
> upon the existing SimpleVocabulary.
> 
> Instead of fromValues or fromItems, it has fromDict, to construct the
> vocab from a dict. And the internal representation, self._terms, is a
> dictionary.
> 
> My branch is here:
> http://svn.zope.org/zope.schema/branches/jcbrand-treevocabulary/
> 
> The only changes are the new TreeVocabulary in zope/schema/vocabulary.py
> and the tests for it in zope/schema/tests/test_vocabulary.py
> 
> Can someone please take a look and give some feedback? 

Perhaps I should rephrase :)

I would like my changes to be merged with the zope.schema trunk. The
tests I've added provide 100% coverage of the TreeVocabulary code.

I would just like someone to sign it off.

Should I rather create a ticket on launchpad? Or otherwise, should I
just go ahead and merge the changes to trunk?

Thanks
JC





More information about the Zope-Dev mailing list