[Zope-dev] Remove zmi_views menus from zope.file?
Uli Fouquet
uli at gnufix.de
Sun May 27 18:20:48 UTC 2012
Hi Leo,
On Sun, 27 May 2012 19:14:31 +0200 Leonardo Rochael Almeida wrote:
> Hi Uli,
>
> Not sure if you wanted to remove zope-dev from copy on purpose, but
> what we talk about below is probably of general interest...
Sorry, that wasn't intentional.
> On Sun, May 27, 2012 at 4:38 PM, Uli Fouquet <uli at gnufix.de> wrote:
>> Hi Leo,
>>
>> nice to hear from you, I hope you are well :-)
>
> I'm fine, thanks for asking! :-) Hope you're doing fine as well...
>
>> On Sun, 27 May 2012 16:16:43 +0200 Leonardo Rochael Almeida wrote:
>>
>>> IMHO:
>>>
>>> Move to a conditional include of a menu.zcml that (or include a
>>> menu.zcml file that conditionally) registers the browser menus for
>>> zmi_views and release a new minor version, declaring an extra
>>> dependency on the packages that provides zmi_views. With this, release
>>> a new minor version that will be backward compatible, due to the
>>> conditional.
>>>
>>> Then release a new major version that removes the include and the
>>> conditional. Add to README the instructions for manually including
>>> menu.zcml if this functionality is needed.
>>>
>>> If you get tired, do just one of the above :-)
>>
>> Yep, I planned in the same direction. The problem, however, is the
>> condition. The 'condition:zcml' directive, AFAICS, only asks for
>> existence of packages or features. But in the zope.file (or zmi_views)
>> case I'd have to ask for zope.app.menus.zmi_views (which wouldn't be a
>> package nor a feature).
>>
>> Furthermore if one asks for a package as condition, that could be wrong
>> as people could define a zmi_views menu elsewhere and then the
>> registrations should be included (okay, on the other hand one could tell
>> them to include the menus.zcml manually then).
>
>
> I guess we could argue that whoever provides the zmi_views menu should
> provide a respective feature.
>
>> Oh, and I haven't found out yet, which package exactly normally provides
>> the zmi_views menu. Do you know it by any chance?
>
> I tried to locate it as well, but failed. What I could discover is
> that whichever distribution provides this will likely include a <menu
> id="zmi_views" ...> directive somewhere.
>
> Since you mentioned on the grok list that previous versions of grok
> could work with zope.file, then perhaps you can search the eggs/
> directory for this directive.
>
> Good hunting, and please keep us informed.
I think it's zope.app.zcmlfiles.
Overall, I think putting the menu-related stuff into a separate
menus.zcml which is conditionally parsed if zope.app.zcmlfiles is
available should give a reasonable backwards-compatibility and could
help people that don't want the whole zope.app-dependencies as well.
In the long run it might be nice to have zmi_views-availability as a
feature, but for now we might go with that short-term solution.
Thanks for the input! I'll prepare a branch for review.
Best regards,
--
Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://mail.zope.org/pipermail/zope-dev/attachments/20120527/bb11d559/attachment.sig>
More information about the Zope-Dev
mailing list