[Grok-dev] Re: What would a megrok.z3cform (and a Zope2/plone.z3cform equivalent) look like?

Philipp von Weitershausen philipp at weitershausen.de
Wed Aug 6 08:56:04 EDT 2008


Wichert Akkerman wrote:
> Previously Martin Aspeli wrote:
>> Wichert Akkerman wrote:
>>> Previously Martin Aspeli wrote:
>>>> Hi Sylvain,
>>>>
>>>>>  I think megrok.z3cform would be nice,
>>>>>  So here like five.grok, we could make a five.grok.z3cform, if
>>>>> setuptools let us do so.
>>>> +1
>>>>
>>>> I'm not sure how setuptools would react if we have a five.grok egg and a 
>>>> five.grok.z3cform egg, though.
>>> Just fine. You can also use a different name for the egg, there is no
>>> mandatory relation between the name of the egg and the namespaces it
>>> uses.
>> Sure ... but five.grok has things like five.grok.components. The 
>> __init__.py in five.grok probably doesn't do the setuptools dance.
>>
>> What would happen if I had a five.grok.z3cform module (i.e. 
>> five/grok/z3cform.py) and a five.grok.z3cform package with its own modules?
> 
> if the namespace dance happens in the right __init__.py places it just
> works. If not unexpected things may happen.

It won't work because namespace package's __init__.py may not contain 
code. Imports are code (the five.grok package is supposed to provide a 
Grok-like API).

Let's stay with flat namespaces.


More information about the Grok-dev mailing list