zope.i18nmessageid.Message doesn't have an interface

Bug #220122 reported by Christian Zagrodnick
2
Affects Status Importance Assigned to Milestone
Zope 3
Won't Fix
Undecided
Unassigned

Bug Description

The zope.i18nmessageid.Message class doesn't provide a specific interface.

Is this intentional? I think it should provide an interface so we don't need to do isinstance(bla, Message) any more.

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 220122] [NEW] zope.i18nmessageid.Message doesn't have an interface

On 21 Apr 2008, at 08:22 , Christian Zagrodnick wrote:
> The zope.i18nmessageid.Message class doesn't provide a specific
> interface.
>
> Is this intentional? I think it should provide an interface so we
> don't
> need to do isinstance(bla, Message) any more.

In a way it's intentional: only the C implementation is immutable and
therefore secure against manipulation further down the line. That
said, we also have a Python implementation which takes over when the C
implementation isn't available (which makes it really hard to test as
well...).

Revision history for this message
Christian Zagrodnick (zagy) wrote :
  • smime.p7s Edit (4.2 KiB, application/pkcs7-signature; name=smime.p7s)

On 21.04.2008, at 08:58, Philipp von Weitershausen wrote:
> On 21 Apr 2008, at 08:22 , Christian Zagrodnick wrote:
>> The zope.i18nmessageid.Message class doesn't provide a specific
>> interface.
>>
>> Is this intentional? I think it should provide an interface so we
>> don't
>> need to do isinstance(bla, Message) any more.
>
> In a way it's intentional: only the C implementation is immutable and
> therefore secure against manipulation further down the line. That
> said, we also have a Python implementation which takes over when the C
> implementation isn't available (which makes it really hard to test as
> well...).

Does C-Implementation mean we cannot declare an interface?

--
Christian Zagrodnick

gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

On 21 Apr 2008, at 09:17 , Christian Zagrodnick wrote:
> On 21.04.2008, at 08:58, Philipp von Weitershausen wrote:
>> On 21 Apr 2008, at 08:22 , Christian Zagrodnick wrote:
>>> The zope.i18nmessageid.Message class doesn't provide a specific
>>> interface.
>>>
>>> Is this intentional? I think it should provide an interface so we
>>> don't
>>> need to do isinstance(bla, Message) any more.
>>
>> In a way it's intentional: only the C implementation is immutable and
>> therefore secure against manipulation further down the line. That
>> said, we also have a Python implementation which takes over when
>> the C
>> implementation isn't available (which makes it really hard to test as
>> well...).
>
> Does C-Implementation mean we cannot declare an interface?

Sure we can: z.i.classImplements(Message, ISomeIface)

Revision history for this message
Christian Zagrodnick (zagy) wrote :
  • smime.p7s Edit (4.2 KiB, application/pkcs7-signature; name=smime.p7s)

On 21.04.2008, at 11:28, Philipp von Weitershausen wrote:
>
>> Does C-Implementation mean we cannot declare an interface?
>
> Sure we can: z.i.classImplements(Message, ISomeIface)

So why are we not doing this? It's still unclear to me what the
intention of not giving it an interface was.

--
Christian Zagrodnick

gocept gmbh & co. kg · forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891

Revision history for this message
Philipp von Weitershausen (philikon) wrote :

On 21 Apr 2008, at 15:08 , Christian Zagrodnick wrote:
>
> On 21.04.2008, at 11:28, Philipp von Weitershausen wrote:
>>
>>> Does C-Implementation mean we cannot declare an interface?
>>
>> Sure we can: z.i.classImplements(Message, ISomeIface)
>
>
> So why are we not doing this? It's still unclear to me what the
> intention of not giving it an interface was.

Because reimplementation is in fact undesired. We really want people
to use the immutable (and therefore secure) C implementation.

Revision history for this message
Christian Zagrodnick (zagy) wrote :

Ah, now I got it. So we'll leave everything as is. Fine with me.

Changed in zope3:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.