[Import-SIG] Bundling importlib2 with Python 2.7.x?
donald at stufft.io
Mon Jul 6 04:23:09 CEST 2015
On July 5, 2015 at 10:18:07 PM, Nick Coghlan (ncoghlan at gmail.com) wrote:
> 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.
If you’re already installing a third party module, isn’t installing
a second third party module a pretty small amount of additional work?
IOW, bundling pip made sense because of the bootstrapping problems,
but once you have pip, directing people to depend on importlib2 isn’t
very hard if they’re already installing hypotheticalthingthatwoulduseit?
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Import-SIG