import hooks (PEP 302) broken in Python >=2.5?
ryan at rfk.id.au
Sun Aug 7 18:03:22 EDT 2011
On Sun, 2011-08-07 at 11:11 -0700, Josh Haberman wrote:
> When reading about import hooks, I came across a blog entry comment
> that says:
> One additional thing to note about ihooks is that it's
> somewhat seriously broken on Python 2.5 and newer and there
> seems to be little or no interest in fixing it. It's
> probably worth *always* avoiding when writing new code.
> Does anyone know what this is referring to? Should I be wary of
> relying on import hooks?
I believe that comment is referring specifically to "ihooks" the stdlib
module, not "import hooks" the general concept as defined in PEP302.
The former pre-dates the later.
I use custom PEP302 loaders all the time and they work fine in at least
2.6, 2.7 and 3.2.
http://www.rfk.id.au | This message is digitally signed. Please visit
ryan at rfk.id.au | http://www.rfk.id.au/ramblings/gpg/ for details
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the Python-list