[lxml-dev] lxml 1.1 problems with python 2.3

Tres Seaver tseaver at palladion.com
Fri Nov 24 18:30:03 CET 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martijn Faassen wrote:
> Hi there,
> 
> On Python 2.3 this segfaults with lxml 1.1 (it works with lxml 1.0):
> 
>    >>> from lxml import etree
>    >>> etree.parse('sfadfdfd')
> 
> On python 2.4 we get an error as we should (as the file sfafdfd doesn't 
> exist).
> 
> Additionally, the tests don't work anymore under Python 2.3. For lxml 
> 1.1 some dependencies on Python 2.4's doctest module exist that don't 
> work on Python 2.3, probably because we dropped the custom doctest that 
> I added initially. For lxml 1.0 this is less bad, but there are still 
> some dependencies on 'sorted()' and such in the tests.
> 
> I don't think we actually ever explictly dropped support for Python 2.3. 
> Perhaps we should for a particular version of lxml, but it'd be nice if 
> we could track down this bug. It might indicate something wrong in 
> Python 2.4 that just doesn't show up right away, I don't know.

Maybe we should return the custom doctest and wire it in via a
conditional import, e.g.::

  try:
      import doctest
  except ImportError:  # Python < 2.4
      from lxml.bbb import doctest


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFZywb+gerLs4ltQ4RAsE1AJ9NAx70MKNtcFVkIo0/Tm574XbxvgCfe2iS
WStbWOKepYWKu7N4KT8huA8=
=eIAB
-----END PGP SIGNATURE-----



More information about the lxml-dev mailing list