[lxml-dev] lxml 1.1 problems with python 2.3

Stefan Behnel behnel_ml at gkec.informatik.tu-darmstadt.de
Mon Nov 27 07:57:46 CET 2006


Hi Tres,

Tres Seaver wrote:
> Stefan Behnel wrote:
>> Tres Seaver wrote:
>>> 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
>> The problem is not that it can't be imported in 2.3, it's rather that we seem
>> to be using some features in the tests that were not yet available in 2.3's
>> doctest module. That's harder to test...
> 
> I'm attaching a patch which "fixes" this, assuming that we put the
> non-standard-for-Python-2.3 doctest.py into a new 'lxml.bbb' package.
> It still segfaults, but the tests do import from the bbb module.

Thanks for the patch. However, that's the kind of thing the "common_imports"
module is there for. So here's a somewhat simpler patch that should do the
same thing.

Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doctest_import.patch
Type: text/x-patch
Size: 3191 bytes
Desc: not available
Url : http://codespeak.net/pipermail/lxml-dev/attachments/20061127/89c598d6/attachment-0001.bin 


More information about the lxml-dev mailing list