I get a report from users[1] that rst2odt recently traceback. I guess that python3.4 remove ElementInterface from xml.etree.ElementTree ( are not public interface).
We're trying to update to 3.4 in Fedora and seeing the following test errors which seem related:
======================================================================
ERROR: test_odt_basic (test_writers.test_odt.DocutilsOdtTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 154, in test_odt_basic
self.process_test('odt_basic.txt', 'odt_basic.odt',
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 105, in process_test
settings_overrides=settings_overrides)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 414, in publish_string
enable_exit_status=enable_exit_status)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 657, in publish_programmatically
pub.set_components(reader_name, parser_name, writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 99, in set_components
self.set_writer(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 88, in set_writer
writer_class = writers.get_writer_class(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/__init__.py", line 137, in get_writer_class
module = __import__(writer_name, globals(), locals(), level=1)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/odf_odt/__init__.py", line 91, in <module>
class _ElementInterfaceWrapper(etree._ElementInterface):
AttributeError: 'module' object has no attribute '_ElementInterface'
======================================================================
ERROR: test_odt_custom_headfoot (test_writers.test_odt.DocutilsOdtTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 173, in test_odt_custom_headfoot
settings_overrides=settings_overrides,
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 105, in process_test
settings_overrides=settings_overrides)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 414, in publish_string
enable_exit_status=enable_exit_status)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 657, in publish_programmatically
pub.set_components(reader_name, parser_name, writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 99, in set_components
self.set_writer(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 88, in set_writer
writer_class = writers.get_writer_class(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/__init__.py", line 137, in get_writer_class
module = __import__(writer_name, globals(), locals(), level=1)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/odf_odt/__init__.py", line 91, in <module>
class _ElementInterfaceWrapper(etree._ElementInterface):
AttributeError: 'module' object has no attribute '_ElementInterface'
======================================================================
ERROR: test_odt_tables1 (test_writers.test_odt.DocutilsOdtTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 161, in test_odt_tables1
self.process_test('odt_tables1.txt', 'odt_tables1.odt',
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_writers/test_odt.py", line 105, in process_test
settings_overrides=settings_overrides)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 414, in publish_string
enable_exit_status=enable_exit_status)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 657, in publish_programmatically
pub.set_components(reader_name, parser_name, writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 99, in set_components
self.set_writer(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/core.py", line 88, in set_writer
writer_class = writers.get_writer_class(writer_name)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/__init__.py", line 137, in get_writer_class
module = __import__(writer_name, globals(), locals(), level=1)
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/build/lib/docutils/writers/odf_odt/__init__.py", line 91, in <module>
class _ElementInterfaceWrapper(etree._ElementInterface):
AttributeError: 'module' object has no attribute '_ElementInterface'
======================================================================
FAIL: test_empty (test_nodes.ElementTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3-python-docutils-0.11-2.fc21/test3/test_nodes.py", line 95, in test_empty
self.assertEqual(str(element), '<Element mark="\\u2022"/>')
AssertionError: '<Element mark="\u2022"/>' != '<Element mark="\\u2022"/>'
- <Element mark="\u2022"/>
? ^
+ <Element mark="\u2022"/>
? ^^^^^^
----------------------------------------------------------------------
Ran 1242 tests in 10.044s
FAILED (failures=1, errors=3)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
$ rst2odt
Traceback (most recent call last):
File "/usr/bin/rst2odt", line 19, in <module>
from docutils.writers.odf_odt import Writer, Reader
File "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/init.py", line 91, in <module>
class _ElementInterfaceWrapper(etree._ElementInterface):
AttributeError: 'module' object has no attribute '_ElementInterface'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
tried on macosx10.6 without patch (svn rev 7749)::
python3.4 setup.py build
PYTHONPATH=build/lib python3.4 test3/alltests.py
Testing Docutils 0.12 [repository] with Python 3.4.0a2 on 2014-06-03 at 10:54:28
Ran 1241 tests in 8.898s
OK
Since the first report you got the python traceback, showing an "Attribute Error".
My last try, with the patch, fail too and you got the traceback, with the same "Attribute Error".
Why are you telling that the first report was a false alarm?
Btw, the last 0.12 version fix this issue. I agree, that we can close this one.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We're trying to update to 3.4 in Fedora and seeing the following test errors which seem related:
Just tested with current svn trunk and it works. Sorry for the noise. Time for a release?
maybe patch https://sourceforge.net/p/docutils/patches/114/
helps.
if 2.4 support is dropped after next release this could become the next implementation
Tried last patch with no success.
$ rst2odt
Traceback (most recent call last):
File "/usr/bin/rst2odt", line 19, in <module>
from docutils.writers.odf_odt import Writer, Reader
File "/usr/lib/python3.4/site-packages/docutils/writers/odf_odt/init.py", line 91, in <module>
class _ElementInterfaceWrapper(etree._ElementInterface):
AttributeError: 'module' object has no attribute '_ElementInterface'
tried on macosx10.6 without patch (svn rev 7749)::
and with 3.2 and 3.3::
both test runs pass (except two tests looking for HISTORY.txt and
docutils/writers/html4css1/html4css1.css.
and with 3.4.1
what now ?
any update on this?
i guess it should be closed.
?
Engelbert,
Since the first report you got the python traceback, showing an "Attribute Error".
My last try, with the patch, fail too and you got the traceback, with the same "Attribute Error".
Why are you telling that the first report was a false alarm?
Btw, the last 0.12 version fix this issue. I agree, that we can close this one.
Thanks
hei sebastian, sorry for any inconvenience, but
that is two reasons for closing it.
But I want to really (no joke) thank you for the confirmation, that it works with 0.12, because it really helps. thanks