[Numpy-discussion] [Pythonmac-SIG] Packaging numpy with py2app

Robert Kern robert.kern at gmail.com
Tue Jul 18 23:52:52 CDT 2006


Travis Oliphant wrote:
> Robert Kern wrote:
>> Josh Marshall wrote:
>>   
>>> so it seems like the entire purpose of PackageLoader is to make life  
>>> difficult for me, just to save a few lines of typing. :) Seriously,  
>>> can a numpy developer tell me why PackageLoader is necessary?
>>>     
>> I can't think of a good reason why it's used in __init__.py the way it is (it 
>> used to have postpone=True). If Pearu, who wrote that bit of code, doesn't speak 
>> up by Thursday, I'll have it removed in favor of regular imports for the beta.
>>
> This will probably help with ticket #145 as well.  A user of 
> ActiveState's Komodo on Windows gets a program crash which started when 
> the PackageLoader started getting used in 0.9.4
> 
> AFAIK, The two main purposes of the package loader are docstring 
> manipulation and postponing imports.  Right now, it's probably only the 
> docstring portion of the code that is really being used. 

There's also the configurable verbosity and hiding of ImportErrors. Admittedly, 
I dislike both of those. Currently, I don't think any of these features are 
worth messing with something as fundamental as importing. Especially not in 
__init__.py . It always works out to introduce fragility in something that needs 
to be rock-solid.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco





More information about the Numpy-discussion mailing list