Bundling importlib2 with Python 2.7.x?

Nick Coghlan <[email protected]> Mon, 6 Jul 2015 12:11:57 +1000
Newsgroups gmane.comp.python.import
Message-ID <CADiSq7eAOh=fT-rhoDEc49tKMM=6xGb8MJFLVtSW7VsTjaOqQQ@mail.gmail.com>
What do folks think of the idea of proposing bundling importlib2 with
Python 2.7.x (via pip), such that issues like
https://bitbucket.org/pypa/setuptools/issue/250/ can be addressed by
telling people to enable the Python 3 style import system?

That is, Python 2 would still use the legacy import system by default,
but Python 3 style imports would just be an "import importlib2;
importlib2.install_import_hooks()" away?

The main risk I see with the idea is projects deciding to install
those hooks as a side effect of their own import.

Regards,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia