<p dir="ltr"><br>
On 15 Apr 2014 18:56, "Steve Dower" <<a href="mailto:Steve.Dower@microsoft.com">Steve.Dower@microsoft.com</a>> wrote:<br>
> From Eric:<br>
> > This should be doable with an import hook.  For that matter it would be pretty straight-forward to provide a script around the Python binary that installs the import hook.  All this could be bundled up and distributed through the cheeseshop.<br>

><br>
> I love this solution. If it really is doable this way then it is even better than having a fork. My name suggestion for a PyPI packages would be "PyStraddle".<br></p>
<p dir="ltr">Eric and I spent some time discussing this today, and don't see any insurmountable barriers to doing it as an import hook. It may mean doing a 2.7 compatible full importlib backport, but that's also useful for other reasons.</p>

<p dir="ltr">We may also want to consider/discuss integrating this idea with the python-future project rather than making it a new independent project, as that provides ready access to Python 3 style builtins that a hook could inject as globals in flagged files.</p>

<p dir="ltr">Regardless, I think we're now drifting off topic for python-dev - Eric and I are still at the sprints, so we'll take a look at the feasibility of proposing this to Ed and the other python-future devs (I also have some ideas around using sitecustomize to put an entire Python installation into enforcement mode for flagged files).</p>

<p dir="ltr">Any other related suggestions should probably be directed to python-ideas at this point.</p>
<p dir="ltr">Cheers,<br>
Nick.<br>
</p>