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 brett.cannon
Recipients Arfrever, barry, brett.cannon, eric.araujo, eric.smith, jaraco
Date 2012-05-18.16:50:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337359824.74.0.471781613375.issue14715@psf.upfronthosting.co.za>
In-reply-to
Content
I see three options (which can be combined). One is to keep using something like the uncache context manager to make sure the expected modules get removed. Two is to check the keys of sys.modules at the end of a context manager and if there are new keys either blindly clean up or raise an error/warning that stuff was left behind. Lastly is to leave all built-in modules (and maybe extension modules if you are worried they will do something silly during init) in sys.modules and then clear out the rest (although that might screw up importlib if we end up hiding importlib._bootstrap behind _frozen_importlib, in which case you will want to leave frozen modules as well or special-case _frozen_importlib).
History
Date User Action Args
2012-05-18 16:50:24brett.cannonsetrecipients: + brett.cannon, barry, jaraco, eric.smith, eric.araujo, Arfrever
2012-05-18 16:50:24brett.cannonsetmessageid: <1337359824.74.0.471781613375.issue14715@psf.upfronthosting.co.za>
2012-05-18 16:50:24brett.cannonlinkissue14715 messages
2012-05-18 16:50:23brett.cannoncreate