[Python-Dev] Release manager pronouncement needed: PEP 302 Fix

Georg Brandl g.brandl at gmx.net
Thu Jul 27 12:52:33 CEST 2006


Armin Rigo wrote:
> Hi Phillip,
> 
> On Wed, Jul 26, 2006 at 02:40:27PM -0400, Phillip J. Eby wrote:
>> If we don't revert it, there are two ways to fix it.  One is to just change 
>> PEP 302 so that the behavior is unbroken by definition.  :)  The other is 
>> to actually go ahead and fix it by adding PathImporter and NullImporter 
>> types to import.c, along with a factory function on sys.path_hooks to 
>> create them.  (This would've been the PEP-compliant way to implement the 
>> need-for-speed patch.)
>> 
>> So, "fix" by documentation, fix by fixing, or fix by reverting?  Which 
>> should it be?
> 
> "fix" by changing the definition looks like a bad idea to me.  The
> import logic is already extremely complicated and delicate, any change
> to it is bound to break *some* code somewhere.

Though beta1 and beta2 shipped with this change nobody reported any bug that
could be linked to it. sys.path_importer_cache is quite an internal thing and
most code, even import hooks, shouldn't have to deal with it.

Georg



More information about the Python-Dev mailing list