... On Wed, May 24, 2006 at 10:36:32AM +0200, Armin Rigo wrote: > As a workaround to this particular cycle, I added an import line in the > __init__ of the package.
Now that I think about it, there are a few places (including this cycle) where modules import other modules only for the side-effects of having something registered; e.g. pypy.annotation.model imports pypy.annotation.unaryop and pypy.annotation.binaryop, and pypy.rpython.rtyper imports many of the pypy.rpython.r* modules. There is the same problem with every place that uses the extregistry (currently only rctypes and some ootypesystem functions and types). Maybe we could reorganize that by moving the necessary import statements to the __init__ of the appropriate packages. It certainly looks clearer and easier to control than these import loops. (It would also require us to finally do the long-pending clean-up of dividing the 'rpython' package in two: one for the rtyper and one for the modules of stuff that RPython programs are allowed to call, e.g. rarithmetic and objectmodel.) A bientot, Armin _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
