Message170231
The FileFinder class (a "path entry finder") uses a cache to efficiently track changes to files. You can manually clear this cache by calling importlib.invalidate_caches(). The Python test suite has several examples of clearing the FileFinder cache in this way.
I've verified the failure as described. Using importlib.invalidate_caches() at the spot where the script cleans up sys.modules, the failure goes away.
Depending on OS filesystem timestamp resolution, you could see the behavior just as you've described it. Since normally you wouldn't remove and re-add modules like this, it isn't normally an issue. |
|
Date |
User |
Action |
Args |
2012-09-10 20:28:16 | eric.snow | set | recipients:
+ eric.snow, exarkun |
2012-09-10 20:28:16 | eric.snow | set | messageid: <1347308896.42.0.696278455172.issue15912@psf.upfronthosting.co.za> |
2012-09-10 20:28:15 | eric.snow | link | issue15912 messages |
2012-09-10 20:28:15 | eric.snow | create | |
|