This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:16eric.snowsetrecipients: + eric.snow, exarkun
2012-09-10 20:28:16eric.snowsetmessageid: <1347308896.42.0.696278455172.issue15912@psf.upfronthosting.co.za>
2012-09-10 20:28:15eric.snowlinkissue15912 messages
2012-09-10 20:28:15eric.snowcreate