Dag Sverre Seljebotn | 14 Aug 18:40

[Cython] Making sure annotations work

While reading Robert's latest changes it occured to me that as CCodeWriter
has changed quite a bit, this may affect the AnnotationCCodeWriter and
introduce bugs. Specifically, will annotation work correctly when
insertion points are created?

Could somebody have a look over my changes to the annotation writer (do a
diff since the prev release) and see if they make sense, and if you think
they are enough, and do some basic testing? I'm very removed from
annotation writing (never used it and don't know exactly how it should
work) so it would be better if someone else could step in.

I am mentioning this specifically since (to my knowledge) there are no
tests for annotation writing, so regression testing and typical beta
testing would tend not to catch bugs there.

Dag Sverre

Robert Bradshaw | 14 Aug 19:02

Re: [Cython] Making sure annotations work

On Aug 14, 2008, at 9:41 AM, Dag Sverre Seljebotn wrote:

> While reading Robert's latest changes it occured to me that as  
> CCodeWriter
> has changed quite a bit, this may affect the AnnotationCCodeWriter and
> introduce bugs. Specifically, will annotation work correctly when
> insertion points are created?
>
> Could somebody have a look over my changes to the annotation writer  
> (do a
> diff since the prev release) and see if they make sense, and if you  
> think
> they are enough, and do some basic testing? I'm very removed from
> annotation writing (never used it and don't know exactly how it should
> work) so it would be better if someone else could step in.
>
> I am mentioning this specifically since (to my knowledge) there are no
> tests for annotation writing, so regression testing and typical beta
> testing would tend not to catch bugs there.

Yes, I did have to fix some stuff to get AnnotationCCodeWriter  
working. I'm still looking at it, but it seems to be doing fine now,  
insertion points and all. (It works by queueing up all metadata in a  
dict based on positions, and then inserting then at a later point,  
defering to the default codewriter routines to actually output the C  
file.) This could be because all the inserted stuff is not directly  
tied to a line of code in the pyx file however.

- Robert

(Continue reading)


Gmane