[Zope-dev] Proposal: quit importing zope.app.schema.vocabulare in Products.Five

Tres Seaver tseaver at palladion.com
Fri Sep 18 18:46:08 EDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Hi Tres!
> 
> 
> Tres Seaver wrote:
>> I don't know what the purpose of the following checkin was:
>>
>>   http://svn.zope.org/Zope/trunk/?rev=85827&view=rev
> 
> See https://mail.zope.org/pipermail/zope-dev/2008-April/031691.html
> 
>> but the tests all pass if I rip out the import, and Zope starts.  I
>> don't know what code in Zope2 expects the ZopeVocabularyRegistry to be
>> registered.  Can you remember what needed it?
> 
> A wrong import in CMFCalendar did mask the problem, but I just fixed 
> that and now you can see some CMF tests failing if that import is 
> removed in Five.

Having tests fail becuase of a removed import-for-side-effects doesn't
give me a good feeling about the quality of the tests.

At any rate, if there is a real feature needed by Zope2 to function
correctly, then we should move it from zope.app.schema to zope.schema,
and make it possible to configure cleanly (instead of via side effects).

(Later)

OK, I have copied the ZopeVocabularyRegistry from
zope.app.schema.vocabulary into a new module, Products.Five.schema,
renaming it to Zope2VocabularyRegistry.  I arranged to get it installed
insside Five's initialize().

I updated the failing CMFDefault and CMFCalendar doctests to import and
install that registry in a new 'setUp', and clear it in 'tearDown'.

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

iD8DBQFKtA2v+gerLs4ltQ4RAi5oAKCXNuwoRQF4BxJzh2spyKrb88qayQCg2QLO
ByRVppF1cxkij17H9m8Xirc=
=cTYR
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list