[py-dev] Re: Error with py.test and scipy ...
Ian Bicking
ianb at colorstudy.com
Fri Apr 8 02:28:39 CEST 2005
holger krekel wrote:
> On Thu, Apr 07, 2005 at 17:45 -0500, Patrick K. O'Brien wrote:
>
>>holger krekel wrote:
>>
>>>On Thu, Apr 07, 2005 at 14:54 -0700, Robert Kern wrote:
>>>
>>>>Scipy uses a lazy importing scheme implemented in scipy_base.ppimport.
>>>
>>>
>>>import magic's interfering with each other ... this had to happen
>>>sooner or later. And we've had Valentino having problems with
>>>twisted's nevow already which uses crazy import hacks ... welcome
>>>in scary traceback land. This strongly suggests to me that py.test
>>>will have to try harder to reduce its import magic. Luckily, i have
>>>an alternative approach which removes the need to have a custom
>>>import hook for the py lib. I am checking that into the
>>>collect-branch (which will soon get merged, didn't i mention that
>>>last week?)
>>
>>Count Schevo as yet another project that does its share of import magic.
>> We've managed to keep our magic compatible with py.test's magic and
>>nevow's magic, and I'd hate to lose that.
>
>
> I would be surprised if my brand-new hack breaks yours (because that
> is exactly what it is trying to avoid) but i've learned that "import"
> makes the impossible possible and vice versa.
There sure are a lot of people doing import hacks these days -- as I
look around I keep encountering more of them. I guess it takes a while
for people to become comfortable with such magic, but people are clearly
feeling comfortable now. I am guessing that this could all have bad
interactions with eggs, and who knows what else. I can barely manage
right now to bring together multiple packages easily with *normal*
import semantics (stupid sys.path), and I don't know how this stuff will
come together in the future.
I wonder if people are overloading the idea of "module" when really they
want to create entirely new kinds of objects-built-from-Python-files
that aren't modules at all. Do we need a new metaphor? Do we need one
Magic But Really Well Spec'ed import hook that will satisfy everyone's
needs?
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Pytest-dev
mailing list