Staging
v0.5.1
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
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-- | 22 bytes |
acceler.c | -rw-r--r-- | 3.2 KB |
assert.h | -rw-r--r-- | 405 bytes |
bitset.c | -rw-r--r-- | 949 bytes |
firstsets.c | -rw-r--r-- | 2.1 KB |
grammar.c | -rw-r--r-- | 4.6 KB |
grammar1.c | -rw-r--r-- | 1001 bytes |
intrcheck.c | -rw-r--r-- | 2.9 KB |
listnode.c | -rw-r--r-- | 983 bytes |
metagrammar.c | -rw-r--r-- | 2.1 KB |
myreadline.c | -rw-r--r-- | 2.9 KB |
node.c | -rw-r--r-- | 1.3 KB |
parser.c | -rw-r--r-- | 7.8 KB |
parser.h | -rw-r--r-- | 916 bytes |
parsetok.c | -rw-r--r-- | 3.2 KB |
pgen.c | -rw-r--r-- | 14.2 KB |
pgen.h | -rw-r--r-- | 253 bytes |
pgenmain.c | -rw-r--r-- | 3.5 KB |
printgrammar.c | -rw-r--r-- | 2.4 KB |
tokenizer.c | -rw-r--r-- | 17.4 KB |
tokenizer.h | -rw-r--r-- | 1.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...