Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 28065:c61ef183ce2f legacy-trunk
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.
| author | Just van Rossum <just@letterror.com> |
|---|---|
| date | Tue, 25 Feb 2003 20:25:12 +0000 |
| parents | e07b21ea3c45 |
| children | 3f90d21debe9 |
line wrap: on
line diff
--- a/Python/pythonrun.c Tue Feb 25 20:15:40 2003 +0000 +++ b/Python/pythonrun.c Tue Feb 25 20:25:12 2003 +0000 @@ -174,13 +174,13 @@ _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
