[Grok-dev] could we re-name grok.IRESTRequest to grok.IRESTLayer?

Leonardo Rochael Almeida leorochael at gmail.com
Wed Dec 17 10:34:25 EST 2008

+1 on renaming

As for deprecation, I'd rather it happened before than after 1.0. It
is common sense that APIs can change before a 1.0 and should not
change afterwards.

Cheers, Leo

On Wed, Dec 17, 2008 at 13:16, Brandon Craig Rhodes
<brandon at rhodesmill.org> wrote:
> I understand that whoever wrote the following definition in
> `grok.interfaces` was doing something that looks quite reasonable; the
> superclass is a Request-thing, so shouldn't the class also indicate that
> in its name::
>    class IRESTRequest(IHTTPRequest):
>        """REST-specific Request functionality.
>        Base Interfaces for defining REST-layers.
>        """
> But the way that an `IRESTRequest` is actually used, always, and in
> every context that I can find it used, is as a base class for a REST
> layer.  Therefore, I think that it should be renamed to `IRESTLayer`,
> and that `IRESTRequest` should be left around as a synonym to avoid
> breaking old code that has already used that name - but that the name
> should be put through deprecation, either now, or some time after 1.0.
> This would mean that definitions like the following one, from the file
> `grok/ftests/rest/rest.py'::
>    class LayerC(grok.IRESTRequest):
>        grok.restskin('c')
> would become the much more sensible::
>    class LayerC(grok.IRESTLayer):
>        grok.restskin('c')
> --
> Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

More information about the Grok-dev mailing list