[Python-Dev] Use dlopen() on Darwin/OS X to load extensions?
Zachary Pincus
zpincus at stanford.edu
Tue Apr 4 06:25:46 CEST 2006
> Thanks for reminding us about this issue.
> Unfortunately, without an explicit ok from one of the Mac maintainers,
> I don't want to add this myself. If you can get Bob, Ronald, or Jack
> to say ok, I will apply the patch ASAP. I have a Mac OS X.4 box and
> can test it, but don't know the suitability of the patch.
Fair enough -- this seems reasonable.
Now, there is one issue with this all that some general feedback from
Python-Dev would be helpful with: how best to test such a patch?
Specifically, this patch would change a core python code path. Now, I
can see no reason why it would break anything -- but we know how
flimsy such arguments are. More strong evidence is that python builds
and tests flawlessly with this patch. Given that many of the tests
involve loading C extension libs, that's a good sign. Moreover, I've
been using patched versions of 2.4 and 2.5 for some time, and loading
fairly extensive libs (numpy/scipy, as well as the more exotic
extensions that drove me to uncover this problem before), all without
issue.
But it would be good to have a specific benchmark to know nothing
will break. I personally sort of feel that if dlopen() works once or
twice, it will probably always work, but there are those who probably
understand better the failure modes of opening shared libs as python
extensions, and could suggest some good things to test.
Any thoughts?
Zach
More information about the Python-Dev
mailing list