Skip to content

Conversation

@faizanazim11
Copy link

There was a release for python-docx library which broke the imports of parse_xml function.

This pull request consists of updated imports to support the new import syntax.

@faizanazim11
Copy link
Author

Please try to merge this, it is breaking production code for many.

from docx.opc.packuri import PackURI
from docx.opc.part import Part
from docx.oxml import parse_xml
from docx.oxml.parser import parse_xml
Copy link

@waketzheng waketzheng Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I installed latest version of docx, and line 11 of docx/oxml/__init__.py is

from docx.oxml.parser import OxmlElement, parse_xml, register_element_cls

That is to say from docx.oxml.parser import parse_xml is equal to from docx.oxml import parse_xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants