Issue #9548: Add a minimal "_bootlocale" module that is imported by the _io module instead of the full locale module.

This commit is contained in:
Antoine Pitrou 2013-10-12 00:13:50 +02:00
parent 73abc527eb
commit fd4722cacf
6 changed files with 49 additions and 22 deletions

View file

@ -546,7 +546,7 @@ _PyIO_get_locale_module(_PyIO_State *state)
}
Py_CLEAR(state->locale_module);
}
mod = PyImport_ImportModule("locale");
mod = PyImport_ImportModule("_bootlocale");
if (mod == NULL)
return NULL;
state->locale_module = PyWeakref_NewRef(mod, NULL);