8000 fix: #1256 republish parse_xml() at docx.oxml · python-openxml/python-docx@129dd83 · GitHub
[go: up one dir, main page]

Skip to content

Commit 129dd83

Browse files
committed
fix: #1256 republish parse_xml() at docx.oxml
Multiple downstream "extension" packages expect to find `OxmlElement` and `parse_xml()` at `docx.oxml`. Refactoring in v1.0.0 moved those to `docx.oxml.parser`, but republishing them at `docx.oxml` does not cause any immediate breakage. Republish those two callables at `docx.oxml` for v1.0.1.
1 parent 532ddd5 commit 129dd83

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/docx/oxml/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import annotations
77

88
from docx.oxml.drawing import CT_Drawing
9-
from docx.oxml.parser import register_element_cls
9+
from docx.oxml.parser import OxmlElement, parse_xml, register_element_cls
1010
from docx.oxml.shape import (
1111
CT_Anchor,
1212
CT_Blip,
@@ -34,6 +34,11 @@
3434
CT_Text,
3535
)
3636

37+
# -- `OxmlElement` and `parse_xml()` are not used in this module but several downstream
38+
# -- "extension" packages expect to find them here and there's no compelling reason
39+
# -- not to republish them here so those keep working.
40+
__all__ = ["OxmlElement", "parse_xml"]
41+
3742
# ---------------------------------------------------------------------------
3843
# DrawingML-related elements
3944

0 commit comments

Comments
 (0)
0