From: Just van Rossum Date: Tue, 25 Feb 2003 20:25:12 +0000 (+0000) Subject: Addendum to #683658: X-Git-Tag: v2.3c1~1687 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5bfba3aeb9f451599b89f6239467d485f4370b81;p=python Addendum to #683658: import warnings.py _after_ site.py has run. This ensures that site.py is again the first .py to be imported, giving it back full control over sys.path. --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 2845d24295..908bc42f6e 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -174,13 +174,13 @@ Py_Initialize(void) _PyImportHooks_Init(); - PyModule_WarningsModule = PyImport_ImportModule("warnings"); - initsigs(); /* Signal handling stuff, including initintr() */ initmain(); /* Module __main__ */ if (!Py_NoSiteFlag) initsite(); /* Module site */ + + PyModule_WarningsModule = PyImport_ImportModule("warnings"); } #ifdef COUNT_ALLOCS