[lxml-dev] trunk test problems, release tags

jholg at gmx.de jholg at gmx.de
Fri Oct 19 16:12:30 CEST 2007


Hi Stefan,

-------- Original-Nachricht --------
> Datum: Fri, 19 Oct 2007 15:52:38 +0200
> Von: Stefan Behnel <stefan_ml at behnel.de>
> An: jholg at gmx.de
> CC: lxml-dev at codespeak.net
> Betreff: Re: [lxml-dev] trunk test problems, release tags

> 
> jholg at gmx.de wrote:
> >> I'm having issues with the latest trunk head. When trying to test my
> build
> >> it suddenly just hangs, and has then to get killed the hard way:
> > 
> > I run into the same problems with the head of the 1.3 branch, but not
> with (tag) 1.3.3 nor 1.3.4 (that was fast btw :-).
> > Can the fix for the 10000-ns-prefix-limit cause me to run into an
> indefinite loop? Just a thought, haven't yet looked at it.
> 
> Hmmm, I don't know. It shouldn't happen in the tests at least, and as long
> as
> the data structure is finite, the loop cannot run infinitely either.
> 
> You can always try to revert it and see if that fixes it, but I honestly
> doubt it.

The problem is indeed an indefinite loop, due to buildNewPrefix() *never* delivering an acceptable prefix. Reason:

The format characters for PyString_FromFormat have changed from 2.4 to 2.5.
There is no such format character as "%lu" in 2.4, and: 
"An unrecognized format character causes all the rest of the format string to be copied as-is to the result string, and any extra arguments discarded." (this is from 2.5-documentation, but obviously applies to 2.4 too)

So you wouldn't see this error in a Python 2.5 environment, but it breaks under 2.4 (and probably all prior versions).

So the format character must be used version-sensitive in some way, or maybe it's safer to not use PyString_FromFormat here and concatenate two Python strings (?)

Greets,
Holger
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger


More information about the lxml-dev mailing list