From: Dmitry S. <man...@us...> - 2023-04-26 12:17:17
|
First error can be fixed by replacing `el.attrib.keys()` with `list(el.attrib)`. Second error can be fixed by changing argument of os.fdopen from `w` to `wb`. I am attaching an updated version of the patch. Although you may want to commit `w` to `wb` change as a separate revision, for ease of backporting. Attachments: - [rst2odt_prepstyles-elementtree.patch](https://sourceforge.net/p/docutils/patches/_discuss/thread/1beea79a/ed4c/3422/attachment/rst2odt_prepstyles-elementtree.patch) (1.6 kB; text/x-patch) --- ** [patches:#114] rst2odt_prepstyles.py: Port to ElementTree** **Status:** pending-remind **Group:** None **Created:** Mon Aug 05, 2013 02:12 PM UTC by Michael Schutte **Last Updated:** Wed Apr 26, 2023 11:58 AM UTC **Owner:** nobody **Attachments:** - [rst2odt_prepstyles-elementtree.diff](https://sourceforge.net/p/docutils/patches/114/attachment/rst2odt_prepstyles-elementtree.diff) (1.8 kB; text/x-patch) rst2odt_prepstyles.py currently uses lxml to parse, modify and write XML. The attached patch makes it use ElementTree instead, which has been part of Python's standard library since 2.5. --- Sent from sourceforge.net because doc...@li... is subscribed to https://sourceforge.net/p/docutils/patches/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/docutils/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |