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
Raw File
Tip revision: a472771dadd1e17a019f5effc8877ba20d914c56 authored by Guido van Rossum on 15 January 2002, 21:14:38 UTC
Backport revision 2.69.
Tip revision: a472771
.cvsignore
.purify
config.log
config.h
config.cache
config.status
Makefile
buildno
python
back to top