ctypes warning

Stefan van der Walt stefan at sun.ac.za
Mon Nov 6 16:23:17 EST 2006


On Mon, Nov 06, 2006 at 02:09:32PM -0600, John Hunter wrote:
> 
> A simple import of numpy with the latest svn triggers a ctypes warning
> 
> In [1]: import numpy
> /usr/lib/python2.4/site-packages/numpy/ctypeslib.py:12: UserWarning:
> All features of ctypes interface may not work with ctypes < 1.0.1
>   warnings.warn("All features of ctypes interface may not work with "
>  
> 
> This is a bit of an annoyance.  Even if the warning level is
> configurable, I think the bulk of matplotlib users, who get the
> warning when using numpy through mpl but make no use of ctypes, will
> be confused by this.  Is it right and good that this message gets
> triggered by default for any import of numpy, even those not using the
> ctypes features?

I moved the warning to inside ctypeslib.load_library.  I think most
people using ctypes in numpy come via that route.  Soon, we can remove
the warning, but for now I think it should remain -- the bugs
resulting from using older versions of ctypes are fairly hard to track
down.

Regards
Stéfan

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the NumPy-Discussion mailing list