[Zope-dev] Breaking the dep cycle between zope.{container, filerepresentation}

Jim Fulton jim at zope.com
Wed Jul 8 06:50:35 EDT 2009


On Jul 7, 2009, at 5:15 PM, Fabio Tranchitella wrote:

> Hello,
>
> I would like to break the dep cycle between zope.container and
> zope.filerepresentation. I already prepared the two patches  
> (attached to
> this e-mail), but I'm not confident enough with the zope3 repository  
> to
> check in them without asking for comments.
>
> Is this the right way to break the dependency? I think nobody really  
> uses
> zope.filerepresentation, so transforming it into a dummy package  
> which just
> imports things from zope.container.interface is ok.


zope.filerepresentation should not depend on zope.container.  It is  
supposed to provide generic interfaces for mapping objects onto file- 
system representations. It would be best to change IRead/Write  
directory to define their attributes directly without extending  
zope.container interfaces.

I find it a bit hard to believe that there are no clients of these  
interfaces, but, if that's the case, I suggest deprecating  
zope.filerepresentation and zope.container.directory.  In that case,  
I'd just remove the dependency in zope.container on  
zope.filerepresentation.  If an application is going to use  
zope.container.directory, it will need to import  
zope.filerepresentation.interfaces itself, and it will have the  
zope.filerepresentation dependency itself. I'd add deprecation warning  
in zope.container.directory.  I wouldn't add these interfaces to  
zope.container.interfaces.

Jim

--
Jim Fulton
Zope Corporation




More information about the Zope-Dev mailing list