[Python-Dev] Install Hook [Was: Re: PEP 414 updated]

Armin Ronacher armin.ronacher at active-4.com
Sun Mar 4 15:43:28 CET 2012


Hi,

Jut to reiterate what I wrote on IRC:

Please do not write or advocate for import hooks, especially not for
porting purposes.  It would either mean that people start adding that
hook on their own to the code (and that awfully reminds me of the days
of 'require "rubygems"' in the Ruby world) or that the __init__.py has
to do that and that's a non trivial thing.

The hook on install time works perfectly fine and the only situation
where it might not work is when you're trying to use Python 3.2 for
development and also support down to 2.x by using the newly introduced
u-prefixes.  In this case I would recommend using Python 3.3 for
development and running the testsuite periodically from Python 3.2 after
installating the library (into a virtualenv for instance).

The current work in progress install time hook can be found here:
  https://github.com/mitsuhiko/unicode-literals-pep/tree/master/install-hook


Regards,
Armin


More information about the Python-Dev mailing list