[Python-Dev] PEP: Post import hooks
Phillip J. Eby
pje at telecommunity.com
Wed Jan 16 05:21:20 CET 2008
At 04:40 AM 1/16/2008 +0100, Christian Heimes wrote:
>Phillip J. Eby wrote:
> > I guess it's not right then. ;-) Though I shouldn't make fun, since it
> > turns out that my code sketch was not a correct translation of
> > peak.util.imports. (See below.)
>
>*grrrrr* I spent more than hour to find my error ...
Sorry about that - as I said, __notified__ is very much an implicit
thing in peak.util.imports.
And I believe I've also mentioned a lot of times how hard it is to
get this stuff right... :)
> > That is, module.__notified__ has to be set *before* the recursive
> > notification call. This effectively happens in peak.util.imports now,
> > except that __notified__ isn't an explicit attribute, just a side effect
> > of other module state changes.
>
>It's done. Your proposed test cases passes together with my tests. The
>ref leak tests don't show a single missing reference.
Congrats! Now all we need to do is get the authors of other lazy
import/export/whatever systems to chime in with whatever additional
invariants *they* might need... ;-)
More information about the Python-Dev
mailing list