New submission from Eric Snow <ericsnowcurren...@gmail.com>:

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.

----------
components: Interpreter Core
messages: 158638
nosy: brett.cannon, eric.snow
priority: normal
severity: normal
status: open
title: pull some import state out of the interpreter state
versions: Python 3.3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14615>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to