From 81611a7a8ea65873c5af911b7733ed8a33870525 Mon Sep 17 00:00:00 2001 From: Priyanshu Date: Thu, 8 Feb 2024 03:41:42 +0530 Subject: [PATCH] fix: change deprecated defusedxml.lxml to defusedxml.common (#34177) --- openedx/core/lib/safe_lxml/tests.py | 2 +- openedx/core/lib/safe_lxml/xmlparser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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