Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev
Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained``
 

Index | Next | Previous | View Flat


mh at gocept

May 14, 2009, 11:46 PM


Views: 715
Permalink
Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained``

Am 15.05.2009 um 05:32 schrieb Chris McDonough:

> Log message for revision 99961:
> - Remove a dependency on ``zope.container.contained.Contained``
> (this is a dumb base class that defines __parent__ and __name__
> as None and declares that the class implements IContained).

What's the reason behind this refactoring?
Instead of zope.container.contained.Contained the IntIds class now
depends on zope.container.interface.IContained plus it redefines the
things which are already defined in
zope.container.contained.Contained. I do not see why this is better
than using the base class.


> Changed:
> U zope.intid/trunk/CHANGES.txt
> U zope.intid/trunk/src/zope/intid/__init__.py
[...]

> Modified: zope.intid/trunk/src/zope/intid/__init__.py
> =====================================================
> --- zope.intid/trunk/src/zope/intid/__init__.py 2009-05-15 02:41:49
> UTC (rev 99960)
> +++ zope.intid/trunk/src/zope/intid/__init__.py 2009-05-15 03:31:59
> UTC (rev 99961)
> @@ -24,10 +24,9 @@
>
> import BTrees
> from persistent import Persistent
> -from ZODB.interfaces import IConnection
> from zope.component import adapter, getAllUtilitiesRegisteredFor,
> subscribers
> from zope.container.interfaces import IObjectAddedEvent,
> IObjectRemovedEvent
> -from zope.container.contained import Contained
> +from zope.container.interfaces import IContained
> from zope.event import notify
> from zope.interface import implements
> from zope.keyreference.interfaces import IKeyReference, NotYet
> @@ -37,14 +36,16 @@
> from zope.intid.interfaces import IIntIds, IIntIdEvent
> from zope.intid.interfaces import IntIdAddedEvent, IntIdRemovedEvent
>
> -class IntIds(Persistent, Contained):
> +class IntIds(Persistent):
> """This utility provides a two way mapping between objects and
> integer ids.
>
> IKeyReferences to objects are stored in the indexes.
> """
> - implements(IIntIds)
> + implements(IIntIds, IContained)
>
> + __parent__ = __name__ = None
> +
> _v_nextid = None

Yours sincerely,
--
Michael Howitz · mh[at]gocept.com · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Subject User Time
Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` mh at gocept May 14, 2009, 11:46 PM
    Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` chrism at plope May 14, 2009, 11:57 PM
        Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` fdrake at gmail May 15, 2009, 3:27 AM
        Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` faassen at startifact May 15, 2009, 4:48 AM
            Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` tseaver at palladion May 15, 2009, 10:01 AM
    Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` faassen at startifact May 15, 2009, 5:15 AM
    Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` srichter at cosmos May 15, 2009, 6:06 AM
        Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` faassen at startifact May 15, 2009, 6:55 AM
    Re: [Checkins] SVN: zope.intid/trunk/ - Remove a dependency on ``zope.container.contained.Contained`` chrism at plope May 15, 2009, 9:20 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.