durusmail: durus-users: apparently random bug in durus
apparently random bug in durus
2010-06-21
2010-06-21
2010-06-21
2010-06-22
2010-06-22
2010-06-25
2010-06-25
2010-06-25
2010-06-25
2010-06-28
2010-06-28
2010-06-29
Python 2.7+ (Re: apparently random bug in durus)
2010-06-29
2010-06-28
2010-06-29
2010-06-29
2010-06-29
2010-06-29
2010-06-29
2010-06-30
2010-06-30
2010-06-30
2010-06-30
2010-06-30
2010-07-01
apparently random bug in durus
Neil Schemenauer
2010-06-29
Binger David  wrote:
> I would like this idea fine if we were not still running
> most of our sites on 2.4.  It will still be a while before we
> are ready to leave 2.4 behind.

You could have the root class loaded by __import__, checking at
runtime if it supports the 'level' keyword.  Use level=0 if it's
supported.

I wonder if changing pickle.__import__ to use level=0 would make
sense too.  The classes that Durus is pickling should all have
absolute names, right?


> It seems we could guard against this particular problem by adding
> something to the durus/__init__.py
> It does seem odd, though, to write code to detect broken installations,

Yeah, that's hokey.  My __import__ magic explained above is perhaps
not worth it too.

  Neil

reply