Robert Bradshaw | 1 Mar 2009 13:25
Favicon

Re: [Cython] Final fix for #143 before a release?

On Feb 27, 2009, at 11:38 AM, Stefan Behnel wrote:

> Hi,
>
> the last remaining ticket for 0.11 is #143. I think the right fix  
> for this
> release is to disable the typing of locals in .pxd files, and to  
> change
> #143 into a feature request.

Fixed. The site is temporarily down, so I can't push right now.

- Robert

William Stein | 1 Mar 2009 16:13
Picon
Gravatar

Re: [Cython] [sage-support] Re: Small groups library is missing

> sagemath and trac are down now anyway, so I'm not sure if this can be
> fixed today.
> I can start working on it after I finish grading an exam tomorrow and
> Almost definitely will be free to work on it a large chunk of the day
> Tuesday.
>

They (=sagemath, cython, etc.) are all back up now.  Apache used up
all memory on sagemath for unknown reasons... and we're now logging
all output of top and have adjusted a bunch of parameters for apache2,
so we'll see what happens.

William
Hoyt Koepke | 1 Mar 2009 18:51
Picon
Picon
Favicon

[Cython] PyBool_CheckExact not found

Hello,

I'm using the latest pull from cython-dev, 1800:e8b5a8e5da3d, with
python 2.5.4, and some of my code calls PyBool_CheckExact.  However,
this doesn't seem to be defined anywhere.  When I compile it with gcc,
it warns that the symbol is defined implicitly, and trying to load it
results in an import error saying it's an undefined symbol.

I'll try to get a specific example together where it happens and file
a bug report, but it seems like a simple-to-fix version issue here.

--Hoyt

--

-- 

++++++++++++++++++++++++++++++++++++++++++++++++
+ Hoyt Koepke
+ University of Washington Department of Statistics
+ http://www.stat.washington.edu/~hoytak/
+ hoytak@...
++++++++++++++++++++++++++++++++++++++++++
Hoyt Koepke | 1 Mar 2009 19:26
Picon
Picon
Favicon

Re: [Cython] PyBool_CheckExact not found

It's now Ticket #227 (http://trac.cython.org/cython_trac/ticket/227).

The quick fix is to not use bool, but use bint instead (of course).  I
had accidentally typed bool instead of bint in one place in my code,
and fixing that got my code working.  Still, it's a bug, just more of
a corner case.

--Hoyt

On Sun, Mar 1, 2009 at 9:51 AM, Hoyt Koepke <hoytak@...> wrote:
> Hello,
>
> I'm using the latest pull from cython-dev, 1800:e8b5a8e5da3d, with
> python 2.5.4, and some of my code calls PyBool_CheckExact.  However,
> this doesn't seem to be defined anywhere.  When I compile it with gcc,
> it warns that the symbol is defined implicitly, and trying to load it
> results in an import error saying it's an undefined symbol.
>
> I'll try to get a specific example together where it happens and file
> a bug report, but it seems like a simple-to-fix version issue here.
>
> --Hoyt
>
>
> --
>
> ++++++++++++++++++++++++++++++++++++++++++++++++
> + Hoyt Koepke
> + University of Washington Department of Statistics
> + http://www.stat.washington.edu/~hoytak/
(Continue reading)

Stefan Behnel | 1 Mar 2009 21:29
Picon
Favicon

Re: [Cython] PATCH: use function pointer arguments in import/export api functions


Stefan Behnel wrote:
> Lisandro Dalcin wrote:
>> Just to prevent this:
>> warning: ISO C forbids conversion of function pointer to object pointer type
> 
> with this patch applied, I now get a warning on this line:
> 
>     p = *(void **)&f;
> 
> src/lxml/lxml.etree.c: In function '__Pyx_ExportFunction':
> src/lxml/lxml.etree.c:148416: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
> 
> This needs fixing, I guess. That said, I'm more in favour of enabling clean
> strict-aliasing than to be strictly C89 compliant, unless we can have both. :)

I reverted the patch for now. Lisandro, if you can come up with a fix that
does not break strict aliasing (or a partial patch that only adds consts
and the like), please give it another try.

Stefan
Stefan Behnel | 1 Mar 2009 21:34
Picon
Favicon

Re: [Cython] PyBool_CheckExact not found


Hoyt Koepke wrote:
> It's now Ticket #227 (http://trac.cython.org/cython_trac/ticket/227).

Fixed.

Stefan

Zachary Pincus | 1 Mar 2009 21:36
Picon
Favicon

[Cython] cython / numpy / mac(?) issue

Hello all,

I've run into a problem using some cython+numpy code that some folks  
recently made available. After some back and forth with the original  
authors, we've determined that the problem appears to be with cython  
on my box. I've attached the offending code and will post a test-case  
below, but first some configuration details:

