Staging
v0.5.1
https://github.com/python/cpython
Revision a472771dadd1e17a019f5effc8877ba20d914c56 authored by Guido van Rossum on 15 January 2002, 21:14:38 UTC, committed by Guido van Rossum on 15 January 2002, 21:14:38 UTC
SF patch #471839: Bug when extensions import extensions (Shane Hathaway)

    When an extension imports another extension in its
    initXXX() function, the variable _Py_PackageContext is
    prematurely reset to NULL. If the outer extension then
    calls Py_InitModule(), the extension is installed in
    sys.modules without its package name. The
    manifestation of this bug is a "SystemError:
    _PyImport_FixupExtension: module <package>.<extension>
    not loaded".

    To fix this, importdl.c just needs to retain the old
    value of _Py_PackageContext and restore it after the
    initXXX() method is called. The attached patch does this.

    This patch applies to Python 2.1.1 and the current CVS.
1 parent e60d373
History
Tip revision: a472771dadd1e17a019f5effc8877ba20d914c56 authored by Guido van Rossum on 15 January 2002, 21:14:38 UTC
Backport revision 2.69.
Tip revision: a472771
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 79 bytes
.hgtags -rw-r--r-- 2.2 KB
LICENSE -rw-r--r-- 11.5 KB
Makefile.pre.in -rw-r--r-- 21.8 KB
README -rw-r--r-- 38.8 KB
acconfig.h -rw-r--r-- 6.3 KB
config.h.in -rw-r--r-- 17.1 KB
configure -rwxr-xr-x 181.7 KB
configure.in -rw-r--r-- 38.2 KB
install-sh -rwxr-xr-x 5.5 KB
setup.py -rw-r--r-- 25.2 KB

README

back to top