
Hi,
testing 4.0.0 I'm getting the following error in with both python2 and python3 on x86_64 linux (LFS : gcc-7.2, python-2.7.13, python-3.6.2, with libxml2-2.9.4, libxslt-1.1.29 AND on another machine with libxml2-2.9.5, libxslt-1.1.30 with a fix so that xslt-config --cflags works again), both with linux-4.13.1.
I will admit that I take a jaundiced view of testsuites, but now that I've read your page on building from source I see you want to know about failures ;)
ERROR: test_xmlschema_parse_fixed_attributes (lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_xmlschema.py", line 217, in test_xmlschema_parse_fixed_attributes parser=parser) File "/scratch/working/lxml-4.0.0/src/lxml/tests/common_imports.py", line 164, in parse return etree.parse(f, parser=parser) File "src/lxml/etree.pyx", line 3441, in lxml.etree.parse doc = _parseDocument(source, parser, base_url) File "src/lxml/parser.pxi", line 1851, in lxml.etree._parseDocument return _parseMemoryDocument(source.getvalue(), url, parser) File "src/lxml/parser.pxi", line 1871, in lxml.etree._parseMemoryDocument c_doc = _parseDoc(text, url, parser) File "src/lxml/parser.pxi", line 1752, in lxml.etree._parseDoc return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename) File "src/lxml/parser.pxi", line 1066, in lxml.etree._BaseParser._parseUnicodeDoc return context._handleParseResultDoc(self, result, None) File "src/lxml/parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc return _handleParseResult(self, self._c_ctxt, result, File "src/lxml/parser.pxi", line 709, in lxml.etree._handleParseResult _raiseParseError(c_ctxt, filename, context._error_log) File "src/lxml/parser.pxi", line 638, in lxml.etree._raiseParseError raise error_log._buildParseException( File "<string>", line 0 lxml.etree.XMLSyntaxError: Element 'b', attribute 'hardy': The value '(null)' does not match the fixed value constraint 'hey'.
On one build on the 2.9.4/1.1.29 system I also got two other failures, which I cannot repeat (I ran it for real and logged it, testing before and after only ever showed the above 1 error in each).
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error dn = tempfile.mkdtemp(prefix=dirnameRU) File "/usr/lib/python3.6/tempfile.py", line 368, in mkdtemp _os.mkdir(file, 0o700) UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18: ordinal not in range(128)
and
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ElementTreeIOTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error dn = tempfile.mkdtemp(prefix=dirnameRU) File "/usr/lib/python3.6/tempfile.py", line 368, in mkdtemp _os.mkdir(file, 0o700) UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18: ordinal not in range(128)
and similar in 2.7 - unless I'm missing something, these 2 error reports are identical. To be clear, in that run python2 ran 1787 tests and reported FAILED (errors=3) while python3 ran 1800 tests with a similar count of errors.
ĸen

Hi,
testing 4.0.0 I'm getting the following error in with both python2 and python3 on x86_64 linux (LFS : gcc-7.2, python-2.7.13, python-3.6.2, with libxml2-2.9.4, libxslt-1.1.29 AND on another machine with libxml2-2.9.5, libxslt-1.1.30 with a fix so that xslt-config --cflags works again), both with linux-4.13.1.
I will admit that I take a jaundiced view of testsuites, but now that I've read your page on building from source I see you want to know about failures ;)
ERROR: test_xmlschema_parse_fixed_attributes (lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase)
(can't comment on this)
On one build on the 2.9.4/1.1.29 system I also got two other failures, which I cannot repeat (I ran it for real and logged it, testing before and after only ever showed the above 1 error in each).
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase)
Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in
testPartExecutor
yield
File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error dn = tempfile.mkdtemp(prefix=dirnameRU) File "/usr/lib/python3.6/tempfile.py", line 368, in mkdtemp _os.mkdir(file, 0o700) UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18: ordinal not in range(128)
and
ERROR: test_etree_parse_io_error
(lxml.tests.test_io.ElementTreeIOTestCase)
Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in
testPartExecutor
yield
File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error dn = tempfile.mkdtemp(prefix=dirnameRU) File "/usr/lib/python3.6/tempfile.py", line 368, in mkdtemp _os.mkdir(file, 0o700) UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18: ordinal not in range(128)
These 2 look a bit like this: https://mailman-mail5.webfaction.com/pipermail/lxml/20141203/015273.html (daily instead of monthly archive now?!)
Which I reported at the time but then forgot to do anything about it :-/.
The original reason in this case was that the test system wasn't UTF-8 and its file system encoding wasn't able to represent some characters in a temp. directory path used in the test.
Holger
Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart

Holger Joukl schrieb am 20.09.2017 um 08:19:
ERROR: test_etree_parse_io_error
(lxml.tests.test_io.ElementTreeIOTestCase)
Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in
testPartExecutor
yield
File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_io.py", line 276, in test_etree_parse_io_error dn = tempfile.mkdtemp(prefix=dirnameRU) File "/usr/lib/python3.6/tempfile.py", line 368, in mkdtemp _os.mkdir(file, 0o700) UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-18: ordinal not in range(128)
These 2 look a bit like this: https://mailman-mail5.webfaction.com/pipermail/lxml/20141203/015273.html (daily instead of monthly archive now?!)
Which I reported at the time but then forgot to do anything about it :-/.
The original reason in this case was that the test system wasn't UTF-8 and its file system encoding wasn't able to represent some characters in a temp. directory path used in the test.
Yep, that test still isn't all that portable.
Stefan

Ken Moffat schrieb am 19.09.2017 um 21:56:
testing 4.0.0 I'm getting the following error in with both python2 and python3 on x86_64 linux (LFS : gcc-7.2, python-2.7.13, python-3.6.2, with libxml2-2.9.4, libxslt-1.1.29 AND on another machine with libxml2-2.9.5, libxslt-1.1.30 with a fix so that xslt-config --cflags works again), both with linux-4.13.1.
I will admit that I take a jaundiced view of testsuites, but now that I've read your page on building from source I see you want to know about failures ;)
Thanks. Just to be sure, can you confirm that the following schema error also occurs on the system that uses libxml2 2.9.5? And that it really uses that version? See lxml.etree.LIBXML_VERSION and the version list during the test run.
ERROR: test_xmlschema_parse_fixed_attributes (lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase)
Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield File "/usr/lib/python3.6/unittest/case.py", line 605, in run testMethod() File "/scratch/working/lxml-4.0.0/src/lxml/tests/test_xmlschema.py", line 217, in test_xmlschema_parse_fixed_attributes parser=parser) File "/scratch/working/lxml-4.0.0/src/lxml/tests/common_imports.py", line 164, in parse return etree.parse(f, parser=parser) File "src/lxml/etree.pyx", line 3441, in lxml.etree.parse doc = _parseDocument(source, parser, base_url) File "src/lxml/parser.pxi", line 1851, in lxml.etree._parseDocument return _parseMemoryDocument(source.getvalue(), url, parser) File "src/lxml/parser.pxi", line 1871, in lxml.etree._parseMemoryDocument c_doc = _parseDoc(text, url, parser) File "src/lxml/parser.pxi", line 1752, in lxml.etree._parseDoc return (<_BaseParser>parser)._parseUnicodeDoc(text, c_filename) File "src/lxml/parser.pxi", line 1066, in lxml.etree._BaseParser._parseUnicodeDoc return context._handleParseResultDoc(self, result, None) File "src/lxml/parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc return _handleParseResult(self, self._c_ctxt, result, File "src/lxml/parser.pxi", line 709, in lxml.etree._handleParseResult _raiseParseError(c_ctxt, filename, context._error_log) File "src/lxml/parser.pxi", line 638, in lxml.etree._raiseParseError raise error_log._buildParseException( File "<string>", line 0 lxml.etree.XMLSyntaxError: Element 'b', attribute 'hardy': The value '(null)' does not match the fixed value constraint 'hey'.
There are known schema bugs in 2.9.4, although I keep forgetting which errors they produce. May or may not be related.
Stefan

On Wed, Sep 20, 2017 at 08:39:35AM +0200, Stefan Behnel wrote:
Ken Moffat schrieb am 19.09.2017 um 21:56:
testing 4.0.0 I'm getting the following error in with both python2 and python3 on x86_64 linux (LFS : gcc-7.2, python-2.7.13, python-3.6.2, with libxml2-2.9.4, libxslt-1.1.29 AND on another machine with libxml2-2.9.5, libxslt-1.1.30 with a fix so that xslt-config --cflags works again), both with linux-4.13.1.
I will admit that I take a jaundiced view of testsuites, but now that I've read your page on building from source I see you want to know about failures ;)
Thanks. Just to be sure, can you confirm that the following schema error also occurs on the system that uses libxml2 2.9.5? And that it really uses that version? See lxml.etree.LIBXML_VERSION and the version list during the test run.
ken@ac4tv /tmp $xml2-config --version 2.9.5
I can't find lxml.etree.LIBXML_VERSION and make test only shows the libxslt version:
python setup.py build_ext -i --warnings --with-coverage Building lxml version 4.0.0. Building without Cython. Using build configuration of libxslt 1.1.30 Building against libxml2/libxslt in the following directory: /usr/lib
Hmm, this time python2 passed (1787 tests, no reported errors, status 0), And similarly python3 passed all 1800 tests.
So, no, I can't confirm the error still occurs - and looking back, it only occurred in manual testing before I did a scripted install as root (including running the tests as root, which perhaps makes the test_etree_parse errors more likely).
On my log from that install on this machine, 2.7 and 3.6 gave errors for the test_etree_parse_io_error x2, the earlier manual testing only failed that xmlschema test in both 2.7 and 3.3.
ERROR: test_xmlschema_parse_fixed_attributes (lxml.tests.test_xmlschema.ETreeXMLSchemaTestCase)
Traceback (most recent call last): File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor yield
[...]
There are known schema bugs in 2.9.4, although I keep forgetting which errors they produce. May or may not be related.
Stefan
The only difference from when I first ran the builds on this newer system is that I have now installed scour (python2 version, but ISTR you can only have one version of htat) and inkscape.
ĸen
participants (3)
-
Holger Joukl
-
Ken Moffat
-
Stefan Behnel