Extension modules
-----------------
+- Bug #698282: Add __file__ to dynamic modules in multiple interpreters.
+
- Patch #798145: Return correct information from nl_langinfo(RADIXCHAR).
- Bug #797447: Correct confusing error message for unsupported locales.
_Py_PackageContext = oldcontext;
if (PyErr_Occurred())
return NULL;
- if (_PyImport_FixupExtension(name, pathname) == NULL)
- return NULL;
m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
if (m == NULL) {
/* Remember the filename as the __file__ attribute */
if (PyModule_AddStringConstant(m, "__file__", pathname) < 0)
PyErr_Clear(); /* Not important enough to report */
+
+ if (_PyImport_FixupExtension(name, pathname) == NULL)
+ return NULL;
if (Py_VerboseFlag)
PySys_WriteStderr(
"import %s # dynamically loaded from %s\n",