Message170231
| Author |
eric.snow |
| Recipients |
eric.snow, exarkun |
| Date |
2012年09月10日.20:28:15 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347308896.42.0.696278455172.issue15912@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|