diff --git a/openedx/core/lib/safe_lxml/tests.py b/openedx/core/lib/safe_lxml/tests.py index ceb6b9828124..23e16d24d420 100644 --- a/openedx/core/lib/safe_lxml/tests.py +++ b/openedx/core/lib/safe_lxml/tests.py @@ -4,7 +4,7 @@ from lxml import etree -from defusedxml.lxml import EntitiesForbidden +from defusedxml.common import EntitiesForbidden from .xmlparser import fromstring import pytest diff --git a/openedx/core/lib/safe_lxml/xmlparser.py b/openedx/core/lib/safe_lxml/xmlparser.py index b271b43a0fbf..f886eac33518 100644 --- a/openedx/core/lib/safe_lxml/xmlparser.py +++ b/openedx/core/lib/safe_lxml/xmlparser.py @@ -8,7 +8,7 @@ from lxml import etree as _etree -from defusedxml.lxml import DTDForbidden, EntitiesForbidden, NotSupportedError +from defusedxml.common import DTDForbidden, EntitiesForbidden, NotSupportedError LXML3 = _etree.LXML_VERSION[0] >= 3