add comment
This commit is contained in:
@@ -11,10 +11,11 @@ from io import BytesIO
|
|||||||
from multiprocessing import Manager
|
from multiprocessing import Manager
|
||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Tuple
|
||||||
|
|
||||||
|
|
||||||
|
# patch from https://github.com/python-openxml/python-docx/issues/1105#issuecomment-1298075246
|
||||||
from docx.opc.pkgreader import _SerializedRelationships, _SerializedRelationship
|
from docx.opc.pkgreader import _SerializedRelationships, _SerializedRelationship
|
||||||
from docx.opc.oxml import parse_xml
|
from docx.opc.oxml import parse_xml
|
||||||
|
|
||||||
|
|
||||||
def load_from_xml_v2(baseURI, rels_item_xml):
|
def load_from_xml_v2(baseURI, rels_item_xml):
|
||||||
"""
|
"""
|
||||||
Return |_SerializedRelationships| instance loaded with the
|
Return |_SerializedRelationships| instance loaded with the
|
||||||
@@ -30,7 +31,6 @@ def load_from_xml_v2(baseURI, rels_item_xml):
|
|||||||
srels._srels.append(_SerializedRelationship(baseURI, rel_elm))
|
srels._srels.append(_SerializedRelationship(baseURI, rel_elm))
|
||||||
return srels
|
return srels
|
||||||
|
|
||||||
|
|
||||||
_SerializedRelationships.load_from_xml = load_from_xml_v2
|
_SerializedRelationships.load_from_xml = load_from_xml_v2
|
||||||
|
|
||||||
from docx import Document
|
from docx import Document
|
||||||
|
|||||||
Reference in New Issue
Block a user