summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 58388c22d9..b469c4a625 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -265,13 +265,15 @@ Py_InitializeEx(int install_sigs)
_PyImportHooks_Init();
+ /* Initialize _warnings. */
+ _PyWarnings_Init();
+
initfsencoding();
if (install_sigs)
initsigs(); /* Signal handling stuff, including initintr() */
/* Initialize warnings. */
- _PyWarnings_Init();
if (PySys_HasWarnOptions()) {
PyObject *warnings_module = PyImport_ImportModule("warnings");
if (!warnings_module)