rawhide report: 20050405 changes

Konstantin Ryabitsev mricon at gmail.com
Tue Apr 5 15:27:12 UTC 2005


On Apr 5, 2005 11:04 AM, Daniel Veillard <veillard at redhat.com> wrote:
> > non-pythonic API. I'd choose cElementTree if only because I don't have
> > to use MethodNamesThatStartWithCapsAgainstAllConventions(). It also
> 
>    Hum, sorry but that argument sounds silly, the code was there, i.e.
> coded, working, debugged.

Yes, well, if that was the only reason for introducing anything new,
we'd still be stuck with Minix. :)

> > (i.e. not just segfault, which is not
> > useful with python).
> 
>    where is the "yum segfault because of libxml2 python bindings" bug report ?

I have used libxml2 in many places, not just in yum. In fact, my
contributions to yum are very small and are entirely limited to
parsing XML metadata. I am also guilty of not reporting every single
bug I come across. Mea culpa.

> > In other words, cElementTree feels like a Python library, as opposed
> > to libxml2, which is very obviously a set of bindings to a C API done
> > as an afterthought.
> 
>   libxml2 is part of Fedora Core, celement tree wasn't part of Fedora Core.
> We removed other components of Fedora Core because they were duplicate,
> you're adding a new duplicate library in core, I don't think aesthetic
> consideration are really worth it.

Here is where we differ. I think cElementTree is a much better XML
parsing library than libxml2 for use in python. Here's the shoot-out:

1. It's faster
2. It has a smaller memory footprint
3. It follows python conventions
4. It results in nicer python code

It's more than pure "aesthetic considerations."
I realize that this is very personal to you, since you are the author
of libxml2, but I swear to you that my advice to switch from libxml2
to cElementTree in Yum was based purely on merits and benefits for
yum, and not on any personal likes or dislikes.

> > I believe it wasn't "within yum" it was "within python," specifically
> > going from C strings to python strings, which took a lot of resources.
> > That's all that matters to yum, since, well, it's written in python,
> > and cElementTree outperformed libxml2 in our tests and resulted in
> > much nicer code. I'm the one who did the testing and convincing, so
> > all blame and hatemail should be aimed at me.
> 
>    Did you ever tried to discuss with me instead of making the decision
> on your side ? I don't remember this. Only exchanges I got were with Seth
> and rather positive, I remember changing stuff in the bindings to help him !

Well, I could have done that, sure. However, cElementTree was already
"there." Why choose a path that requires more effort? I'm a sysadmin.
I'm lazy. It's in our nature.

>   hum, no, I really took your mail as "I blame you in a non-contructive
> fashion", adding "Kind regards" can in no way erase in an easy way the
> feeling I got from your mail.

Look, all I did was choose a different library, which happens not to
be written by you. It was not my desire nor goal to start any
conflicts, nor alienate anyone.

Isn't free software all about the freedom of choice?

Regards,
-- 
Konstantin Ryabitsev
Zlotniks, INC




More information about the devel mailing list