This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients brett.cannon, eric.snow
Date 2012-04-18.16:32:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334766762.33.0.320325938554.issue14615@psf.upfronthosting.co.za>
In-reply-to
Content
Once the dust clears from the issue 2377 and issue 13959, we should consider what import-state-related members of PyInterpreterState (Include/pystate.h) can be removed.  This is in the interest of simplifying the interpreter state.

The most straightforward candidate is 'modules_reloading' (since reload() will likely become pure python), but we'll have to make sure we do not introduce any race conditions.

Another candidate that could probably go away, regardless of the import work, is 'modules_by_index'.  As far as I can see, there is only one use of    interp->modules_by_index in the cpython code-base: PyState_FindModule() in Python/pystate.c.  Likewise there is only one use of PyState_FindModule(): atexit_callfuncs() in Modules/atexitmodule.c.

Ultimately I'd love it if modules were also removed from the interpreter state, but doing that is not so cut-and-dry.
History
Date User Action Args
2012-04-18 16:32:42eric.snowsetrecipients: + eric.snow, brett.cannon
2012-04-18 16:32:42eric.snowsetmessageid: <1334766762.33.0.320325938554.issue14615@psf.upfronthosting.co.za>
2012-04-18 16:32:41eric.snowlinkissue14615 messages
2012-04-18 16:32:41eric.snowcreate