[Zope3-dev] Persistent declarations, dead interfaces and a TypeError

Sidnei da Silva sidnei at enfoldsystems.com
Fri Feb 23 08:31:27 EST 2007


On 2/23/07, Jim Fulton <jim at zope.com> wrote:
> I think this should be handled in the declaration serialization code.
> We should arrange that when a declaration is unpickled we:
>
> - catch interfaces that can't be loaded,

Apparently when the interface "can't be loaded" it turns from a
InterfaceClass to a 'class', which doesn't conform to the iteration
protocol expected by the 'for v in sequence' in _normalizeargs. Would
detecting a standard 'class' vs 'InterfaceClass' be enough?

> - issue a warning

Not too fond of that. :)

> - replace the wayward interface with some kind of placeholder.

Like a BrokenInterfacleClass?

> This may require checking for broken objects rather than catching
> errors.
>
> This is largely hand waving, but I think the overall approach is
> sound. :)

It sounds good to me. In fact it's pretty much what I had in mind,
except for the warning.

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214


More information about the Zope3-dev mailing list