Discussion:
Changes in r3466 of librra break pyrex build.
Dr J A Gow
2008-06-28 17:14:09 UTC
Permalink
Folks,

The commit of r3466 to librra breaks the build of the python
extensions. Specifically the syntax

for 0 <= i < count:

is not recognised by pyrex (at least the pyrex standard in OpenSuSE 11).

Is there really anything so wrong with the old syntax that these parts
of the patch should not be reversed?

John.
John Carr
2008-06-28 18:11:08 UTC
Permalink
Those changes were made to support the version of pyrex in Debian
Unstable AFAIK. Pyrex sucks at compatibility :-)
But does the original syntax work with Debian pyrex? If so, we should
perhaps reverse it. If not, it would seem that Debian pyrex is the
oddball. Anybody with different distros than Debian or SuSE care to
comment?
John.
It broke Ubuntu Hardy (r3466 is in the debian packages, so i had to patch
the patch), but the next Ubuntu will obviously be the same as Debian and so
Jonny Lamb
2008-06-28 21:58:53 UTC
Permalink
Post by Dr J A Gow
The commit of r3466 to librra breaks the build of the python
extensions. Specifically the syntax
is not recognised by pyrex (at least the pyrex standard in OpenSuSE 11).
This did not break any builds. The use of the variable name "type" broke
Debian builds. It also warned about the "old syntax of for loops", so I
"fixed" both in that commit.
Post by Dr J A Gow
Is there really anything so wrong with the old syntax that these parts
of the patch should not be reversed?
Although it probably will eventually need changing to the new syntax I
used, I'm absolutely fine with it being changed back to the previous
syntax though. Feel free to commit this immediately.

I hope this helps,
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Dr J A Gow
2008-06-29 11:23:27 UTC
Permalink
Post by Jonny Lamb
This did not break any builds. The use of the variable name "type" broke
Debian builds. It also warned about the "old syntax of for loops", so I
"fixed" both in that commit.
Err - I'm staring at a stock unmodified openSuSE 11 system whose pyrex
won't build the python extensions with the 'new' syntax. Ergo, it breaks
builds.

I'll change this back. But you are right about the 'type' parameter -
poor choice of name there on my part. Wonder why problems did not
surface earlier with this?

John.
Jonny Lamb
2008-06-29 14:29:37 UTC
Permalink
Post by Dr J A Gow
Err - I'm staring at a stock unmodified openSuSE 11 system whose pyrex
won't build the python extensions with the 'new' syntax. Ergo, it breaks
builds.
For the record, I did actually mean: the old for-loop syntax (that I
warned about on build in Debian) did not break building. I only changed
it because I was changing the "type" variable name, and saw some other
easy-to-fix warnings. I can see the ambiguity though, sorry.
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Dr J A Gow
2008-06-29 14:48:49 UTC
Permalink
Post by Jonny Lamb
Post by Dr J A Gow
Err - I'm staring at a stock unmodified openSuSE 11 system whose pyrex
won't build the python extensions with the 'new' syntax. Ergo, it breaks
builds.
For the record, I did actually mean: the old for-loop syntax (that I
warned about on build in Debian) did not break building. I only changed
it because I was changing the "type" variable name, and saw some other
easy-to-fix warnings. I can see the ambiguity though, sorry.
Ah, I understand. Although does this mean that the 'old' for loop syntax
is likely to be deprecated in future python versions? Or is it just a
'cleaner' way of expressing the same thing.

John.
Jonny Lamb
2008-06-29 14:57:38 UTC
Permalink
Post by Dr J A Gow
Ah, I understand. Although does this mean that the 'old' for loop syntax
is likely to be deprecated in future python versions? Or is it just a
'cleaner' way of expressing the same thing.
The warning is:

Warning: Old-style integer for-loop is deprecated, use 'for x < i < y' instead

I guess this will answer your question, and show my reasons for
committing this change.
--
Jonny Lamb, UK ***@jonnylamb.com
http://jonnylamb.com GPG: 0x2E039402
Loading...