[Zope-dev] Re: SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/Expressions.py Officially deprecate the BBB methods on the iterator and add a note

Tres Seaver tseaver at palladion.com
Mon May 22 16:36:22 EDT 2006


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

Philipp von Weitershausen wrote:
> Tres Seaver wrote:
> 
>>Philipp von Weitershausen wrote:
>>
>>>>Philipp von Weitershausen wrote:
>>>>
>>>>
>>>>>Tres Seaver wrote:
>>>>>
>>>>>
>>>>>>>>+    @deprecate("The 'first' method has been deprecated and will disappear "
>>>>>>>>+               "in Zope 2.12.  Use the 'start' property instead.")
>>>>>>>>    def first(self, name=None):
>>>>>>>>        if self.start:
>>>>>>>>            return True
>>>>>>>>        return not self.same_part(name, self._last, self.item)
>>>>>>>>
>>>>>>>>+    @deprecate("The 'last' method has been deprecated and will disappear "
>>>>>>>>+               "in Zope 2.12.  Use the 'end' property instead.")
>>>>>>>>    def last(self, name=None):
>>>>>>>>        if self.end:
>>>>>>>>            return True
>>>>>>>>
>>>>>>
>>>>>>I don't think deprecating 'first' and 'last' is appropriate here:  they
>>>>>>*aren't* synonyms for 'start' and 'end;  they are used to implement
>>>>>>sort-break processing.  Here is the comment from the checkin which
>>>>>>initially documented them
>>>>>>(http://mail.zope.org/pipermail/zpt/2001-December/002598.html):
>>>>>
>>>>>This sounds sensible. Thanks for the pointer. I'll undeprecate them :).
>>>>
>>>>I'll add nonetheless that neither 'first' nor 'last' nor 'nextIndex' are
>>>>required by the ZPT spec
>>>>(http://www.zope.org/Wikis/DevSite/Projects/ZPT/RepeatVariable). Hence,
>>>>Zope 3 just doesn't have them. I can still see a use case for 'first'
>>>>and 'last' which is why I'll do my best to continue to support them.
>>
>>This is a case for *expanding* what Z3 has:
> 
> 
> and expanding the spec...
> 
> 
>>it isn't "right by default", you know, especially when it comes to
>>pieces of Z2 technology which it has forked.
> 
> 
> Oh, I know. That's why I was actually going back to the spec since
> that's what counts at the end of day.
> 
> 
>>For instance, I know of several DTML fixes done since Z3 forked off
>>zope.documenttemplate: they should be "forward-ported", but may
>>languish due to lack of care.
> 
> 
> You're comparing apples and oranges. DTML was maintained in Zope 2 and
> never really needed in Zope 3. ZPT on the other hand was mostly
> maintained in Zope 3.

Not really.  It was forked, but had very little "maintenance" on either
side, actually.  The Z3 version is *known* to be missing a few features
of the Z2 version.

> Plus, the goal is to use the Zope 3 implementation
> everywhere so there must be some advantages in the Zope 3 implementation
> over the Zope 2 one... otherwise we wouldn't be doing this...

We want *one* implementation, preferably with all the advantages /
features needed by both forks.

>>ZPT is different:  is has been in heavy production use, with *lots* more
>>attention to "real world" use cases than the Z3 version would have
>>gotten until only recently.  Let's use some caution about harmonizing
>>the two.
> 
> 
> Sure. That's why I'm discussing these things here...

Yup, agreed.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEciDG+gerLs4ltQ4RAq7cAKDD1A9Gs5OgP8YiI9W9Ny/W2tksKwCgvIKp
LYflg/ttuoojtOZ1GSWxBjw=
=hfEH
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list