[Python-Dev] Python "2migr8"

Nick Coghlan ncoghlan at gmail.com
Wed Apr 16 04:08:29 CEST 2014


On 15 Apr 2014 18:56, "Steve Dower" <Steve.Dower at microsoft.com> wrote:
> From Eric:
> > 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.
>
> 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".

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.

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.

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).

Any other related suggestions should probably be directed to python-ideas
at this point.

Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140415/d8ecc436/attachment-0001.html>


More information about the Python-Dev mailing list