Re: [Zope-dev] TreeVocabulary in zope.schema.vocabulary
Hiya, Am 24.01.2012, 18:48 Uhr, schrieb Jan-Carel Brand li...@opkode.com: I've clarified some of the docstrings and added the missing one. None have doctests, perhaps you are referring to fromDict, which gives an example dict to show the required structure. I guess that could easily be turned into a doctest, I'll look into it. No need to add doctests. It was more a comment on the docstring of one method in comparison with the others. It would be nice to expand the README here. I don't see anything about vocabs there at all, but I'm willing to add some tests. er, just because the existing documentation is pants doesn't mean it can't be improved upon! ;-) I'm still not sure about having TreeVocabulary in zope.schema if it is only going to be used with, shudder, Archetypes. On the one hand schema are theoretically dissociated from any form library and zope.form is already incomplete, on the other we try and avoid application-specific requirements in the libraries. All the more important to expand the documentation so that other libraries can benefit from the plumbing. Charlie -- Charlie Clark Managing Director Clark Consulting Research German Office Kronenstr. 27a Düsseldorf D- 40217 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 )
Re: [Zope-dev] TreeVocabulary in zope.schema.vocabulary
Hi Charlie On Wed, 2012-01-25 at 10:37 +0100, Charlie Clark wrote: Hiya, Am 24.01.2012, 18:48 Uhr, schrieb Jan-Carel Brand li...@opkode.com: I've clarified some of the docstrings and added the missing one. None have doctests, perhaps you are referring to fromDict, which gives an example dict to show the required structure. I guess that could easily be turned into a doctest, I'll look into it. No need to add doctests. It was more a comment on the docstring of one method in comparison with the others. It would be nice to expand the README here. I don't see anything about vocabs there at all, but I'm willing to add some tests. er, just because the existing documentation is pants doesn't mean it can't be improved upon! ;-) I'm still not sure about having TreeVocabulary in zope.schema if it is only going to be used with, shudder, Archetypes. It's *not* for use with Archetypes. :) That's what for example Products.ATVocabularyManager is for. I just mentioned that this is a fairly common use-case in Plone, but up to now only with Archetypes, because a zope3-component type TreeVocabulary didn't exist yet. That's why I wrote this one. On the one hand schema are theoretically dissociated from any form library and zope.form is already incomplete, on the other we try and avoid application-specific requirements in the libraries. Sure. Like SimpleVocabulary, the Treevocabulary is not dependent on any form library. In my case, I use it with z3c.form, but it could also be used with for example zope.formlib or any other form library that couples with zope.schema. All the more important to expand the documentation so that other libraries can benefit from the plumbing. I'll see what I can do. JC ___ 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] TreeVocabulary in zope.schema.vocabulary
On Wed, Jan 25, 2012 at 01:55:28AM +0200, Jan-Carel Brand wrote: On Wed, 2012-01-25 at 00:52 +0200, Marius Gedminas wrote: On Tue, Jan 24, 2012 at 07:34:03PM +0200, Jan-Carel Brand wrote: I now subclass PersistentMapping instead of SimpleVocabulary, so this is not an issue anymore. Ok. But why Persistent? None of the other vocabularies are persistent... Yeah, using PersistentMapping was a mistake, firstly because persistence is not necessary and secondly because it introduces a dependency on Persistence. ... I've changed the TreeVocabulary to subclass from PersistentDict. So the vocabulary itself now acts as a dict. So is it PersistentMapping or PersistentDict then? ;) It was first the one, and then the other :) For extra fun: one is an alias for the other in newer ZODB versions. 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. -1 because of the concerns above. Fair enough. Have your concerns been addressed properly? Thank you, yes. I'm still wondering about the possibility of ordered trees. Python 2.7 has an OrderedDict class in the collections module: http://docs.python.org/dev/whatsnew/2.7.html#pep-0372 Yes. And if I pass an OrderedDict to your .fromDict(), it will be discarded and all the items inserted into a regular dict, forgetting their original order. But anyway, I'm fine with you saying explicit ordering is not supported; it's up to the widget to sort each tree level appropriately. In the class docstring, say. ;-) And I'm -1 for subclassing PersistentMapping. It may tempt people into storing tree vocabularies in the ZODB, and then maybe even modifying them. And you have plenty of non-persistent dicts in the internal structure. I think it would be better to subclass a regular dict, and document that you ITreeVocabulary is a dict-like object by making it inherit IEnumerableMapping. Thanks for the suggestion, I did that. I've no objections remaining (other than that little thing about explicit ordering). Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream consulting and development signature.asc Description: Digital signature ___ 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] TreeVocabulary in zope.schema.vocabulary
A quick note : This quite an advanced vocabulary, why not make another package with a dependency on zope.schema ? I don't quite see the point to have that in the core. Furthermore, for the dict class in use in the vocabulary, you could add a factory class that can be overriden easily. That would allow people with OrderDict capabilities to use them without having to re-sort later on. By the way, good work on that, it's something that is often needed in advanced forms. I'll make sure to try it. Thank you for the effort. - Souheil 2012/1/25 Marius Gedminas mar...@gedmin.as: On Wed, Jan 25, 2012 at 01:55:28AM +0200, Jan-Carel Brand wrote: On Wed, 2012-01-25 at 00:52 +0200, Marius Gedminas wrote: On Tue, Jan 24, 2012 at 07:34:03PM +0200, Jan-Carel Brand wrote: I now subclass PersistentMapping instead of SimpleVocabulary, so this is not an issue anymore. Ok. But why Persistent? None of the other vocabularies are persistent... Yeah, using PersistentMapping was a mistake, firstly because persistence is not necessary and secondly because it introduces a dependency on Persistence. ... I've changed the TreeVocabulary to subclass from PersistentDict. So the vocabulary itself now acts as a dict. So is it PersistentMapping or PersistentDict then? ;) It was first the one, and then the other :) For extra fun: one is an alias for the other in newer ZODB versions. 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. -1 because of the concerns above. Fair enough. Have your concerns been addressed properly? Thank you, yes. I'm still wondering about the possibility of ordered trees. Python 2.7 has an OrderedDict class in the collections module: http://docs.python.org/dev/whatsnew/2.7.html#pep-0372 Yes. And if I pass an OrderedDict to your .fromDict(), it will be discarded and all the items inserted into a regular dict, forgetting their original order. But anyway, I'm fine with you saying explicit ordering is not supported; it's up to the widget to sort each tree level appropriately. In the class docstring, say. ;-) And I'm -1 for subclassing PersistentMapping. It may tempt people into storing tree vocabularies in the ZODB, and then maybe even modifying them. And you have plenty of non-persistent dicts in the internal structure. I think it would be better to subclass a regular dict, and document that you ITreeVocabulary is a dict-like object by making it inherit IEnumerableMapping. Thanks for the suggestion, I did that. I've no objections remaining (other than that little thing about explicit ordering). Marius Gedminas -- http://pov.lt/ -- Zope 3/BlueBream 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 ) ___ 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 - FAILED: 23, OK: 44
This is the summary for test reports received on the zope-tests list between 2012-01-24 00:00:00 UTC and 2012-01-25 00:00:00 UTC: See the footnotes for test reports of unsuccessful builds. An up-to date view of the builders is also available in our buildbot documentation: http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds Reports received [1]ZTK 1.0 / Python2.4.6 Linux 64bit [2]ZTK 1.0 / Python2.5.5 Linux 64bit ZTK 1.0 / Python2.6.7 Linux 64bit [3]ZTK 1.0dev / Python2.4.6 Linux 64bit [4]ZTK 1.0dev / Python2.5.5 Linux 64bit ZTK 1.0dev / Python2.6.7 Linux 64bit [5]ZTK 1.1 / Python2.5.5 Linux 64bit ZTK 1.1 / Python2.6.7 Linux 64bit ZTK 1.1 / Python2.7.2 Linux 64bit [6]ZTK 1.1dev / Python2.5.5 Linux 64bit ZTK 1.1dev / Python2.6.7 Linux 64bit ZTK 1.1dev / Python2.7.2 Linux 64bit Zope 3.4 KGS / Python2.4.6 64bit linux Zope 3.4 KGS / Python2.5.5 64bit linux Zope 3.4 Known Good Set / py2.4-32bit-linux Zope 3.4 Known Good Set / py2.4-64bit-linux Zope 3.4 Known Good Set / py2.5-32bit-linux Zope 3.4 Known Good Set / py2.5-64bit-linux Zope Buildbot / zope2.12-py2.6 slave-ubuntu32 Zope Buildbot / zope2.12-py2.6 slave-ubuntu64 Zope Buildbot / zope2.13-py2.6 slave-ubuntu32 Zope Buildbot / zope2.13-py2.6 slave-ubuntu64 Zope Buildbot / zope2.13-py2.7 slave-ubuntu32 Zope Buildbot / zope2.13-py2.7 slave-ubuntu64 Zope Buildbot / zope2.14-py2.6 slave-ubuntu32 Zope Buildbot / zope2.14-py2.6 slave-ubuntu64 Zope Buildbot / zope2.14-py2.7 slave-ubuntu32 Zope Buildbot / zope2.14-py2.7 slave-ubuntu64 [7]Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32 [8]Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu64 [9]Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32 [10] Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu64 [11] Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu32 [12] Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu64 [13] Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu32 [14] Zope Buildbot / zopetoolkit-1.1-py2.5 slave-ubuntu64 [15] Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu32 [16] Zope Buildbot / zopetoolkit-1.1-py2.6 slave-ubuntu64 [17] Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu32 [18] Zope Buildbot / zopetoolkit-py2.5 slave-ubuntu64 [19] Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu32 [20] Zope Buildbot / zopetoolkit-py2.6 slave-ubuntu64 Zope-2.10 Python-2.4.6 : Linux Zope-2.11 Python-2.4.6 : Linux Zope-2.12 Python-2.6.6 : Linux Zope-2.12-alltests Python-2.6.6 : Linux Zope-2.13 Python-2.6.6 : Linux Zope-2.13-alltests Python-2.6.6 : Linux Zope-trunk Python-2.6.6 : Linux Zope-trunk-alltests Python-2.6.6 : Linux winbot / ZODB_dev py_265_win32 winbot / ZODB_dev py_265_win64 winbot / ZODB_dev py_270_win32 winbot / ZODB_dev py_270_win64 [21] winbot / z3c.form_py_265_32 [22] winbot / ztk_10 py_254_win32 winbot / ztk_10 py_265_win32 winbot / ztk_10 py_265_win64 [23] winbot / ztk_11 py_254_win32 winbot / ztk_11 py_265_win32 winbot / ztk_11 py_265_win64 winbot / ztk_11 py_270_win32 winbot / ztk_11 py_270_win64 winbot / ztk_dev py_265_win32 winbot / ztk_dev py_265_win64 winbot / ztk_dev py_270_win32 winbot / ztk_dev py_270_win64 Non-OK results -- [1]FAILED ZTK 1.0 / Python2.4.6 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056736.html [2]FAILED ZTK 1.0 / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056738.html [3]FAILED ZTK 1.0dev / Python2.4.6 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056746.html [4]FAILED ZTK 1.0dev / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056748.html [5]FAILED ZTK 1.1 / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056734.html [6]FAILED ZTK 1.1dev / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-January/056745.html [7]FAILED Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu32 https://mail.zope.org/pipermail/zope-tests/2012-January/056765.html [8]FAILED Zope Buildbot / zopetoolkit-1.0-py2.4 slave-ubuntu64 https://mail.zope.org/pipermail/zope-tests/2012-January/056756.html [9]FAILED Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu32 https://mail.zope.org/pipermail/zope-tests/2012-January/056767.html [10] FAILED Zope Buildbot / zopetoolkit-1.0-py2.5 slave-ubuntu64 https://mail.zope.org/pipermail/zope-tests/2012-January/056759.html [11] FAILED Zope Buildbot / zopetoolkit-1.0-py2.6 slave-ubuntu32
Re: [Zope-dev] Zope 4 ZMI sprint report
Thank you for the sprint report. I think it is great that you are working on upgrading the ZMI. I am also turning my attention to this problem. Clearly ZMI needs an upgrade. I need an upgraded ZMI. Today I fired up my old version of ZAM. I can give you a password and url if you want to see what it looks like.My understanding is that it is a well thought out upgrade for the ZMI. Properly done with page templates, not dtml, and pluggable. It certainly looks nice. Of course it has copy, cut, delete, rename, but no create. I also did a reinstall of the ZAM demo, but it broke. Am I doing the wrong thing working on ZAM? Is that consistent with the direction others are taking on upgrading the ZMI, or should I be putting my energy elsewhere? If I am doing the right thing working on ZAM, perhaps the first thing I should do is get the install working again correctly. For that I have to get svn access from the Zope foundation. I presume Larry Rowe is the release manager for Zope 4, so he is the person who signs off on the upgrades to ZAM? Do I understand the process correctly? Is ZAM part of Zope 4? Is it the basis of the new ZMI, or is something else the new ZMI? -- Regards Christopher Lozinski Check out my iPhone apps TextFaster and EmailFaster http://textfaster.com Expect a paradigm shift. http://MyHDL.org ___ 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 )