Mercurial > cpython-lru_cache-weakref
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 28064:324896b7f4e1 | 28065:c61ef183ce2f |
|---|---|
| 172 /* phase 2 of builtins */ | 172 /* phase 2 of builtins */ |
| 173 _PyImport_FixupExtension("__builtin__", "__builtin__"); | 173 _PyImport_FixupExtension("__builtin__", "__builtin__"); |
| 174 | 174 |
| 175 _PyImportHooks_Init(); | 175 _PyImportHooks_Init(); |
| 176 | 176 |
| 177 PyModule_WarningsModule = PyImport_ImportModule("warnings"); | |
| 178 | |
| 179 initsigs(); /* Signal handling stuff, including initintr() */ | 177 initsigs(); /* Signal handling stuff, including initintr() */ |
| 180 | 178 |
| 181 initmain(); /* Module __main__ */ | 179 initmain(); /* Module __main__ */ |
| 182 if (!Py_NoSiteFlag) | 180 if (!Py_NoSiteFlag) |
| 183 initsite(); /* Module site */ | 181 initsite(); /* Module site */ |
| 182 | |
| 183 PyModule_WarningsModule = PyImport_ImportModule("warnings"); | |
| 184 } | 184 } |
| 185 | 185 |
| 186 #ifdef COUNT_ALLOCS | 186 #ifdef COUNT_ALLOCS |
| 187 extern void dump_counts(void); | 187 extern void dump_counts(void); |
| 188 #endif | 188 #endif |
