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 eric.snow
Date 2011-07-20.23:24:43
SpamBayes Score 3.7748e-07
Marked as misclassified No
Message-id <>
Several import-related sys variables are set in _PyImportHooks_Init (in Python/import.c), which is called in Python/pythonrun.c.  I have included a patch that moves that initialization from _PyImportHooks_Init to a new _SysImportState_Init function in Python/sysmodule.c, which is then called from _PyImportHooks_Init.

This may seem like an unnecessary change, but sysmodule.c is the obvious place to find the initialization of sys variables.  Other than in pythonrun.c, import.c is the only place that sys variables are set outside of sysmodule.c.

Finally, several import related projects[1] are coming up that will impact import.c and _PyImportHooks_Init specifically.  This change helps clean up import.c a little in preparation for those projects, and isolates out of import.c at least one thing that should be kept safe during any import.c refactoring.

[1] see issue #2377, PEP 402, and the GSOC import engine project.
Date User Action Args
2011-07-20 23:24:44eric.snowsetrecipients: + eric.snow
2011-07-20 23:24:44eric.snowsetmessageid: <>
2011-07-20 23:24:44eric.snowlinkissue12598 messages
2011-07-20 23:24:44eric.snowcreate