[Zope-dev] Re: SVN: Products.ZopeVersionControl/trunk/ Purge old zope2 Interface interfaces for Zope 2.12 compatibility.

Tres Seaver tseaver at palladion.com
Thu May 22 10:45:09 EDT 2008


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

Wichert Akkerman wrote:
> Previously Tres Seaver wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Wichert Akkerman wrote:
>>> Previously Laurence Rowe wrote:
>>>> Log message for revision 86849:
>>>>   Purge old zope2 Interface interfaces for Zope 2.12 compatibility.
>>> This change, and other, do something very dangerous: they replace the
>>> Zope2 interface with a Zope2 interface under the exact same name and
>>> location. This is bad: it wrongly makes people thing their code keeps
>>> working while they are now suddenly doing things like putting Z3
>>> interfaces in __implements__ tuples and silently changes calling
>>> conventions.
>>>
>>> If you make such changes please make sure to either change the interface
>>> name or only have it importable from another location.
>> - -1.  Anybody who still has '__implements__' in their code needs to rip
>> it out immediately, replacing it with the equivalent Z3 idioms.  Lots of
>> code has *both* idoms, which is just silly in this day and age:  the Z2
>> interfaces have been worthless for three years now (since Five landed in
>> the Z2 core in April 2005.
> 
> The fact is that right now, today, we still have code that relies on Z2
> interfaces. Not just in third party products - current Zope2 releases
> rely on Z2 interfaces in some places as well.

Only by oversight, not by design (the only one I know of is the
IStreamIterator bit in ZPublisher / ZServer).

> Some of that code has no
> Z3 alternative either. I find it very hard to believe that you want to
> silently break all that code.  Whatever happened to our N+2 deprecation
> policy.

What I want is to stop the "n*m" + 2 policy, where m is the number of
layers in the stack.  I would much prefer that everything using Zope2
interfaces breaks *noisily*, which is why I ripped the Interface module
out of the Zope2 trunk, and why the "old" names are no longer present in
the CMF trunk.

Zope 2.8 shipped with Five in the core *three years ago*:  from that
moment, the Zope2 interfaces were complete dead ends.

> If you insist on going this path we need to start adding deprecation
> warnings for the Z2 Interface class *now*.

They are already gone.

>> Plone is already going to have to do this to work with CMF trunk,
>> because the "bridge" code which provided BBB Z2 interfaces is now gone.
> 
> I've done that work on trunk already - it took a lot of work and was
> quite painful. There are probabyl still a few broken things that try to
> use Z2 interfaces.

Code which claims to be "working" with Z2 interfaces is already
crippled:  worse, it infects *other* code with that breakage.  Such code
*never* worked properly (those interfaces were never supported by the
component architecture), and was always a decoy or a booby trap.

Third party code has to make adjustments sometimes, and three years is
long enough.



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

iD8DBQFINYb1+gerLs4ltQ4RAiyTAJoDdaV4jPZ+Br6Rd+OahLuPHgbqXACg0C7V
Bt1gex4+fFwt2A7BOpVo9Kw=
=hQci
-----END PGP SIGNATURE-----


More information about the Zope-Dev mailing list