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
Modules
Python
support
Makefile -rw-r--r-- 13.0 KB
README -rw-r--r-- 1.2 KB
config.h -rw-r--r-- 12.4 KB
sleep.c -rw-r--r-- 845 bytes
unixstuff.c -rw-r--r-- 1.1 KB
unixstuff.h -rw-r--r-- 306 bytes

README

back to top