The encodings.latin_1 module is no longer imported at startup. Now it
is only imported when it is the filesystem encoding or the stdio encoding.
--- /dev/null
+The ``encodings.latin_1`` module is no longer imported at startup. Now it is
+only imported when it is the filesystem encoding or the stdio encoding.
init_sys_streams(PyThreadState *tstate)
{
PyObject *iomod = NULL;
- PyObject *m;
PyObject *std = NULL;
int fd;
PyObject * encoding_attr;
}
#endif
- /* Hack to avoid a nasty recursion issue when Python is invoked
- in verbose mode: pre-import the Latin-1 and UTF-8 codecs */
- if ((m = PyImport_ImportModule("encodings.utf_8")) == NULL) {
- goto error;
- }
- Py_DECREF(m);
-
- if (!(m = PyImport_ImportModule("encodings.latin_1"))) {
- goto error;
- }
- Py_DECREF(m);
-
if (!(iomod = PyImport_ImportModule("io"))) {
goto error;
}