[Python-Dev] PEP 402: Simplified Package Layout and Partitioning

Nick Coghlan ncoghlan at gmail.com
Fri Aug 12 01:36:32 CEST 2011


On Fri, Aug 12, 2011 at 4:30 AM, P.J. Eby <pje at telecommunity.com> wrote:
> At 04:39 PM 8/11/2011 +0200, Éric Araujo wrote:
>> > The resulting list (whether empty or not) is then stored in a
>> > ``sys.virtual_package_paths`` dictionary, keyed by module name.
>> This was probably said on import-sig, but here I go: yet another import
>> artifact in the sys module!  I hope we get ImportEngine in 3.3 to clean
>> up all this.
>
> Well, I rather *like* having them there, personally, vs. having to learn yet
> another API, but oh well, whatever.  AFAIK, ImportEngine isn't going to do
> away with the need for the global ones to live somewhere, at least not in
> 3.3.

And likely not for the entire 3.x series - I shudder at the thought of
the backwards incompatibility hell associated with trying to remove
them...

The point of the ImportEngine API is that the caching elements of the
import state introduce cross dependencies between various global data
structures. Code that manipulates those data structures needs to
correctly invalidate or otherwise update the state as things change. I
seem to recall a certain programming construct that is designed to
make it easier to manage interdependent data structures...

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list