[Python-checkins] r53613 - in python/branches/bcannon-objcap: BRANCHNEWS Python/pythonrun.c
brett.cannon
python-checkins at python.org
Thu Feb 1 20:50:30 CET 2007
Author: brett.cannon
Date: Thu Feb 1 20:50:30 2007
New Revision: 53613
Modified:
python/branches/bcannon-objcap/BRANCHNEWS
python/branches/bcannon-objcap/Python/pythonrun.c
Log:
Clear sys.path_importer_cache.
Modified: python/branches/bcannon-objcap/BRANCHNEWS
==============================================================================
--- python/branches/bcannon-objcap/BRANCHNEWS (original)
+++ python/branches/bcannon-objcap/BRANCHNEWS Thu Feb 1 20:50:30 2007
@@ -8,6 +8,8 @@
Core and builtins
-----------------
+* Clear out sys.path_importer_cache.
+
* Force 'warnings' to be cached by the C code.
* Make importing the sys module after it has been completely deleted use the
Modified: python/branches/bcannon-objcap/Python/pythonrun.c
==============================================================================
--- python/branches/bcannon-objcap/Python/pythonrun.c (original)
+++ python/branches/bcannon-objcap/Python/pythonrun.c Thu Feb 1 20:50:30 2007
@@ -367,8 +367,8 @@
Incremental codecs fail.
* _codecs
Exposed by codecs.
- * warnings (hide: needs sys._getframe())
- Warnings reset otherwise.
+ * warnings (cache in C code)
+ Warnings reset otherwise. Requires 'sys' module to work.
*/
/* Get the 'warnings' module cached away at the C level. */
PyModule_GetWarningsModule();
@@ -407,6 +407,10 @@
PyDict_SetItemString(interp->modules, ".hidden", hidden_modules);
PyDict_SetItemString(interp->sysdict, "modules", interp->modules);
+
+ /* Clear out sys.path_importer_cache. */
+ PyDict_Clear(PyDict_GetItemString(interp->sysdict,
+ "path_importer_cache"));
}
More information about the Python-checkins
mailing list