I'm using OS X 10.5.6 and a python 2.5.2 that's installed as a  
"framework" (the standard OS X way of installing Python) -- the only  
major difference is that the python directories live in /Library/ 
Frameworks/[etc.] instead of /usr/local.

First, I should note that on my system, using both the latest stable  
Cython release as well as the tip of cython-devel from hg, cython's  
numpy tests fail utterly, due to some sort of error with include paths:
hg clone http://hg.cython.org/cython-devel/
cd cython-devel
make local
make test
[...output...]
compiling (c) and running numpy_test ... numpy_test.c: 
129:31:numpy_test.c:129:31:  error: error: numpy/arrayobject.h: No  
such file or directorynumpy/arrayobject.h: No such file or directory

The error using cython 0.10.3 is pretty much the same, except with the  
spacing errors fixed:
compiling (c) and running numpy_test ... numpy_test.c:112:31: error:  
numpy/arrayobject.h: No such file or directory

(Continue reading)

Dag Sverre Seljebotn | 1 Mar 2009 22:13
Picon
Picon

Re: [Cython] cython / numpy / mac(?) issue

All of these are expected, I don't see any issues here (except perhaps lack of documentation; feel free to
submit improvements).

1) You should set the INCLUDE environment variable prior to running runtests.py.

2) cimport and import are different things; you need both.

3) The "dimensions" field is in Cython renamed "shape" to be closer to the Python interface. This is done in Cython/Includes/numpy.pxd

Dag Sverre Seljebotn
-----Original Message-----
From: Zachary Pincus <zachary.pincus@...>
Date: Sunday, Mar 1, 2009 9:35 pm
Subject: [Cython] cython / numpy / mac(?) issue
To: cython-dev@...: cython-dev@...

Hello all,
>
>I've run into a problem using some cython+numpy code that some folks  
>recently made available. After some back and forth with the original  
>authors, we've determined that the problem appears to be with cython  
>on my box. I've attached the offending code and will post a test-case  
>below, but first some configuration details:
>
>I'm using OS X 10.5.6 and a python 2.5.2 that's installed as a  
>"framework" (the standard OS X way of installing Python) -- the only  
>major difference is that the python directories live in /Library/ 
>Frameworks/[etc.] instead of /usr/local.
>
>First, I should note that on my system, using both the latest stable  
(Continue reading)

Zachary Pincus | 1 Mar 2009 22:43
Picon
Favicon

Re: [Cython] cython / numpy / mac(?) issue

Thanks, Dag! I appreciate your help -- that indeed fixed everything.

The only surprising thing here is that the original developers of the  
code I'm using report no difficulties with that code as-is, using  
similar versions of cython. Perhaps they have some old cruft laying  
around from previous installs...

Anyhow, your help is appreciated, as are your efforts on integrating  
numpy support in cython -- I'm excited to start using this tool more!

Zach

On Mar 1, 2009, at 4:13 PM, Dag Sverre Seljebotn wrote:

> All of these are expected, I don't see any issues here (except  
> perhaps lack of documentation; feel free to submit improvements).
>
> 1) You should set the INCLUDE environment variable prior to running  
> runtests.py.
>
> 2) cimport and import are different things; you need both.
>
> 3) The "dimensions" field is in Cython renamed "shape" to be closer  
> to the Python interface. This is done in Cython/Includes/numpy.pxd
>
> Dag Sverre Seljebotn
> -----Original Message-----
> From: Zachary Pincus <zachary.pincus@...>
> Date: Sunday, Mar 1, 2009 9:35 pm
> Subject: [Cython] cython / numpy / mac(?) issue
(Continue reading)

Lisandro Dalcin | 2 Mar 2009 15:00
Picon
Gravatar

Re: [Cython] PATCH: use function pointer arguments in import/export api functions

Stefan, is this the only warning you get related to strict aliasing?
No warnings at all on those lines where  __Pyx_ExportFunction is
called??

If that is the only warning, they I can write a better patch.

On Fri, Feb 27, 2009 at 7:21 PM, Stefan Behnel <stefan_ml@...> wrote:
> Hi,
>
> Lisandro Dalcin wrote:
>> Just to prevent this:
>> warning: ISO C forbids conversion of function pointer to object pointer type
>
> with this patch applied, I now get a warning on this line:
>
>    p = *(void **)&f;
>
> src/lxml/lxml.etree.c: In function '__Pyx_ExportFunction':
>
>
> src/lxml/lxml.etree.c:148416: warning: dereferencing type-punned pointer
> will break strict-aliasing rules
>
>
> This needs fixing, I guess. That said, I'm more in favour of enabling clean
> strict-aliasing than to be strictly C89 compliant, unless we can have both. :)
>
> Stefan
>
> _______________________________________________
(Continue reading)


Gmane