-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dieter Maurer wrote: > Christian Theune wrote at 2006-12-17 11:34 +0100: >> ... >> Jupp. Is there any technical chance the we can use the deprecation mechanism >> or something like this to inform developers that they are not fully >> complying to a changed contract? >> >> Still, for me it feels like the original interface should have included this >> and I think it would be nice if we have an exit strategy for this (and >> similar) situations where the original interface was wrong. I consider >> the solution that introduce an additional interface in the long term to be >> less than optimal. (Except if someone has a good explanation that I can >> give to new developers why we made that distinction in the first place.) > > You can use the deprecation mechanism when you are ready to introduce > a new interface and deprecate the use of the old one (i.e. generate > a deprecation warning when an adapter is registered for the old interface). > > Generating a deprecation warning in the case when something does not > provide/implement features newly introduced into the interface may > be expensive: you need to explicitly check any object providing the interface > whether it truely provides the added features as well. > > We might want to implement something like version numbers for interfaces > in the future -- following the example of protocols ("HTTP/1.0" versus > "HTTP/1.1"). Then a class/instance may declare that it implements interface > "I" in version "V". > Then, we may issue deprecation warnings, when a too old interface is > used. > > Of course, adding version numbers to interfaces, is just a convention > to introduce new (but related) interfaces.
We might be able to add a 'check-adapter-compliance' option to the zope.conf, which would turn on the expensive test of conformance during registration, and raise an exception if the interface failed to supply all required names. Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFhdId+gerLs4ltQ4RAjNvAJ4ogwrQkSDlgI+XhWehnURI6oHCvgCfTSIX 1GAzH+llVlDwNPJzJ09j1+M= =xH/X -----END PGP SIGNATURE----- _______________________________________________ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com