[Python-Dev] making the import machinery explicit (original) (raw)
Brett Cannon brett at python.org
Mon Apr 16 04:25:01 CEST 2012
- Previous message: [Python-Dev] making the import machinery explicit
- Next message: [Python-Dev] making the import machinery explicit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Apr 15, 2012 at 22:03, Nick Coghlan <ncoghlan at gmail.com> wrote:
On Mon, Apr 16, 2012 at 2:31 AM, Brett Cannon <brett at python.org> wrote: > What about sys.pathimportercache: all of it or just NullImporter/None > entries (or should that be a boolean to this function)? And shouldn't it be > called resetimport() with the level of changes you are proposing the > function make?
Hmm, perhaps the simpler suggestion is: "If you want a clean import state, use multiprocessing or the subprocess module to invoke a new instance of python" :) Yeah, kinda. =) This is why testing import (as you know) is such an utter pain.
-Brett
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120415/b2411904/attachment.html>
- Previous message: [Python-Dev] making the import machinery explicit
- Next message: [Python-Dev] making the import machinery explicit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]