From: Marc-André Lemburg Date: Fri, 14 Feb 2003 20:25:56 +0000 (+0000) Subject: Patch for bug reported in patch #686627: import race condition in X-Git-Tag: v2.3c1~1838 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cac1c4574877e06f5e5337ac34d6a5c93c73eb3;p=python Patch for bug reported in patch #686627: import race condition in codecs registry startup. --- diff --git a/Python/codecs.c b/Python/codecs.c index ec0daf380b..f987cd1a61 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -38,7 +38,7 @@ int import_encodings(void) PyObject *mod; import_encodings_called = 1; - mod = PyImport_ImportModule("encodings"); + mod = PyImport_ImportModuleEx("encodings", NULL, NULL, NULL); if (mod == NULL) { if (PyErr_ExceptionMatches(PyExc_ImportError)) { /* Ignore ImportErrors... this is done so that