Staging
v0.8.1
v0.8.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
Tip revision: a472771dadd1e17a019f5effc8877ba20d914c56 authored by Guido van Rossum on 15 January 2002, 21:14:38 UTC
Backport revision 2.69.
Backport revision 2.69.
Tip revision: a472771
File | Mode | Size |
---|---|---|
.cvsignore | -rw-r--r-- | 17 bytes |
abstract.c | -rw-r--r-- | 34.2 KB |
bufferobject.c | -rw-r--r-- | 11.1 KB |
cellobject.c | -rw-r--r-- | 2.3 KB |
classobject.c | -rw-r--r-- | 48.2 KB |
cobject.c | -rw-r--r-- | 3.6 KB |
complexobject.c | -rw-r--r-- | 13.9 KB |
dictobject.c | -rw-r--r-- | 33.6 KB |
fileobject.c | -rw-r--r-- | 34.0 KB |
floatobject.c | -rw-r--r-- | 17.9 KB |
frameobject.c | -rw-r--r-- | 10.0 KB |
funcobject.c | -rw-r--r-- | 8.1 KB |
intobject.c | -rw-r--r-- | 19.4 KB |
listobject.c | -rw-r--r-- | 40.5 KB |
longobject.c | -rw-r--r-- | 38.8 KB |
methodobject.c | -rw-r--r-- | 5.0 KB |
moduleobject.c | -rw-r--r-- | 5.7 KB |
object.c | -rw-r--r-- | 35.5 KB |
obmalloc.c | -rw-r--r-- | 22.2 KB |
rangeobject.c | -rw-r--r-- | 6.5 KB |
sliceobject.c | -rw-r--r-- | 4.1 KB |
stringobject.c | -rw-r--r-- | 75.6 KB |
tupleobject.c | -rw-r--r-- | 12.5 KB |
typeobject.c | -rw-r--r-- | 1.3 KB |
unicodectype.c | -rw-r--r-- | 8.5 KB |
unicodeobject.c | -rw-r--r-- | 123.3 KB |
unicodetype_db.h | -rw-r--r-- | 37.0 KB |
xxobject.c | -rw-r--r-- | 2.4 KB |
Computing file changes ...