Re: [Zope-dev] lxml and z3c.form strategy?
Hi Stephan, Malthe, Tres, Chris
Betreff: Re: lxml and z3c.form strategy?
On Monday 15 September 2008, Roger Ineichen wrote:
I decided after along night, trying to compile lxml on a windows box, that we will not use lxml and lxml based packages like z3c.form, z3c.template, z3c.macro etc at some of our windows servers.
Well, we have to move forward. lxml is for me the defacto package for any XML processing. Nothing else makes much sense these days. So we better agree on a Windows story. As others have pointed out, 2.1.1 has a binary release; if we require 2.1.2 somewhere, then we should fix that. I think it is realistic to wait requiring a new version until the Windows binary exist.
Yes, that's all we need to do. z3c.pt must always work on windows without any fallback if the windows lxml binary egg is not available. If we all agree on that, then I'm Ok with replace the PageTemplate implementation with lxml. Sorry about my bad mode, but I really get frustrated after a day and night compiling lxml on windows;-)
We have to find a strategy to keep this packages free of lxml and implement the z3c.pt support in this packages in a different way.
-1
I see your point but, I think it's nothing what we can vote for. If there is no windows story then it's a "no go". I hope we all can agree on that. Regards Roger Ineichen
Let's try to figure out whether we can live with lxml first; if not, we can do some more setuptools trickery.
Regards, Stephan -- Stephan Richter Senior Developer @ Keas, Inc.
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
I see your point but, I think it's nothing what we can vote for. If there is no windows story then it's a "no go". I hope we all can agree on that.
I'm motivated to lose the hard lxml-dependency, too, because it's also difficult to compile it on Mac OS X; in most of my own projects I end up relying on lxml for other reasons and so need to build it anyway, but that's no reason to have a dependency in z3c.pt when it's not actually required. \malthe
Hi Malthe
Betreff: Re: lxml and z3c.form strategy?
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
I see your point but, I think it's nothing what we can vote for. If there is no windows story then it's a "no go". I hope we all can agree on that.
I'm motivated to lose the hard lxml-dependency, too, because it's also difficult to compile it on Mac OS X; in most of my own projects I end up relying on lxml for other reasons and so need to build it anyway, but that's no reason to have a dependency in z3c.pt when it's not actually required.
That's fine for me. But the question is what happens on a production server. Does the missing lxml end in useing a slow fallback implementation or does it use the old style PageTempalte? Regards Roger Ineichen
\malthe
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
That's fine for me. But the question is what happens on a production server. Does the missing lxml end in useing a slow fallback implementation or does it use the old style PageTempalte?
Without lxml, it'll use ``xml.etree`` to parse the template and there a few differences, most of which have been addressed at this point. \malthe
Hi Malthe
Betreff: Re: lxml and z3c.form strategy?
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
That's fine for me. But the question is what happens on a production server. Does the missing lxml end in useing a slow fallback implementation or does it use the old style PageTempalte?
Without lxml, it'll use ``xml.etree`` to parse the template and there a few differences, most of which have been addressed at this point.
As I understand, this get used on production windows servers without lxml installed, right? Is this stable and fast? I really do not understand why you are doing so much work for a fallback implementation in z3c.pt rather then let the z3c.form or other package fallback to PageTemplate. What is the reason why z3c.* packages should use z3c.pt and fallback to a new concept rather then stay with PageTemplate if no lxml is installed and z3c.pt is useless? Is the fallback to xml.etree faster and then the old stable PageTemplate implementation? Or is the reason to use a fallback in z3c.pt that it's much simpler for other packages to depend only on z3c.pt then implement the fallback itself? Regards Roger Ineichen
\malthe
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
What is the reason why z3c.* packages should use z3c.pt and fallback to a new concept rather then stay with PageTemplate if no lxml is installed and z3c.pt is useless?
There seems to be some confusion here, and I understand why this has arisen, but let me repeat what Chris also has mentioned: There's absolutely no trace of XML left after a template is compiled (not so for Genshi templates, but that's a different story). The *only* reason I opted for lxml is that it seemed to provide the best parsing functionality. However, ``xml.etree`` aka ElementTree seems to be a good candidate, too.
Is the fallback to xml.etree faster and then the old stable PageTemplate implementation?
See above. \malthe
On Tue, Sep 16, 2008 at 03:29:13PM +0200, Malthe Borch wrote:
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
That's fine for me. But the question is what happens on a production server. Does the missing lxml end in useing a slow fallback implementation or does it use the old style PageTempalte?
Without lxml, it'll use ``xml.etree`` to parse the template and there a few differences, most of which have been addressed at this point.
Is that ElementTree that was only included from Python 2.5? In other words, z3c.pt + python2.4 - lxml = fail? Marius Gedminas -- Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off.
On Tuesday 16 September 2008, Marius Gedminas wrote:
Is that ElementTree that was only included from Python 2.5? In other words, z3c.pt + python2.4 - lxml = fail?
I guess we have to figure out a clever way to make a special extra requires for Python 2.4, since elementtree and cElementTree are available in PyPI. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Stephan Richter wrote:
On Tuesday 16 September 2008, Marius Gedminas wrote:
Is that ElementTree that was only included from Python 2.5? In other words, z3c.pt + python2.4 - lxml = fail?
I guess we have to figure out a clever way to make a special extra requires for Python 2.4, since elementtree and cElementTree are available in PyPI.
Something like this in setup.py?: extra_requires = [] import sys if sys.version_info[0:2] < (2, 5): extra_requires.append(...) Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIz+ky+gerLs4ltQ4RAm4pAKCTmb/ZjE3sGI8MedXfaS7Him4YZQCgxXni RjpGBYa3JXTmt0ERUx6zwdY= =2XYw -----END PGP SIGNATURE-----
On Tuesday 16 September 2008, Tres Seaver wrote:
I guess we have to figure out a clever way to make a special extra requires for Python 2.4, since elementtree and cElementTree are available in PyPI.
Something like this in setup.py?:
extra_requires = [] import sys if sys.version_info[0:2] < (2, 5): extra_requires.append(...)
Yeah, that should work. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter"
Am Dienstag 16 September 2008 14:46:41 schrieb Malthe Borch:
2008/9/16 Roger Ineichen <dev@projekt01.ch>:
I see your point but, I think it's nothing what we can vote for. If there is no windows story then it's a "no go". I hope we all can agree on that.
I'm motivated to lose the hard lxml-dependency, too, because it's also difficult to compile it on Mac OS X; in most of my own projects I end up relying on lxml for other reasons and so need to build it anyway, but that's no reason to have a dependency in z3c.pt when it's not actually required.
I followed the discussion a little, and, although I'm currently not at all affected by it, I had to struggle in the past quite often with such issues and also had some compile-nightmares, so if it's possible I'd also vote to remove dependencies of hard-to-compile packages. Btw., I noticed that lxml is also used in the z3c.formdemo tests, perhaps this is relevant, too? Best Regards, Hermann -- hermann@qwer.tk GPG key ID: 299893C7 (on keyservers) FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
participants (6)
-
Hermann Himmelbauer -
Malthe Borch -
Marius Gedminas -
Roger Ineichen -
Stephan Richter -
Tres Seaver